Hi
I have configured my Hibernate with the required files but wen i am trying to execute the Client program I am facing the below issue. I am using the cglib-2.2_beta1.jar file which looks like the latest jar.
Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
at net.sf.cglib.core.DebuggingClassWriter.<init>(DebuggingClassWriter.java:47)
at net.sf.cglib.core.DefaultGeneratorStrategy.getClassWriter(DefaultGeneratorStrategy.java:30)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:24)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:144)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:116)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at org.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:308)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)
at FirstHibernate.FirstExample.main(FirstExample.java:14)
My Client program is as follows :
regards
Prashanth
This message was edited 1 time. Last update was at by Vijitha Kumara
Abhi Vuyyuru
Greenhorn
Joined: Mar 10, 2005
Posts: 12
posted
0
The class org.objectweb.asm.ClassWriter is in asm.jar file. Please check if the version it you have the correct version of the file.
Hi I am using cglib-2.2_beta1.jar and asm-3.0_RC1 files which seems to be the latest jar files. But still I am facing the same issue.
regards Prashanth
sreenivas jeenor
Ranch Hand
Joined: Jan 09, 2005
Posts: 119
posted
0
Hi place asm.jar,asm-attrs.jar instead of asm-3.0.jar files.
Prashanth Chandra
Ranch Hand
Joined: Dec 07, 2005
Posts: 78
posted
0
Hi We have many versions of asm and asm-attrs I have tried placing some versions but still it does not work. Can you please let me know which version of jar needs to put.
regards Prashanth
sreenivas jeenor
Ranch Hand
Joined: Jan 09, 2005
Posts: 119
posted
0
provide me your mail id.so that i can send you jar files
Hi Thanks for the jar files you have sent me. But I am facing some more issues when I have put these jar files. Please find the error below.
Exception in thread "main" 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:172) 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:144) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:116) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104) at org.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:308) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054) at FirstHibernate.FirstExample.main(FirstExample.java:14)
Thanks in advance regards Prashanth
Mahesh G P
Greenhorn
Joined: Apr 20, 2008
Posts: 6
posted
0
This problem is resolved for me when i have changed from cglib jar 2.2 to 2.1.
Amol Wani
Greenhorn
Joined: Jul 26, 2010
Posts: 1
posted
1
Please use "cglib-2.1.3.jar" and "asm-1.5.1.jar", you will not get this sort of exception.
Obed Vazquez
Greenhorn
Joined: Jan 26, 2012
Posts: 1
posted
0
if you are using glassfish just delete the labrary asm
This message was edited 1 time. Last update was at by Bear Bibeault