Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
java.lang.SecurityException
February 18, 2015
10:23, EET
Avatar
chrislesslie
Member
Members
Forum Posts: 4
Member Since:
February 2, 2015
sp_UserOfflineSmall Offline

Hi,

I am building my application on Jenkins. When I add the jar files required for OPC UA implementation, I get the following exception when trying to run the application:

Exception in thread “main” 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$100(Unknown Source)
at java.net.URLClassLoader$1.run(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)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

Can you tell me if there is anything I need to do extra for the build please?

February 18, 2015
10:58, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1068
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Do you merge all the jars together? Because the bouncy castle jars are signed and therefore cannot be merged without breaking the signature, i.e. it wont work. So I suggest you create a lib folder for the application next to the main jar and set classpath attributes to take bouncy castle jars from the lib folder.

February 18, 2015
11:14, EET
Avatar
chrislesslie
Member
Members
Forum Posts: 4
Member Since:
February 2, 2015
sp_UserOfflineSmall Offline

Yes, jars are merged then we build an .exe.

As you say, it is caused by BouncyCastle. It looks like I can exclude the .SF files from the manifest (see http://stackoverflow.com/quest…..-run-a-jar) and this seems to work.

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 47
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 100
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 773
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1558
Posts: 6567
Newest Members:
aracelyhaley4, raphaelschonell, Ashmag, kathyreimann56, brittanylemos, dorthycundiff76, PromotionToold, CHHinrichs, rodricklienhop, jose_Wanderlei
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1054, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1