Got an exception when starting jPOS

232 views
Skip to first unread message

veryeasy...@gmail.com

unread,
Jun 28, 2015, 7:46:58 PM6/28/15
to jpos-...@googlegroups.com
Hi,

I called the following command to start jPOS qbean; and got a exception. Does anybody know what might be wrong here?

C:\Projects\jPOS_2\jpos\build\libs>java -jar jpos-2.0.0.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdom/Content
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544
)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: org.jdom.Content
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 7 more

C:\Projects\jPOS_2\jpos\build\libs>

Alejandro Revilla

unread,
Jun 28, 2015, 9:00:24 PM6/28/15
to jPOS Users
Take a look at the jPOS's MANIFEST.MF

It expects its dependencies to be in a lib directory.

It looks like this:

Class-Path: lib/jdom-1.1.3.jar lib/jdbm-1.0.jar lib/je-5.0.73.jar lib/
 commons-cli-1.2.jar lib/jline-1.0.jar lib/bsh-2.0b5.jar lib/javatuple
 s-1.2.jar lib/xercesImpl-2.10.0.jar lib/org.osgi.core-6.0.0.jar lib/b
 cprov-jdk15on-1.51.jar lib/bcpg-jdk15on-1.51.jar lib/xml-apis-1.4.01.
 jar

So you basically need to keep your jPOS jar wherever it is now, but move the dependencies to a lib directory relative to your current working directory.

You're already running off a lib directory, so if you move up your jpos.jar, you'd be all set.

Take a look at http://jpos.org/doc/proguide-draft.pdf, you may consider using the jPOS template for your project (https://github.com/jpos/jPOS-template).




--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
 
Join us in IRC at http://webchat.freenode.net/?channels=jpos
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/f3bb5958-8eef-465b-a0a8-45eb7d246d63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages