Code Monkey home page Code Monkey logo

Comments (7)

FloWi avatar FloWi commented on May 19, 2024 1

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.

agubelu avatar agubelu commented on May 19, 2024

I'm having the exact same error on the same Scala/ClassUtil versions.

from classutil.

bmc avatar bmc commented on May 19, 2024

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.

FloWi avatar FloWi commented on May 19, 2024

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.

FloWi avatar FloWi commented on May 19, 2024

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.

FloWi avatar FloWi commented on May 19, 2024

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.

FloWi avatar FloWi commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.