[ODLPARENT-74] pax-web-jetty RuntimeException at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)[54:org.objectweb.asm.all:5.0.4] Created: 03/Mar/17  Updated: 22/Aug/19  Resolved: 22/Aug/19

Status: Resolved
Project: odlparent
Component/s: General
Affects Version/s: None
Fix Version/s: 5.0.0

Type: Bug
Reporter: Michael Vorburger Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 7899

 Description   

The following appears, in the features4-genius/target/surefire-reports/org.opendaylight.odlparent.featuretest.SingleFeatureTest-output.txt of https://git.opendaylight.org/gerrit/#/c/51966/ (but likely also in production):

2017-03-02 18:47:28,262 | WARN | ender-2-thread-1 | JettyServerWrapper | 369 - org.ops4j.pax.web.pax-web-jetty - 4.3.0 | Failed to find annotated classes for ServletContainerInitializer
 java.lang.RuntimeException
 at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)[54:org.objectweb.asm.all:5.0.4]
 at org.objectweb.asm.ClassReader.b(Unknown Source)[54:org.objectweb.asm.all:5.0.4]
 at org.objectweb.asm.ClassReader.accept(Unknown Source)[54:org.objectweb.asm.all:5.0.4]
 at org.objectweb.asm.ClassReader.accept(Unknown Source)[54:org.objectweb.asm.all:5.0.4]
 at org.apache.xbean.finder.AbstractFinder.readClassDef(AbstractFinder.java:581)[156:org.apache.xbean.finder:4.1.0]
 at org.apache.xbean.finder.BundleAnnotationFinder$AnnotationFindingCallback.foundInDirectory(BundleAnnotationFinder.java:86)[156:org.apache.xbean.finder:4.1.0]
 at org.apache.xbean.osgi.bundle.util.BundleResourceFinder.scanDirectory(BundleResourceFinder.java:151)[155:org.apache.xbean.bundleutils:4.1.0]
 at org.apache.xbean.osgi.bundle.util.BundleResourceFinder.scanBundleClassPath(BundleResourceFinder.java:120)[155:org.apache.xbean.bundleutils:4.1.0]
 at org.apache.xbean.osgi.bundle.util.BundleResourceFinder.find(BundleResourceFinder.java:88)[155:org.apache.xbean.bundleutils:4.1.0]
 at org.apache.xbean.finder.BundleAnnotationFinder.<init>(BundleAnnotationFinder.java:56)[156:org.apache.xbean.finder:4.1.0]
 at org.apache.xbean.finder.BundleAnnotationFinder.<init>(BundleAnnotationFinder.java:50)[156:org.apache.xbean.finder:4.1.0]
 at org.apache.xbean.finder.BundleAnnotationFinder.<init>(BundleAnnotationFinder.java:46)[156:org.apache.xbean.finder:4.1.0]
 at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:352)[369:org.ops4j.pax.web.pax-web-jetty:4.3.0]
 at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:219)[369:org.ops4j.pax.web.pax-web-jetty:4.3.0]
 at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.getContext(JettyServerImpl.java:267)[369:org.ops4j.pax.web.pax-web-jetty:4.3.0]
 at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.getContext(ServerControllerImpl.java:347)[369:org.ops4j.pax.web.pax-web-jetty:4.3.0]
 at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.getContext(ServerControllerImpl.java:176)[369:org.ops4j.pax.web.pax-web-jetty:4.3.0]
 at org.ops4j.pax.web.service.internal.HttpServiceStarted.begin(HttpServiceStarted.java:1079)[371:org.ops4j.pax.web.pax-web-runtime:4.3.0]
 at org.ops4j.pax.web.service.internal.HttpServiceProxy.begin(HttpServiceProxy.java:412)[371:org.ops4j.pax.web.pax-web-runtime:4.3.0]
 at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:176)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:655)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.register(WebAppPublisher.java:237)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:182)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:135)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)[org.osgi.core-6.0.0.jar:]
 at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)[org.osgi.core-6.0.0.jar:]
 at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]
 at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)[org.osgi.core-6.0.0.jar:]
 at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)[org.osgi.core-6.0.0.jar:]
 at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)[org.osgi.core-6.0.0.jar:]
 at org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:101)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at org.ops4j.pax.web.extender.war.internal.WebObserver.deploy(WebObserver.java:219)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at org.ops4j.pax.web.extender.war.internal.WebObserver$1.doStart(WebObserver.java:179)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at org.ops4j.pax.web.extender.war.internal.extender.SimpleExtension.start(SimpleExtension.java:59)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at org.ops4j.pax.web.extender.war.internal.extender.AbstractExtender$1.run(AbstractExtender.java:281)[367:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_121]
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_121]
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
 at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]


 Comments   
Comment by Michael Vorburger [ 03/Mar/17 ]

This has a similar root cause to the earlier ODLPARENT-43 but is NOT the same issue - that story was about Apache Aries using an outdated ASM, whereas this one has something to do with pax-web-jetty => Xbean => ASM.

The ASM 5.0.4 is less ancient than the one in ODLPARENT-43 but not the latest.. probably an upgrade would help - ideally an upgrade in Xbean upstream (or else attempt an override of the ASM version used in PAX web) - or can we do something about this ourselves, by bundling latest ASM bundle in our base feature, and enforcing its use?

Comment by Robert Varga [ 13/Apr/17 ]

Michael, can you retry? stable/carbon has just removed akka-experimental-distributed-data, which was playing some shenanigans with ow2.

Comment by Michael Vorburger [ 18/Apr/17 ]

> Michael, can you retry? stable/carbon has just removed

I've just re-run a "mvn clean package" in genius/features/features4-genius on stable/carbon, but target/surefire-reports/org.opendaylight.odlparent.featuretest.SingleFeatureTest-output.txt still contains the same as above:

2017-04-18 12:51:06,800 | WARN | ender-2-thread-1 | JettyServerWrapper | 359 - org.ops4j.pax.web.pax-web-jetty - 4.3.0 | Failed to find annotated classes for ServletContainerInitializer

NB that this bug was just filed because I saw that in the log - I'm not sure / not saying that something is actually broken - no idea if we have any web functionality that actually needs to find annotated classes ... (but even if we don't, it's still "ugly" and possibly confusing, of course).

Comment by Robert Varga [ 04/May/17 ]

Looks like an upstream issue:

https://groups.google.com/forum/#!topic/ops4j/CLpjfhr_1zo

Comment by Michael Vorburger [ 01/Mar/18 ]

https://ops4j1.jira.com/browse/PAXWEB-1152

Comment by Stephen Kitt [ 01/Mar/18 ]

vorburger, I’m not convinced this is entirely Pax Web’s problem (although as Achim says, it could be handled better). The error occurs because Pax Web depends on asm-all 5.0.2, but Karaf 4.1 depends on 5.2; anything initialised with the former will fail with the latter, and that does happen during bundle initialisation in Karaf...

Comment by Michael Vorburger [ 02/Aug/18 ]

ODLPARENT-157 tracks a very similar error - same message, but without the ASM stack trace.

Comment by Robert Varga [ 22/Aug/19 ]

I cannot reproduce it with odlparent-5.0.0 and

opendaylight-user@root>feature:install odl-netvirt-openstack
Generated at Wed Feb 07 20:27:33 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.