-->
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: Hibernate classpath issue: Run time error
PostPosted: Thu Sep 29, 2011 9:36 pm 
Newbie

Joined: Thu Sep 29, 2011 9:01 pm
Posts: 3
I am using eclipse-helios to learn and try out some hibernate tutorials . I am having issue of " classes not found errors " during run time of my code on all these jars listed below even though the User Library I have created has all these jars in it.

Here is my set up.

I have created a User Library in eclipse( called HibLib) and added all the third party jars required by the Hibernate. These jars are as follows.
antlr-2.7.6
commons-collections-3.1
dom4j-1.6.1
hibernate3
hibernate-commons-annotations
javassist-3.9.0.GA
log4j
slf4j-log4j12
cglib-2.2
ejb3-persistence
hibernate-annotations
hibernate-jpa-2.0-api-1.0.1.Final
jta-1.1
slf4j-api-1.5.8
derbyclient

Then I added the HibLib to the Build Path of my project in the eclipse.
With this arrangement, I can compile my code fine. However , during run time none of these jars are getting added to the classpath there by resulting in "Class not found " errors. Only way I can get rid of these error is to add all the above jars to my jdk installation directory.
C:\OS\Java\jdk1.6.0_07\jre\lib\ext .

Is there any way to make the User Library HibLib to be added to the class path during runtime so that I do not need to add these jars to the jdk installation directory .

Appreciate any help here.
Thanks,


Top
 Profile  
 
 Post subject: Re: Hibernate classpath issue: Run time error
PostPosted: Fri Sep 30, 2011 10:20 am 
Newbie

Joined: Fri May 13, 2011 9:51 am
Posts: 3
Make sure to select the jars in the Build Configuration Binary Build before you do the export.

eric


Top
 Profile  
 
 Post subject: Re: Hibernate classpath issue: Run time error
PostPosted: Fri Sep 30, 2011 11:51 am 
Newbie

Joined: Thu Sep 29, 2011 9:01 pm
Posts: 3
emrivera wrote:
Make sure to select the jars in the Build Configuration Binary Build before you do the export.

eric


Eric, thank you.. But there is no such thing as export in the Eclipse environment. All I can do is to add the User library you created to the Build path, which I have done.

thanks.


Top
 Profile  
 
 Post subject: Re: Hibernate classpath issue: Run time error
PostPosted: Fri Sep 30, 2011 3:50 pm 
Newbie

Joined: Fri May 13, 2011 9:51 am
Posts: 3
If you double-click the plugin.xml file or the MANIFEST.MF file on the Package Explorer the editor will open. Select the Overview tab and under the title "Exporting" click the "Build Configuration" ( number 3). The Build Configuration page opens, and under "Binary Build" check your jar files.

eric


Top
 Profile  
 
 Post subject: Re: Hibernate classpath issue: Run time error
PostPosted: Sat Oct 01, 2011 6:10 am 
Newbie

Joined: Thu Sep 29, 2011 9:01 pm
Posts: 3
Thanks Eric. I was able to resolve the issue.


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.