[CONTROLLER-1540] UnableToProxyException java.lang.ClassFormatError Duplicate interface name in class file Created: 24/Aug/16  Updated: 25/Jul/23  Resolved: 08/Jun/17

Status: Resolved
Project: controller
Component/s: config
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Michael Vorburger Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Duplicate
is duplicated by BGPCEP-563 Unable to create a proxy object with ... Resolved
External issue ID: 6526

 Description   

Karaf log often has a log of these - I wonder if we could fix this:

2016-08-24 13:11:51,827 | INFO | erRestartService | ServiceRecipe | 15 - org.apache.aries.blueprint.core - 1.6.1 | Unable to create a proxy object for the service .component-1 defined in bundle org.opendaylight.controller.sal-binding-broker-impl/1.5.0.SNAPSHOT with id. Returning the original object instead.
org.apache.aries.proxy.UnableToProxyException: java.lang.ClassFormatError: Duplicate interface name in class file Proxy6fd82926_da09_440b_a855_3bb75f7801bd
at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:165)
at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:97)[12:org.apache.aries.proxy.impl:1.0.5]
at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:80)[12:org.apache.aries.proxy.impl:1.0.5]
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)[12:org.apache.aries.proxy.impl:1.0.5]
at org.apache.aries.proxy.impl.AbstractProxyManager.createInterceptingProxy(AbstractProxyManager.java:53)[12:org.apache.aries.proxy.impl:1.0.5]
at org.apache.aries.blueprint.container.ServiceRecipe$TriggerServiceFactory.getService(ServiceRecipe.java:569)
at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:141)
at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_101]
at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:139)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:468)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:467)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.getServiceSecurely(AbstractServiceReferenceRecipe.java:235)[15:org.apache.aries.blueprint.core:1.6.1]
at org.opendaylight.controller.blueprint.ext.StaticServiceReferenceRecipe.internalCreate(StaticServiceReferenceRecipe.java:113)[179:org.opendaylight.controller.blueprint:0.6.0.SNAPSHOT]
at org.opendaylight.controller.blueprint.ext.StaticServiceReferenceRecipe.retrack(StaticServiceReferenceRecipe.java:79)[179:org.opendaylight.controller.blueprint:0.6.0.SNAPSHOT]
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.start(AbstractServiceReferenceRecipe.java:140)[15:org.apache.aries.blueprint.core:1.6.1]
at org.opendaylight.controller.blueprint.ext.StaticServiceReferenceRecipe.startTracking(StaticServiceReferenceRecipe.java:50)[179:org.opendaylight.controller.blueprint:0.6.0.SNAPSHOT]
at org.opendaylight.controller.blueprint.ext.AbstractDependentComponentFactoryMetadata.retrieveService(AbstractDependentComponentFactoryMetadata.java:108)[179:org.opendaylight.controller.blueprint:0.6.0.SNAPSHOT]
at org.opendaylight.controller.blueprint.ext.AbstractDependentComponentFactoryMetadata.retrieveService(AbstractDependentComponentFactoryMetadata.java:99)[179:org.opendaylight.controller.blueprint:0.6.0.SNAPSHOT]
at org.opendaylight.controller.blueprint.ext.DataStoreAppConfigMetadata.startTracking(DataStoreAppConfigMetadata.java:172)[179:org.opendaylight.controller.blueprint:0.6.0.SNAPSHOT]
at org.opendaylight.controller.blueprint.ext.AbstractDependentComponentFactoryMetadata.startTracking(AbstractDependentComponentFactoryMetadata.java:173)[179:org.opendaylight.controller.blueprint:0.6.0.SNAPSHOT]
at org.apache.aries.blueprint.di.DependentComponentFactoryRecipe.start(DependentComponentFactoryRecipe.java:55)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.trackServiceReferences(BlueprintContainerImpl.java:636)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:360)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)[15:org.apache.aries.blueprint.core:1.6.1]
at org.opendaylight.controller.blueprint.BlueprintContainerRestartServiceImpl$1.run(BlueprintContainerRestartServiceImpl.java:89)[179:org.opendaylight.controller.blueprint:0.6.0.SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_101]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
Caused by: java.lang.ClassFormatError: Duplicate interface name in class file Proxy6fd82926_da09_440b_a855_3bb75f7801bd
at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0_101]
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)[:1.8.0_101]
at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:157)
... 32 more



 Comments   
Comment by Vratko Polak [ 24/Aug/16 ]

Thanks for opening this, it is bugging me too.

Comment by Michael Vorburger [ 26/Aug/16 ]

On Wed, Aug 24, 2016 at 5:41 PM, Tom Pantelis <tpanteli@brocade.com> wrote:

I would suggest to set a breakpoint in ServiceRecipe​ line 569 to see what ODL interface it's trying to proxy. I'd do ti but I'm not seeing it.

Comment by Brady Johnson [ 30/Aug/16 ]

This can easily be reproduced with the boron RC2 distribution by installing the following karaf feature:

feature:install odl-sfc-openflow-renderer

I'll try to debug this tomorrow as Tom suggests in the previous comment.

Comment by Geng Xingyuan [ 25/Oct/16 ]

How about this problem?
We also found it.

Comment by Vratko Polak [ 10/Mar/17 ]

This really slows down examination of SingleFeatureTest surefire outputs.
Any blueprint guru to take a quick look?

Comment by suneel verma [ 04/Apr/17 ]

This is observed with carbon builds as well.

11940 org.apache.aries.proxy.UnableToProxyException: java.lang.ClassFormatError: Duplicate interface name in class file Proxy10c0bace_02be_4d24_9999_78ebaf478792
11941 at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:165)
11942 at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:97)[12:org.apache.aries.proxy.impl:1.0.5]
11943 at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:80)[12:org.apache.aries.proxy.impl:1.0.5]
11944 at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)[12:org.apache.aries.proxy.impl:1.0.5]
11945 at org.apache.aries.proxy.impl.AbstractProxyManager.createInterceptingProxy(AbstractProxyManager.java:53)[12:org.apache.aries.proxy.impl:1.0.5]
11946 at org.apache.aries.blueprint.container.ServiceRecipe$TriggerServiceFactory.getService(ServiceRecipe.java:569)[15:org.apache.aries.blueprint.core:1.6.1]
11947 at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:141)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
11948 at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_73]
11949 at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:139)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
11950 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:468)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
11951 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:467)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
11952 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
11953 at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.getServiceSecurely(AbstractServiceReferenceRecipe.java:235)[15:org.apache.aries.blueprint.core:1.6.1]
11954 at org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:246)[15:org.apache.aries.blueprint.core:1.6.1]
11955 at org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:56)[15:org.apache.aries.blueprint.core:1.6.1]
11956 at org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:306)[15:org.apache.aries.blueprint.core:1.6.1]
11957 at Proxy4d903561_a475_4024_b7c1_e39d496965ee.toYangInstanceIdentifier(Unknown Source)[:]
11958 at org.opendaylight.ovsdb.hwvtepsouthbound.InstanceIdentifierCodec.getYangInstanceIdentifier(InstanceIdentifierCodec.java:65)[255:org.opendaylight.ovsdb.hwvtepsouthbound-impl:1.3.3.SNAPSHOT]
11959 at org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepConnectionManager.getEntityFromConnectionInstance(HwvtepConnectionManager.java:406)[255:org.opendaylight.ovsdb.hwvtepsouthbound-impl:1.3.3.SNAPSHOT]
11960 at org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepConnectionManager.registerEntityForOwnership(HwvtepConnectionManager.java:323)[255:org.opendaylight.ovsdb.hwvtepsouthbound-impl:1.3.3.SNAPSHOT]
11961 at org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepConnectionManager.connected(HwvtepConnectionManager.java:122)[255:org.opendaylight.ovsdb.hwvtepsouthbound-impl:1.3.3.SNAPSHOT]

Comment by Colin Dixon [ 06/May/17 ]

I've also seen this. I had assumed it was harmless, but it would be good to understand if that's true and also try to fix it.

Comment by Colin Dixon [ 06/May/17 ]

Also, for what it's worth, this occurs in Karaf 3, so it's not a Karaf 4 issue.

Comment by Tom Pantelis [ 06/May/17 ]

It is benign - that's why it's INFO. I've looked at the code in the past. Basically when advertising a service, it tries to create a proxy for use by the Aries Quiesce stuff but seems to fail randomly on certain interfaces. On failure, it bails and just returns the original object (hence the message "Returning the original object instead"). It's a bug in the Aries proxy lib.

If it doesn't happen in karaf 4 then it's been fixed.

Comment by Michael Vorburger [ 08/Jun/17 ]

> this occurs in Karaf 3, so it's not a Karaf 4 issue.
> If it doesn't happen in karaf 4 then it's been fixed.

I can hereby confirm that this problem does not occur in the logs of Karaf 4 distributions (e.g. in netvirt/vpnservice/distribution/karaf/target/assembly built with https://git.opendaylight.org/gerrit/#/c/55160/), whereas it still is seen on Karaf 3.

With the current plan of switching completely to Karaf 4 (only) during Nitrogen, I therefore suggest that we close this as RESOLVED WONTFIX at this point, because it soon won't occur anymore on future Nitrogen distributions (once we're all on Karaf 4, which as of right now we're not). Should plans change unexpectedly, then we can always re-open this.

Comment by Michael Vorburger [ 08/Jun/17 ]

> does not occur in the logs of Karaf 4 distributions

or does it?! SFC-196 claims it still does in SFC on k4... TBC.

Generated at Wed Feb 07 19:55:48 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.