Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Facing a terrible problem with Maven update for an asm dependency

 
sandeeprajsingh tandon
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have the following jar added as a Maven dependecy C:\Documents and Settings\a161661\.m2\repository\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar.
Yet i am facing the following exception,.

Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:165)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)


The Pom entry is as follows.
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>2.2.3</version>
<scope>provided</scope>
</dependency>

The cglib-nodep-2.1_3.jar already contains the CodeVisitor class but it is net.sf.cglib.asm.CodeVisitor and not org/objectweb/asm/CodeVisitor as the Appllication Server seems to be searching for.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have the wrong dependency. Unfortunately, I could not find the ObjectWeb ASM library in the Maven repository (trying to find most things in there is like lookig for a needle in a haystack), so I cannot tell you what dependency you should have used. You can always download the JAR from the objectweb site and install it in your local repo.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not and IDE issue, moving.
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ObjectWeb may be maintaining its own Maven repository that needs adding to the POM. I haven't worked with any of their stuff since I got heavy into Maven, so I don't know.

You might consider asking in the appropriate ObjectWeb message forum, though. They're among the friendliest and helpful folks I've ever found supporting software.
 
sandeeprajsingh tandon
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You guys are the most helpful i have found on the net . I mean it.
Keep up the good work.

However, solved this issue with following entry. had to remove some entry. It was an expereiced guy who knew this error and the solution otherwise. i would have been lost. But only GOD knows what happened. This entry was done only to work the code on my machine. Rest all of my team mates didnot have to do the below entry. The entry that made it work on my machine is
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.5.ga</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm-attrs</artifactId>
</exclusion>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
 
sandeeprajsingh tandon
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if the earlier message is posted.
You guys are the most helpful i have found on the net . I mean it.
Keep up the good work.

However, solved this issue with following entry. had to remove some entry. It was an expereiced guy who knew this error and the solution otherwise. i would have been lost. But only GOD knows what happened. This entry was done only to work the code on my machine. Rest all of my team mates didnot have to do the below entry. The entry that made it work on my machine is
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.5.ga</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm-attrs</artifactId>
</exclusion>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic