-->
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 with Weblogic 8.13 - Newbie
PostPosted: Thu Dec 30, 2004 11:08 am 
Newbie

Joined: Thu Dec 30, 2004 11:02 am
Posts: 2
Location: India
Hi All ,

A very happy new years eve - eve to everyone

I am trying to use Hibernate 2 with Weblogic 8.13 and am facing a strange problem, I have kept my hibernate2.jar and the hibernate.cfg.xml in the <project>/APP-INF/lib folder and when I try to build a session factory using the following line

SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();

I get a

net.sf.hibernate.HibernateException: /hibernate.cfg.xml not found
at net.sf.hibernate.cfg.Configuration.getConfigurationInputStream(Config
uration.java:849)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:873)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:860)


Any thoughts would be really helpful.

_________________
Thanks,
Amol


Top
 Profile  
 
 Post subject: Hibernate with Weblogic 8.13 - Newbie
PostPosted: Thu Dec 30, 2004 11:35 am 
Newbie

Joined: Thu Dec 30, 2004 11:02 am
Posts: 2
Location: India
no thoughts .. anyone ?

It works great of I give an absolute path for the cfg file..

_________________
Thanks,
Amol


Top
 Profile  
 
 Post subject: Re: Hibernate with Weblogic 8.13 - Newbie
PostPosted: Thu Dec 30, 2004 1:29 pm 
Regular
Regular

Joined: Sun Aug 01, 2004 6:49 pm
Posts: 76
Don't know Weblogic in detail but I assume your lib directory is not in the classpath. I think only the jars in the lib dir are made available to your application. Put hibernate.cfg.xml in a directory like "classes" or in your application jar/war whatever you use?!

HTH
Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 05, 2005 11:25 pm 
Newbie

Joined: Sun Dec 19, 2004 9:52 pm
Posts: 1
hibernate.cfg.xml is not found in your classpath.
so, if your application is a web application, put the file under
\WEB-INF\classes.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 7:17 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
borland2004's post is correct:
- Place all jar files in APP_INF/lib
- Place hibernate.cfg.xml in your classes directory

I have exactly the same setup running in a production environment on WLS 8.13


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.