Comments (7)
I had the same problem. I found out that I had a version conflict with the asm-dependency in my classpath, since the cassandra driver already includes asm
. Fixed it by using this exclusion rule in my build.sbt
libraryDependencies += "org.clapper" %% "classutil" % "1.3.0" excludeAll(
ExclusionRule(organization = "org.ow2.asm") //since cassandra-driver already provides this dependency
)
from classutil.
I'm having the exact same error on the same Scala/ClassUtil versions.
from classutil.
This comes up a lot. What @FloWi suggests is the correct answer, I think. The other alternative that springs immediately to mind—creating a fatter classutil
jar with a shaded version of ASM—doesn't feel right to me.
from classutil.
I now encounter the same problem as mentioned above. I found another bug for which I wanted to create a small example. Would you mind taking a look in my example repo here to see what I (and maybe the others above) did wrong?
from classutil.
I think the problem lies here:
https://github.com/bmc/classutil/blob/master/src/main/scala/org/clapper/classutil/asm/ASMEmptyVisitor.scala#L10
You set the api-version to Opcodes.ASM4
- but asm throws an exception, when the api-version is < Opcodes.ASM6
. (see the readme of my repo)
from classutil.
I was able to reproduce the bug in your testsuite. Please take a look at my fork.
https://github.com/FloWi/classutil/tree/broken-classfinder-get-classes
I added a failing testcase that doesn't use the runtimeClassfinder
you use in all the tests. I guess we somehow have to figure out at runtime what the current version of ASM is and instantiate the org.clapper.classutil.asm.ASMEmptyVisitor
with this apiVersion. Or just use Opcodes.ASM6
.
from classutil.
created a pull request that solves the problem. Please take a look on what you think about my solution, @bmc. Should be backwards compatible.
from classutil.
Related Issues (15)
- MapToBean can generate clashing names HOT 1
- method signature seems wrong
- Slow Loading Time HOT 1
- No annotation info in ClassInfo HOT 1
- java.lang.IncompatibleClassChangeError upon invoking getClasses() on ClassFinder instance HOT 15
- Unable to get classes from one-jar HOT 1
- An exception or error caused a run to abort. java.lang.IllegalArgumentException HOT 1
- An exception or error caused a run to abort (v 1.1.2) HOT 1
- ClassFinder for full-fat start jar
- java.lang.reflect.InaccessibleObjectException on jdk 17
- java.lang.UnsupportedOperationException: This feature requires ASM7 HOT 2
- Update for Scala 2.9.0-1 HOT 1
- ClassFinder only finding one class HOT 3
- Single directory as classpath HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classutil.