-->
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: Can't intitialize SessionFactory
PostPosted: Tue Dec 19, 2006 2:38 am 
Newbie

Joined: Tue Dec 19, 2006 2:09 am
Posts: 5
Location: CN
Hi,
I'm a new user to hibernate, I run the tutorial(doc/tutorial) with ant command line:ant run -Daction=store, but the result said that one exception happend in HibernateUtil, the exception is NoSuchMethodErrod exception and it's said that the method org.objectweb.asm.ClassVisitor.visit is not be found. I check the lib directory, make sure that I put the asm.jar in this directory, and I don't why this excpetion happend, so I really need someone to help me to resolve this problem.

thank you very much!


Hibernate version:3.2

Mapping documents:http://hibernate.sourceforge.net/hibernate- configuration-3.0.dtd

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
[java] Initial SessionFactory creation failed.java.lang.NoSuchMethodError:
org.objectweb.asm.ClassVisitor.visit(ILjava/lang/String;Ljava/lang/String;[Ljava
/lang/String;Ljava/lang/String;)V
[java] java.lang.ExceptionInInitializerError
[java] at util.HibernateUtil.<clinit>(Unknown Source)
[java] at events.EventManager.createAndStoreEvent(Unknown Source)
[java] at events.EventManager.main(Unknown Source)
[java] Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisit
or.visit(ILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/Stri
ng;)V
Name and version of the database you are using:HSQL DB1_8_0_7

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 3:05 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
It seems like you're not using the right version of the ASM bytecode generation framework (http://asm.objectweb.org).

What's your asm jar version ?

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 4:14 am 
Newbie

Joined: Tue Dec 19, 2006 2:09 am
Posts: 5
Location: CN
I can't find the version information, but it is bind with hibernate-3.2, the full name is asm.jar


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 4:54 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Maybe have a look in the manifest file to see if the version is specified there. Where did you download the hibernate jar? Do you use others jars than the one provided with Hibernate?

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 5:45 am 
Newbie

Joined: Tue Dec 19, 2006 2:09 am
Posts: 5
Location: CN
Thank you very much!
I have shut the problem down. That's because I use .jar files from different hibernate release. So stupid I'm?


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.