Created
December 22, 2014 11:32
-
-
Save bandrzejczak/33b3abd84b1bac6e3e6b to your computer and use it in GitHub Desktop.
Degraph exception
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.IncompatibleClassChangeError: class de.schauderhaft.degraph.analysis.asm.GraphBuildingClassVisitor has interface org.objectweb.asm.ClassVisitor as super class | |
at java.lang.ClassLoader.defineClass1(Native Method) | |
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) | |
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) | |
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) | |
at java.net.URLClassLoader.access$100(URLClassLoader.java:71) | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:361) | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) | |
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) | |
at de.schauderhaft.degraph.analysis.asm.Analyzer$.de$schauderhaft$degraph$analysis$asm$Analyzer$$analyze$1(Analyzer.scala:26) | |
at de.schauderhaft.degraph.analysis.asm.Analyzer$$anonfun$analyze$1$$anonfun$apply$1.apply(Analyzer.scala:36) | |
at de.schauderhaft.degraph.analysis.asm.Analyzer$$anonfun$analyze$1$$anonfun$apply$1.apply(Analyzer.scala:35) | |
at scala.collection.immutable.Set$Set1.foreach(Set.scala:74) | |
at de.schauderhaft.degraph.analysis.asm.Analyzer$$anonfun$analyze$1.apply(Analyzer.scala:35) | |
at de.schauderhaft.degraph.analysis.asm.Analyzer$$anonfun$analyze$1.apply(Analyzer.scala:32) | |
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) | |
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108) | |
at de.schauderhaft.degraph.analysis.asm.Analyzer$.analyze(Analyzer.scala:32) | |
at de.schauderhaft.degraph.configuration.Configuration.createGraph(Configuration.scala:31) | |
at de.schauderhaft.degraph.check.Check$$anon$1.apply(Check.scala:49) | |
at de.schauderhaft.degraph.check.Check$$anon$1.apply(Check.scala:46) | |
at de.schauderhaft.degraph.check.hamcrest.HamcrestWrapper.matchesSafely(HamcrestWrapper.scala:8) | |
at org.hamcrest.TypeSafeMatcher.matches(TypeSafeMatcher.java:65) | |
at org.hamcrest.core.Is.matches(Is.java:27) | |
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:12) | |
at org.junit.Assert.assertThat(Assert.java:865) | |
at org.junit.Assert.assertThat(Assert.java:832) | |
at pl.com.bms.leonbpm.PackageDependencySpec.shouldNotHaveCycles(PackageDependencySpec.java:18) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) | |
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) | |
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) | |
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) | |
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) | |
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) | |
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) | |
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) | |
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) | |
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) | |
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) | |
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) | |
at org.junit.runners.ParentRunner.run(ParentRunner.java:309) | |
at org.junit.runner.JUnitCore.run(JUnitCore.java:160) | |
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) | |
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) | |
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) | |
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) | |
Process finished with exit code 255 |
I had the same problem with a Maven project where I used asm version 3.1 dependency transitively.
But the degraph library uses org.ow2.asm:asm:jar:5.0.3
internally.
The solution for solving the version conflict was to exclude the transitive asm dependency:
<dependency>
<groupId>com.example</groupId>
<artifactId>foo</artifactId>
<version>1.0</version>
<exclusions>
<!-- Causes exception: class de.schauderhaft.degraph.analysis.asm.GraphBuildingClassVisitor has interface org.objectweb.asm.ClassVisitor as super class -->
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>de.schauderhaft.degraph</groupId>
<artifactId>degraph-check</artifactId>
<version>0.1.2</version>
<scope>test</scope>
</dependency>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Got the same error in one of my projects when i introduced degraph today.
After playing around with the versions of the dependencies in pom.xml I´ve found a dependency which also contains the Interface named in the exception.
Tip: Use the "Open Type" dialog of your IDE to find all jar-files that contains "org.objectweb.asm.ClassVisitor" and see if your project has one of the jar-files as dependency.
@schauder: By the way, thanks for that awesome project.