-->
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.  [ 1 post ] 
Author Message
 Post subject: Re: Help : java.lang.NoSuchMethodError: org.hibernate.cfg.Enviro
PostPosted: Mon Jul 16, 2012 9:22 pm 
Newbie

Joined: Mon Jul 16, 2012 9:11 pm
Posts: 1
Hi jakorsme, I was experiencing exactly the same problem. The way I was setting up the platform was the key. I was using Hibernate 3, this release has just one .jar file in its root folder known as hibernate3.jar. What I did was replace all the Hibernate 3 platform for the hibernate-release-4.1.0.Final.

In the folder "hibernate-release-4.1.0.Final\lib\required", there is a list of .jar files. I set´em up int the CLASSPATH by using a .bat file (if you´re using command-line this might be helpful) with this code:

Code:
set CLASSPATH=
for %%i in ("C:\aaron\frameworks\hibernate\hibernate-release-4.1.0.Final\lib\required\*.jar") do call :addjar %%i
goto :eof
:addjar
set CLASSPATH=%1;%CLASSPATH%
goto :eof


Then I just open console and execute the .bat and later the class containing my Hibernate code. Everythig went OK and the registries were inserted in my DB.

If you´re using an IDE like NetBeans, I recommend you to create a library core and load the .jar files contained in the Hibernate 4 platform.

Please let me know if this was helpful for you. Greetings.


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

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.