Can jPOS-EE be bundled as a single JAR?

26 views
Skip to first unread message

'Dipo Odumosu

unread,
Mar 31, 2011, 11:03:31 AM3/31/11
to jpos-...@googlegroups.com
Hello,

I guess the subject says it all. I tried packaging jPOS-EE as a single
JAR (using the singlejar target for Ant), but I got the following (the
same kind of exceptions that occur when I try to run an application that
references the jPOS JAR from an IDE like IDEA or Netbeans - I've learned
to add the jPOS prebuilt classes folder, not the JAR, to applications):

java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
at sun.security.util.SignatureFileVerifier.process(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(Unknown Source)
at sun.misc.Resource.cachedInputStream(Unknown Source)
at sun.misc.Resource.getByteBuffer(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.jpos.q2.Q2. Program will exit.
Exception in thread "main"

Also, if jPOS-EE *can* be bundled successfully, how would I recreate the
environment (cfg, deploy, etc) for it to run properly?

Thanks

Alejandro Revilla

unread,
Mar 31, 2011, 1:29:21 PM3/31/11
to jpos-...@googlegroups.com
Some of your dependency jars are probably signed.

I searched in some of our systems, and for instance 'servlet-api-2.5.jar' was signed. When I took it out of the way, I managed to produce a 'singlejar' without any problem.

You can use 'jarsigner -verify' in order to check which jars are signed, you may be able to find alternatives for those.

Hope this helps.

Reply all
Reply to author
Forward
0 new messages