Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Problem with jetty-maven-plugin and classloading

Jan,

thanks for your response. This was also my first intuition, but I don't think that I have conflicting versions here. I pasted the output of mvn dependency:tree here: http://pastebin.com/jtaQejjR

I investigated further by putting a breakpoint in ServiceLoader.nextService():

The class org.eclipse.jetty.apache.jsp.JuliLog is tried for loading two times. The first time it works fine, the second time the Error below is thrown. The ClassLoader seems to be the same as well. I could not find any other maven dependency that in the end boils down to  org.eclipse.jetty.apache.jsp.JuliLog, so I don't understand why it is loaded twice. Is there an easy way to figure out which maven dependency actually causes the loading of this class?

Cheers
Johannes

> On 22 Apr 2015, at 05:25, Jan Bartel <janb@xxxxxxxxxxx> wrote:
> 
> Johannes,
> 
> I suspect you have conflicting versions of jasper jars on your
> classpath. Have you tried doing mvn dependency:tree to verify this?
> 
> Jan
> 
> On 21 April 2015 at 19:34, Johannes Hoffart <johannes@xxxxxxxxxxxxx> wrote:
>> I have been struggling with a problem using the jetty-maven-plugin in our project for a couple of days now and have a hard time figuring out a solution.
>> 
>> The trouble started when we upgraded our AIDA project [1] to Java8, switching to Jetty 9.3.0M1 when we upgraded. The 9.3.0M1 milestone seems to have an issue with threading, it eats a lot of CPU, which the previously used version did not, so I wanted to go back to the 9.2.10.v20150310 stable release, branched at [2]. Unfortunately, I have hit another problem here, which seems to be a class loading problem.
>> 
>> When I start our service with
>> 
>> mvn jetty:run
>> 
>> I get the following error (full log at http://pastebin.com/16unKYxU ):
>> 
>> 2015-04-21 11:09:20.117:WARN:oejuc.AbstractLifeCycle:main: FAILED o.e.j.m.p.JettyWebAppContext@2f5c1332{/aida,file:/Users/jhoffart/Code/github/aida/src/mpi/aida/service/web/,STARTING}{file:/Users/jhoffart/Code/github/aida/src/mpi/aida/service/web/}: java.util.ServiceConfigurationError: org.apache.juli.logging.Log: Provider org.eclipse.jetty.apache.jsp.JuliLog not a subtype
>> java.util.ServiceConfigurationError: org.apache.juli.logging.Log: Provider org.eclipse.jetty.apache.jsp.JuliLog not a subtype
>>        at java.util.ServiceLoader.fail(ServiceLoader.java:239)
>>        at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
>>        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
>>        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
>> 
>> I investigated and it seems that org.eclipse.jetty.apache.jsp.JuliLog is loaded twice by the ServiceLoader. The first time it works, the second time it fails with the above error. To my eyes, the ClassLoaders are the same.
>> 
>> I also tried jetty-maven-plugin in a new project, where all versions work fine, so it seems to be a conflict with another dependency of our aida project. Unfortunately, I have failed to find a good way to identify where exactly the problem comes from.
>> 
>> Any help would be greatly appreciated!
>> 
>> Cheers
>> Johannes
>> 
>> [1] https://github.com/yago-naga/aida
>> [2] https://github.com/yago-naga/aida/tree/jetty-9.2
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
> 
> 
> 
> -- 
> Jan Bartel <janb@xxxxxxxxxxx>
> www.webtide.com
> 'Expert Jetty/CometD developer,production,operations advice'
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top