-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.Cl
PostPosted: Wed Feb 07, 2007 1:53 pm 
Newbie

Joined: Tue Dec 26, 2006 2:57 am
Posts: 11
i've written a simple hibernate programme.. to store and retrieve data from mysql database.

i've following jar's in my classpath.

asm-attr.jar
asm.jar
activation.jar
antln-2.7.5.jar
cglib-2.1.3.jar
commons-collections-2.1.1.jar
commons-dbcp-1.1.jar
commons-logging-1.0.4.jar
commons-pool-1.1.jar
dom4j-1.6.1.jar
ehcache-1.1.jar
hibernate3.jar
hibernate-tools.jar
jta.jar
log4j-1.2.9.jar
mysql-connector-java-3-1.11.jar
mysql-jdbc.jar

which is giving the following error..

somebody plz help me...


Code:
Exception in thread "main" java.lang.ExceptionInInitializerError
   at com.i3l.pps.model.HibernateUtil.<clinit>(HibernateUtil.java:17)
   at com.i3l.pps.model.Test.main(Test.java:24)
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
   at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
   at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
   at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
   at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
   at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
   at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
   at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
   at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
   at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
   at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
   at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
   at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
   at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
   at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
   at com.i3l.pps.model.HibernateUtil.<clinit>(HibernateUtil.java:15)
   ... 1 more


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 3:16 am 
Beginner
Beginner

Joined: Mon Aug 23, 2004 12:44 am
Posts: 25
I'm facing the same problem. Searching for it already a couple of days .. but no solution.

Did you manage to get it to work ?

If yes how ?

Any help would be appreciated.

Thanks,
EDH


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 4:55 am 
Newbie

Joined: Tue Mar 13, 2007 4:15 am
Posts: 12
Location: Trivandrum
pls send the code

_________________
Regards
Belto


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 9:30 am 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
sounds like either your asm.jar and asm-attr.jar are not the right versions (are they the versions that shipped with your hibernate3.jar?), or you have another jar in your classpath with org.objectweb.asm classes.

I've had this problem before, and the details are fuzzy, but it was because of another jar in my classpath that had asm stuff, and was getting loaded before asm.jar.

_________________
nathan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 10:40 am 
Newbie

Joined: Tue Dec 26, 2006 2:57 am
Posts: 11
yes problem is with jar files only.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.