Roman Minko created ARIES-932:
---------------------------------
Summary: Extention proxy-method="classes" caused
UnableToProxyException
Key: ARIES-932
URL: https://issues.apache.org/jira/browse/ARIES-932
Project: Aries
Issue Type: Bug
Components: Blueprint, Proxy
Environment: Karaf 2.3.0 with ASM 4.0 and Aries 1.0.0
Reporter: Roman Minko
UnableToProxyException arises with Karaf 2.3.0/Aries 1.0.0 when install a
blueprint based bundle into container.
Caused by: org.apache.aries.proxy.UnableToProxyException: The class
xxx.xxx.SomeClass is not an interface and therefore a proxy cannot be generated.
at
org.apache.aries.proxy.impl.JdkProxyManager.getInterfaces(JdkProxyManager.java:43)
at
org.apache.aries.proxy.impl.JdkProxyManager.createNewProxy(JdkProxyManager.java:36)
at
org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)
at
org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)
at
org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:299)
at
org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:102)
... 56 more
The blueprint configuration in the bundle:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
...
<reference
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
ext:proxy-method="classes" id="SomeFeature" interface="xxx.xxx.SomeClass"/>
...
</blueprint>
The stack shows that the JDK proxy (JdkProxyManager) used instead of
AsmProxyManager,
even though ASM 4.0 installed in container:
karaf@admin> exports | grep asm
107 org.springframework.asm; version="3.0.7.RELEASE"
107 org.springframework.asm.commons; version="3.0.7.RELEASE"
107 org.springframework.asm.signature; version="3.0.7.RELEASE"
113 net.sf.cglib.asm; version="2.2.2"
113 net.sf.cglib.asm.signature; version="2.2.2"
212 org.objectweb.asm; version="4.0.0"
212 org.objectweb.asm.signature; version="4.0.0"
212 org.objectweb.asm.commons; version="4.0.0"
212 org.objectweb.asm.tree; version="4.0.0"
212 org.objectweb.asm.tree.analysis; version="4.0.0"
212 org.objectweb.asm.util; version="4.0.0"
212 org.objectweb.asm.xml; version="4.0.0"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira