Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Eclipse BIRT and Jetty 9.4.3

hi all,

it looks like the problem lies with the BIRT Jar files:


        Suppressed: java.lang.RuntimeException: Error scanning entry javax/olap/cursor/Clob.class from jar file:///home/dev01/online_diagnostics/server/IOD_SERVER_1.4.10-SNAPSHOT/iod-base/webapps/iod/WEB-INF/lib/org.eclipse.birt.runtime-4.6.0-20160607.jar
                at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
                ... 6 common frames omitted
        Caused by: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
                at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:314)
                at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:268)
                at java.util.jar.JarVerifier.processEntry(JarVerifier.java:316)
                at java.util.jar.JarVerifier.update(JarVerifier.java:228)
                at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
                at java.util.jar.JarFile.getInputStream(JarFile.java:450)
                at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:162)
                at org.eclipse.jetty.util.resource.URLResource.getInputStream(URLResource.java:241)
                at org.eclipse.jetty.util.resource.JarResource.getInputStream(JarResource.java:122)
                at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:938)
                at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
                ... 6 common frames omitted
        Suppressed: java.lang.RuntimeException: Error scanning entry javax/olap/cursor/CubeCursor.class from jar file:///home/dev01/online_diagnostics/server/IOD_SERVER_1.4.10-SNAPSHOT/iod-base/webapps/iod/WEB-INF/lib/org.eclipse.birt.runtime-4.6.0-20160607.jar
                at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
                ... 6 common frames omitted
        Caused by: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
                at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:314)
                at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:268)
                at java.util.jar.JarVerifier.processEntry(JarVerifier.java:316)
                at java.util.jar.JarVerifier.update(JarVerifier.java:228)
                at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
                at java.util.jar.JarFile.getInputStream(JarFile.java:450)
                at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:162)
                at org.eclipse.jetty.util.resource.URLResource.getInputStream(URLResource.java:241)
                at org.eclipse.jetty.util.resource.JarResource.getInputStream(JarResource.java:122)
                at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:938)
                at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
                ... 6 common frames omitted



Maybe they have been signed with an hashing algo that is no longer considered secure and has been disabled in Java 8 _121.

In any case the original stack trace did not show the reason of the failed class loading hence I was misled into thinking that Jetty was somehow responsible.

I obtained these stacktraces by switching to my build setup which uses an actual web app / WEB-INF/lib etc whilst before I was actually using a Test-only embedded Jetty set up on which the class loaded behaved differently.

Thanks a lot for your help and sorry for not doing my homework before bothering the list.. I just saw that you guys were talking about it and jumped right in :)


thanks,
Michele




On 19 April 2017 at 10:40, Michele Rossi <michele.rossi@xxxxxxxxx> wrote:
hi Jan,

I have just tried again with BIRT v 4.6.0-20160607 and Jetty 9.4.3:

<dependency>
<groupId>org.eclipse.birt.runtime</groupId>
<artifactId>org.eclipse.birt.runtime</artifactId>
<version>4.6.0-20160607</version>
</dependency>

Looking at the Maven dependencies tree I could not find any reference to the  jetty-osgi-boot-9.2.13 jar that you mention below.

I tried to declare it as a dependency anyway but it did not work:

<dependency>
<artifactId>jetty-osgi-boot</artifactId>
<groupId>org.eclipse.jetty.osgi</groupId>
<version>${jetty.version}</version>
<scope>runtime</scope>
</dependency>



This is the stacktrace I get:

1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1028)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054)
at com.iontrading.iod.guice.BootstrapContextListener.contextInitialized(BootstrapContextListener.java:76)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:876)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:839)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.server.Server.start(Server.java:452)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:419)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.iontrading.iod.MainNew.main(MainNew.java:113)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/birt/report/engine/api/IHTMLActionHandler
at com.iontrading.iod.webservices.reports.pdf.BirtReportGeneratorFactory.<init>(BirtReportGeneratorFactory.java:40)
at com.iontrading.iod.webservices.reports.pdf.BirtReportGeneratorFactory.<init>(BirtReportGeneratorFactory.java:32)
at com.iontrading.iod.guice.WebServicesModule.provideBirtReportGeneratorFactory(WebServicesModule.java:388)
at com.iontrading.iod.guice.WebServicesModule$$FastClassByGuice$$ad0c26b5.invoke(<generated>)
at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:264)
at com.google.inject.internal.ProviderMethod$Factory.provision(ProviderMethod.java:401)
at com.google.inject.internal.ProviderMethod$Factory.get(ProviderMethod.java:376)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ProviderMethod$Factory.provision(ProviderMethod.java:402)
at com.google.inject.internal.ProviderMethod$Factory.get(ProviderMethod.java:376)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
... 20 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.birt.report.engine.api.IHTMLActionHandler
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)
... 49 more


If I try to declare all BIRT transitive dependencies manually I get a similar error with the only difference being the name of the BIRT class that can not be loaded:

Caused by: java.lang.ClassNotFoundException: org.eclipse.birt.core.framework.PlatformConfig
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)
... 49 more



I can see that this is caused by some weird classloading problem but unfortunately I don't have a clue on how to fix this nor I can invest an inordinate amount of time on this :(


Thanks for looking into it, very much appreciated.

Michele








On 19 April 2017 at 07:37, Jan Bartel <janb@xxxxxxxxxxx> wrote:
Joakim,

The Birt project has a hard dependency on jetty-9.2.13. Moreover, their p2 repository contains the jetty-osgi-boot-9.2.13 jar. If a user already has another version of the jetty-osgi-boot jar installed, Eclipse reports the conflict.

I don't see that there is anything we can do about it. Birt would need to upgrade to jetty-9.4, or at least be less restrictive in the versions of jetty-osgi-boot jar that they interwork with.

cheers
Jan

On 19 April 2017 at 00:52, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
Looks like the BIRT project is having conflicts with the Jetty 9.4.3 bundles.


Anything we should do to fix it?
Or are the 9.4.4 fixes for OSGi (soon to be released) going to help?

Joakim Erdfelt / joakim@xxxxxxxxxxx

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



Back to the top