ASM error while upgrading a project to java11

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ASM error while upgrading a project to java11

Glen Hein
Hello,

I'm upgrading a project (https://github.com/codice/ddf) to Java11. Here is the exception:

admin@root()> org.apache.aries.blueprint.core[org.apache.aries.blueprint.container.BlueprintContainerImpl] : Unable to start container for blueprint bundle security-handler-guest/2.14.0.SNAPSHOT                         
org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:141)
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360)
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:190)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:717)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:413)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278)
at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:45)
Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.objectweb.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:651)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:391)
at org.apache.aries.proxy.impl.common.AbstractWovenProxyAdapter.readClass(AbstractWovenProxyAdapter.java:696)
at org.apache.aries.proxy.impl.interfaces.InterfaceCombiningClassAdapter.generateBytes(InterfaceCombiningClassAdapter.java:117)
at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:163)
at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:97)
at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:80)
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:77)
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:42)
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:332)
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:125)
... 18 more


Any ideas where to start looking for a solution?

Thanks,
Glen

Reply | Threaded
Open this post in threaded view
|

Re: ASM error while upgrading a project to java11

Glen Hein
BTW,

According to karaf, I do have asm7:

193 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm
194 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.commons
195 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.tree
196 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.tree.analysis
197 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.util

-Glen

On Thu, Feb 21, 2019, at 7:15 AM, Glen Hein wrote:
Hello,

I'm upgrading a project (https://github.com/codice/ddf) to Java11. Here is the exception:

admin@root()> org.apache.aries.blueprint.core[org.apache.aries.blueprint.container.BlueprintContainerImpl] : Unable to start container for blueprint bundle security-handler-guest/2.14.0.SNAPSHOT                         
org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:141)
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360)
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:190)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:717)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:413)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278)
at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:45)
Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.objectweb.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:651)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:391)
at org.apache.aries.proxy.impl.common.AbstractWovenProxyAdapter.readClass(AbstractWovenProxyAdapter.java:696)
at org.apache.aries.proxy.impl.interfaces.InterfaceCombiningClassAdapter.generateBytes(InterfaceCombiningClassAdapter.java:117)
at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:163)
at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:97)
at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:80)
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:77)
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:42)
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:332)
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:125)
... 18 more


Any ideas where to start looking for a solution?

Thanks,
Glen


Reply | Threaded
Open this post in threaded view
|

Re: ASM error while upgrading a project to java11

Glen Hein

I've made a little bit of progress. I set some breakpoints in the ASM code and it looks like ClassVisitor is Opcodes.ASM5, but needs to be Opcodes.ASM7. I still haven't figured out why this is running as ASM5.

-Glen

On Thu, Feb 21, 2019, at 7:41 AM, Glen Hein wrote:
BTW,

According to karaf, I do have asm7:

193 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm
194 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.commons
195 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.tree
196 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.tree.analysis
197 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.util

-Glen

On Thu, Feb 21, 2019, at 7:15 AM, Glen Hein wrote:
Hello,

I'm upgrading a project (https://github.com/codice/ddf) to Java11. Here is the exception:

admin@root()> org.apache.aries.blueprint.core[org.apache.aries.blueprint.container.BlueprintContainerImpl] : Unable to start container for blueprint bundle security-handler-guest/2.14.0.SNAPSHOT                         
org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:141)
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360)
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:190)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:717)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:413)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278)
at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:45)
Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.objectweb.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:651)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:391)
at org.apache.aries.proxy.impl.common.AbstractWovenProxyAdapter.readClass(AbstractWovenProxyAdapter.java:696)
at org.apache.aries.proxy.impl.interfaces.InterfaceCombiningClassAdapter.generateBytes(InterfaceCombiningClassAdapter.java:117)
at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:163)
at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:97)
at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:80)
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:77)
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:42)
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:332)
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:125)
... 18 more


Any ideas where to start looking for a solution?

Thanks,
Glen



Reply | Threaded
Open this post in threaded view
|

RE: ASM error while upgrading a project to java11

DERIES Sebastien

Hello,

Have you updated your maven compiler plugin  with the new ASM dependency ?

https://blog.codefx.org/java/java-11-migration-guide/

 

Seb

 

De : Glen Hein [mailto:[hidden email]]
Envoyé : jeudi 21 février 2019 17:57
À : [hidden email]
Objet : Re: ASM error while upgrading a project to java11

 

 

I've made a little bit of progress. I set some breakpoints in the ASM code and it looks like ClassVisitor is Opcodes.ASM5, but needs to be Opcodes.ASM7. I still haven't figured out why this is running as ASM5.

 

-Glen

 

On Thu, Feb 21, 2019, at 7:41 AM, Glen Hein wrote:

BTW,

 

According to karaf, I do have asm7:

 

193 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm

194 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.commons

195 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.tree

196 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.tree.analysis

197 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.util

 

-Glen

 

On Thu, Feb 21, 2019, at 7:15 AM, Glen Hein wrote:

Hello,

 

I'm upgrading a project (https://github.com/codice/ddf) to Java11. Here is the exception:

 

admin@root()> org.apache.aries.blueprint.core[org.apache.aries.blueprint.container.BlueprintContainerImpl] : Unable to start container for blueprint bundle security-handler-guest/2.14.0.SNAPSHOT                         

org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.UnsupportedOperationException: This feature requires ASM7

at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:141)

at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81)

at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90)

at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360)

at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:190)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:717)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:413)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278)

at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)

at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:45)

Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7

at org.objectweb.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:651)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:391)

at org.apache.aries.proxy.impl.common.AbstractWovenProxyAdapter.readClass(AbstractWovenProxyAdapter.java:696)

at org.apache.aries.proxy.impl.interfaces.InterfaceCombiningClassAdapter.generateBytes(InterfaceCombiningClassAdapter.java:117)

at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:163)

at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:97)

at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:80)

at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:77)

at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:42)

at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:332)

at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:125)

... 18 more

 

 

Any ideas where to start looking for a solution?

 

Thanks,

Glen

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: ASM error while upgrading a project to java11

Glen Hein
We are using maven-compiler-plugin v3.8.0. I looked at the plugin source code and didn't see any dependencies on asm.

-Glen

On Thu, Feb 21, 2019, at 10:05 AM, DERIES Sebastien wrote:

Hello,

Have you updated your maven compiler plugin  with the new ASM dependency ?

https://blog.codefx.org/java/java-11-migration-guide/

 

Seb

 

De : Glen Hein [mailto:[hidden email]]
Envoyé : jeudi 21 février 2019 17:57
À : [hidden email]
Objet : Re: ASM error while upgrading a project to java11

 

 

I've made a little bit of progress. I set some breakpoints in the ASM code and it looks like ClassVisitor is Opcodes.ASM5, but needs to be Opcodes.ASM7. I still haven't figured out why this is running as ASM5.

 

-Glen

 

On Thu, Feb 21, 2019, at 7:41 AM, Glen Hein wrote:

BTW,

 

According to karaf, I do have asm7:

 

193 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm

194 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.commons

195 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.tree

196 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.tree.analysis

197 │ Active      │  20 │ 7.0.0                 │ org.objectweb.asm.util

 

-Glen

 

On Thu, Feb 21, 2019, at 7:15 AM, Glen Hein wrote:

Hello,

 

I'm upgrading a project (https://github.com/codice/ddf) to Java11. Here is the exception:

 

admin@root()> org.apache.aries.blueprint.core[org.apache.aries.blueprint.container.BlueprintContainerImpl] : Unable to start container for blueprint bundle security-handler-guest/2.14.0.SNAPSHOT                         

org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.UnsupportedOperationException: This feature requires ASM7

at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:141)

at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81)

at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90)

at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360)

at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:190)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:717)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:413)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278)

at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)

at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:45)

Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7

at org.objectweb.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:651)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:391)

at org.apache.aries.proxy.impl.common.AbstractWovenProxyAdapter.readClass(AbstractWovenProxyAdapter.java:696)

at org.apache.aries.proxy.impl.interfaces.InterfaceCombiningClassAdapter.generateBytes(InterfaceCombiningClassAdapter.java:117)

at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:163)

at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:97)

at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:80)

at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:77)

at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:42)

at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:332)

at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:125)

... 18 more

 

 

Any ideas where to start looking for a solution?

 

Thanks,

Glen