Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-932

Extention proxy-method="classes" caused UnableToProxyException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • Blueprint, Proxy
    • None
    • Karaf 2.3.0 with ASM 4.0 and Aries 1.0.0

    Description

      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"

      Attachments

        Activity

          People

            Unassigned Unassigned
            rminko Roman Minko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: