felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Munteanu <romb...@apache.org>
Subject Re: [scr] java.lang.IncompatibleClassChangeError: Implementing class
Date Mon, 10 Mar 2014 09:49:47 GMT
Maybe there's a clash between the ASM version used by the SCR plugin
(4.0) and the one used by your project ( 3.3.1 ) ?

Robert

On Mon, Mar 10, 2014 at 11:40 AM, Nicolas Peltier <npeltier@adobe.com> wrote:
> Thanks Robert,
>
> i don’t manage to run the build with the proposed option. However, i’ve moved some
suspected class out of the interface, only in the implementation, and get the same error,
but happening a bit further, basically in the component implementing the interface [0]. I
guess i’m next to it :-) but still can’t find that. I’m using clapper for class information
browsing through 2 dependencies [1], the incriminated class is org.clapper.util.classutil.ClassInfo.
Those dependencies required me to add the maven.clapper.org repository within the project.
>
> Nicolas
>
> [0] Caused by: java.lang.IncompatibleClassChangeError: Implementing class
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>         at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>         at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>         at java.lang.Class.getDeclaredMethods0(Native Method)
>         at java.lang.Class.privateGetDeclaredMethods(Class.java:2484)
>         at java.lang.Class.getDeclaredMethods(Class.java:1827)
>         at org.apache.felix.scrplugin.helper.ClassScanner.extractAnnotation(ClassScanner.java:253)
>         at org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:209)
>         at org.apache.felix.scrplugin.helper.ClassScanner.process(ClassScanner.java:161)
>         at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:146)
>         at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:146)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:221)
>         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>
> [1]         <dependency>
>             <groupId>org.clapper</groupId>
>             <artifactId>javautil</artifactId>
>             <version>3.1.1</version>
>             <scope>compile</scope>
>         </dependency>
>         <dependency>
>             <groupId>asm</groupId>
>             <artifactId>asm</artifactId>
>             <version>3.3.1</version>
>             <scope>compile</scope>
>         </dependency>
>
>
>
> On 10 Mar 2014, at 10:32, Robert Munteanu <rombert@apache.org> wrote:
>
>> Hi Nicolas,
>>
>>
>>
>> On Sun, Mar 9, 2014 at 11:08 PM, Nicolas Peltier <npeltier@adobe.com> wrote:
>>> Hi,
>>>
>>> while compiling a rather simple project with a one method interface, i get the
scr package phasis failing [0] , apparently when processing the only reference i use in my
project [1]. I’m out of ideas and hope this rings a bell to someone, or can someone guide
me through the way to debug the scr generator project? i’ve tried mvnDebug + remote debugging
on port 8000, but i don’t manage to have my ide (intellij) even loading the class.
>>
>> Can you try loading your build with -verbose:class and see if anything
>> stands out? I'd be looking for classes loaded from unexpected
>> locations or old versions of classes.
>>
>> Robert
>>
>>>
>>> Nicolas
>>>
>>>
>>> [0]
>>> [INFO] ------------------------------------------------------------------------
>>> [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.15.1-R1557061:scr
(generate-scr-scrdescriptor) on project sightly-ide-api: Execution generate-scr-scrdescriptor
of goal org.apache.felix:maven-scr-plugin:1.15.1-R1557061:scr failed: An API incompatibility
was encountered while executing org.apache.felix:maven-scr-plugin:1.15.1-R1557061:scr: java.lang.IncompatibleClassChangeError:
Implementing class
>>> [ERROR] -----------------------------------------------------
>>> [ERROR] realm =    plugin>org.apache.felix:maven-scr-plugin:1.15.1-R1557061
>>> [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
>>> [ERROR] urls[0] = file:/Users/npeltier/.m2/repository/org/apache/felix/maven-scr-plugin/1.15.1-R1557061/maven-scr-plugin-1.15.1-R1557061.jar
>>> [ERROR] urls[1] = file:/Users/npeltier/.m2/repository/org/slf4j/slf4j-simple/1.5.2/slf4j-simple-1.5.2.jar
>>> [ERROR] urls[2] = file:/Users/npeltier/.m2/repository/org/slf4j/slf4j-api/1.5.2/slf4j-api-1.5.2.jar
>>> [ERROR] urls[3] = file:/Users/npeltier/.m2/repository/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.jar
>>> [ERROR] urls[4] = file:/Users/npeltier/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
>>> [ERROR] urls[5] = file:/Users/npeltier/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
>>> [ERROR] urls[6] = file:/Users/npeltier/.m2/repository/org/apache/felix/org.apache.felix.scr.generator/1.8.3-R1557061/org.apache.felix.scr.generator-1.8.3-R1557061.jar
>>> [ERROR] urls[7] = file:/Users/npeltier/.m2/repository/org/ow2/asm/asm-all/4.0/asm-all-4.0.jar
>>> [ERROR] urls[8] = file:/Users/npeltier/.m2/repository/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar
>>> [ERROR] urls[9] = file:/Users/npeltier/.m2/repository/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar
>>> [ERROR] urls[10] = file:/Users/npeltier/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
>>> [ERROR] urls[11] = file:/Users/npeltier/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar
>>>
>>>
>>> [1]
>>> Caused by: java.lang.IncompatibleClassChangeError: Implementing class
>>>        at java.lang.ClassLoader.defineClass1(Native Method)
>>>        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
>>>        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>>>        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>>>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>>>        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>>        at java.lang.ClassLoader.defineClass1(Native Method)
>>>        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
>>>        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>>>        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>>>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>>>        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>>        at java.lang.Class.getDeclaredMethods0(Native Method)
>>>        at java.lang.Class.privateGetDeclaredMethods(Class.java:2484)
>>>        at java.lang.Class.getDeclaredMethod(Class.java:1971)
>>>        at org.apache.felix.scrplugin.helper.Validator.getMethod(Validator.java:541)
>>>        at org.apache.felix.scrplugin.helper.Validator.findMethod(Validator.java:575)
>>>        at org.apache.felix.scrplugin.SCRDescriptorGenerator.processReferences(SCRDescriptorGenerator.java:654)
>>>        at org.apache.felix.scrplugin.SCRDescriptorGenerator.createComponent(SCRDescriptorGenerator.java:390)
>>>        at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:161)
>>>        at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:221)
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message