Birt 4.3.1a - invalid jar file signature

Tomas.Vala
edited February 11, 2022 in Analytics #1
<p>Hi,</p><p> </p><p>there's a weird observation to report.</p><p> </p><p>After upgrading Birt 4.3.1 runtime to 4.3.1a (available through Maven release <a data-ipb='nomediaparse' href='https://oss.sonatype.org/content/repositories/releases/org/eclipse/birt/runtime/org.eclipse.birt.runtime/4.3.1a/'>repository</a>), Java program will no longer execute due to java security exception, see below. Switching to 4.3.1 problem disappears, switching to 4.3.1a problem surfaces again.</p><pre class="_prettyXprint">Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes  at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:240)  at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:193)  at java.util.jar.JarVerifier.processEntry(JarVerifier.java:305)  at java.util.jar.JarVerifier.update(JarVerifier.java:216)  at java.util.jar.JarFile.initializeVerifier(JarFile.java:345)  at java.util.jar.JarFile.getInputStream(JarFile.java:412)  at sun.misc.JarIndex.getJarIndex(JarIndex.java:137)  at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:674)  at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:666)  at java.security.AccessController.doPrivileged(Native Method)  at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:665)  at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:638)  at sun.misc.URLClassPath$3.run(URLClassPath.java:366)  at sun.misc.URLClassPath$3.run(URLClassPath.java:356)  at java.security.AccessController.doPrivileged(Native Method)  at sun.misc.URLClassPath.getLoader(URLClassPath.java:355)  at sun.misc.URLClassPath.getLoader(URLClassPath.java:332)  at sun.misc.URLClassPath.getResource(URLClassPath.java:198)  at java.net.URLClassLoader$1.run(URLClassLoader.java:358)  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  at java.security.AccessController.doPrivileged(Native Method)  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  at java.lang.ClassLoader.loadClass(ClassLoader.java:425)  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  at java.lang.ClassLoader.loadClass(ClassLoader.java:358)  at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)</pre><p>This is with Java 1.7.0_45 x64 on Windows. Unfortunatelly it is not listed which JAR file caused the exception.</p><p> </p><p>Anyone else experiencing this? Seems to be a packaging related problem.</p><p> </p><p>Cheers,</p><p>Tomas</p>

Comments

  • <p>And that's the entire error stack?</p>
    Warning No formatter is installed for the format ipb
  • <p>Hi,</p><p> </p><p>yes that's the entire error stack.</p><p> </p><p>I've managed to nail the problem down.</p><p> </p><p><strong>4.3.1 - OK</strong></p><pre class="_prettyXprint">C:Program FilesJavajdk7bin>jarsigner -verify "org.eclipse.birt.runtime-4.3.1.jar"jar verified.</pre><p><strong>4.3.1a - Problem</strong></p><pre class="_prettyXprint">C:Program FilesJavajdk7bin>jarsigner -verify "org.eclipse.birt.runtime-4.3.1a.jar"jarsigner: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes</pre><p>Tomas</p>
  • <p>Glad you found what was going on.</p>
    Warning No formatter is installed for the format ipb
  • <p>Hi mwilliams, do you ever read more than the first line of the posts?</p><p>Hi Tomas,</p><p>I'm having the same problem when i try to run some java code that depends on the 4.3.1a jars in eclipse, however when i run the same in maven they run fine... maybe there's a way to tell java to ignore this error</p><p> </p><p> </p><p> </p>
  • <p>I had the very same issue when running the BIRT 4.6 under Wildfly.</p>
    <p> </p>
    <p>Turns out I was using an ear file.</p>
    <p>My Birt jars were in lib directory under the ear. not in the war file.</p>
    <p> </p>
    <p>I needed to tell jboss where this file was.</p>
    <p> </p>
    <p>In my jboss-deplyment-structure.xml</p>
    <p>I add this line</p>
    <p><span style="background-color:#efefef;"><</span><span style="color:#000080;background-color:#efefef;font-weight:bold;">resources</span><span style="background-color:#efefef;">></span><br><span style="background-color:#efefef;"><</span><span style="color:#000080;background-color:#efefef;font-weight:bold;">resource-root </span><span style="color:#0000ff;background-color:#efefef;font-weight:bold;">path</span><span style="color:#008000;background-color:#efefef;font-weight:bold;">="lib/org.eclipse.birt.runtime-4.6.0-20160607.jar" </span><span style="color:#0000ff;background-color:#efefef;font-weight:bold;">use-physical-code-source</span><span style="color:#008000;background-color:#efefef;font-weight:bold;">="true"</span><span style="background-color:#efefef;">/></span><br><span style="background-color:#efefef;"></</span><span style="color:#000080;background-color:#efefef;font-weight:bold;">resources</span><span style="background-color:#efefef;">></span></p>
    <p> </p>
    <p><span style="background-color:#efefef;">this tells jboss where the file is instead of looking in my WAR/WEB-INF/lib now looking in EAR/lib  </span></p>
    <p> </p>
    <p><span style="background-color:#efefef;">BIRT 4.6 then will start.</span></p>
    <p> </p>
    <p><span style="background-color:#efefef;">Gary Rather</span></p>