Projects tigase _server server-core Issues #679
Nightly Installer exe/jar has java.lang.SecurityException Error (#679)
Daniel Wisnewski opened 9 years ago
Due Date
2016-06-29

Tried to run installers in Java, the following error occurs and installer is unable to work

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\>java -jar tigase-server.jar
Error: A JNI error has occurred, please check your installation and try again
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.JarIndex.getJarIndex(Unknown Source)
        at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
        at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
        at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
        at sun.misc.URLClassPath$3.run(Unknown Source)
        at sun.misc.URLClassPath$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.misc.URLClassPath.getLoader(Unknown Source)
        at sun.misc.URLClassPath.getLoader(Unknown Source)
        at sun.misc.URLClassPath.getNextLoader(Unknown Source)
        at sun.misc.URLClassPath.getResource(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)

C:\>

Possible CLASSPATH exception?

wojciech.kapcia@tigase.net commented 9 years ago

This is related to implementation of signing of our binaries. One of the reasons such exception could be thrown is when there are classes in the same java package scattered across multiple jars with different signatures (including lack of signature). I'll look into it.

wojciech.kapcia@tigase.net commented 8 years ago

Signing resulting IzPack installer jar solved the issue. I've modified script that builds the installer to extract information for signing the installer from maven configuration. During releasing of the final version signing with the certificate from CA will be required! (I've added the remark to the wiki)

I've checked the jar version but exe should also work (as it's simply a packed jar one). Daniel, can you verify that everything works now?

Daniel Wisnewski commented 8 years ago

Installer runs without this issue both JAR and EXE. Closing issue.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
4213
Version
tigase-server-7.1.0
Spent time
15h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#679
Please wait...
Page is in error, reload to recover