• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Facing a terrible problem with Maven update for an asm dependency

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is not and IDE issue, moving.
 
Saloon Keeper
Posts: 23742
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic