Testing example spi-fly-example-provider-consumer-bundle throws java.lang.ClassFormatError

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

Testing example spi-fly-example-provider-consumer-bundle throws java.lang.ClassFormatError

Ronald Gualán Saavedra
Hello Apache Aries community,

I've tested the example spi-fly-example-provider-consumer-bundle from http://aries.apache.org/modules/spi-fly.html#examples over Apache Karaf 4.0.4. But, when the bundle is being deployed the following exception appears in the console:

Exception in thread "Thread-33" java.lang.ClassFormatError: Duplicate method name&signature in class file org/apache/aries/spifly/client/jar/Consumer
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.apache.aries.spifly.pc.bundle.Activator$1.run(Activator.java:41)
    at java.lang.Thread.run(Thread.java:745)


It is an example taken from the Apache Aries SPI Fly module, so it is supposed to be working. I don't understand what is wrong.

Any help would be appreciated,

Ronald


  ­­  
Reply | Threaded
Open this post in threaded view
|

Re: Testing example spi-fly-example-provider-consumer-bundle throws java.lang.ClassFormatError

David Bosschaert
Hi Ronald,

Just tried this from a plain Felix 5.4.0 scenario and there it works fine:

g! lb
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (5.4.0)|5.4.0
    1|Active     |    1|Apache Felix Bundle Repository (2.0.6)|2.0.6
    2|Active     |    1|Apache Felix Gogo Command (0.16.0)|0.16.0
    3|Active     |    1|Apache Felix Gogo Runtime (0.16.2)|0.16.2
    4|Active     |    1|Apache Felix Gogo Shell (0.10.0)|0.10.0
    5|Active     |    1|Apache Aries Util (1.1.1)|1.1.1
    6|Active     |    1|ASM all classes with debug info (5.0.4)|5.0.4
    7|Active     |    1|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
    8|Active     |    1|Apache Aries Example SPI Interface (1.0.1.SNAPSHOT)|1.0.1.SNAPSHOT
    9|Installed  |    1|Apache Aries Example SPI Provider Consumer Bundle (1.0.1.SNAPSHOT)|1.0.1.SNAPSHOT
   
g! start 9
*** Asynchronous invocation to let the extender do its work.
*** Result from invoking the SPI consumer via library: Doing it!

Maybe Karaf changes the picture but it shouldn't really. I guess it would be useful if you could confirm that it works for you in the plain Felix Framework scenario too. Then we can look into why it doesn't work for you with Karaf...

Cheers,

David

2016-04-05 17:54 GMT+01:00 Ronald Gualán Saavedra <[hidden email]>:
Hello Apache Aries community,

I've tested the example spi-fly-example-provider-consumer-bundle from http://aries.apache.org/modules/spi-fly.html#examples over Apache Karaf 4.0.4. But, when the bundle is being deployed the following exception appears in the console:

Exception in thread "Thread-33" java.lang.ClassFormatError: Duplicate method name&signature in class file org/apache/aries/spifly/client/jar/Consumer
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.apache.aries.spifly.pc.bundle.Activator$1.run(Activator.java:41)
    at java.lang.Thread.run(Thread.java:745)


It is an example taken from the Apache Aries SPI Fly module, so it is supposed to be working. I don't understand what is wrong.

Any help would be appreciated,

Ronald


  ­­  

Reply | Threaded
Open this post in threaded view
|

Re: Testing example spi-fly-example-provider-consumer-bundle throws java.lang.ClassFormatError

Ronald Gualán Saavedra
Hi David,

I tried it on Felix 5.4.0 and it is working fine. I am going to try and discover why it works on Felix but does not on Karaf (inside Servicemix).

It would be great if somebody could test it on ServiceMix 7.0.0.M1 too.

Sorry for the late answer. I sent this email days ago, but there was some error in the mail-provider.

Cheers,
Ronald


De: "David Bosschaert" <[hidden email]>
Para: "user" <[hidden email]>
Enviados: Martes, 5 de Abril 2016 14:08:37
Asunto: Re: Testing example spi-fly-example-provider-consumer-bundle throws java.lang.ClassFormatError

Hi Ronald,
Just tried this from a plain Felix 5.4.0 scenario and there it works fine:

g! lb
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (5.4.0)|5.4.0
    1|Active     |    1|Apache Felix Bundle Repository (2.0.6)|2.0.6
    2|Active     |    1|Apache Felix Gogo Command (0.16.0)|0.16.0
    3|Active     |    1|Apache Felix Gogo Runtime (0.16.2)|0.16.2
    4|Active     |    1|Apache Felix Gogo Shell (0.10.0)|0.10.0
    5|Active     |    1|Apache Aries Util (1.1.1)|1.1.1
    6|Active     |    1|ASM all classes with debug info (5.0.4)|5.0.4
    7|Active     |    1|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
    8|Active     |    1|Apache Aries Example SPI Interface (1.0.1.SNAPSHOT)|1.0.1.SNAPSHOT
    9|Installed  |    1|Apache Aries Example SPI Provider Consumer Bundle (1.0.1.SNAPSHOT)|1.0.1.SNAPSHOT
   
g! start 9
*** Asynchronous invocation to let the extender do its work.
*** Result from invoking the SPI consumer via library: Doing it!

Maybe Karaf changes the picture but it shouldn't really. I guess it would be useful if you could confirm that it works for you in the plain Felix Framework scenario too. Then we can look into why it doesn't work for you with Karaf...

Cheers,

David

2016-04-05 17:54 GMT+01:00 Ronald Gualán Saavedra <[hidden email]>:
Hello Apache Aries community,

I've tested the example spi-fly-example-provider-consumer-bundle from http://aries.apache.org/modules/spi-fly.html#examples over Apache Karaf 4.0.4. But, when the bundle is being deployed the following exception appears in the console:

Exception in thread "Thread-33" java.lang.ClassFormatError: Duplicate method name&signature in class file org/apache/aries/spifly/client/jar/Consumer
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.apache.aries.spifly.pc.bundle.Activator$1.run(Activator.java:41)
    at java.lang.Thread.run(Thread.java:745)


It is an example taken from the Apache Aries SPI Fly module, so it is supposed to be working. I don't understand what is wrong.

Any help would be appreciated,

Ronald


  ­­  


--
Ronald M. Gualán Saavedra
Investigador Asistente
Departamento de ingeniería Eléctrica, Electrónica y Telecomunicaciones (DEET)
Universidad de Cuenca
Telf. : (593 7) 405 1000 Ext. 2361
Av. 12 de Abril y Agustín Cueva, Ciudadela Universitaria
www.ucuenca.edu.ec

  ­­