• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Initial SessionFactory creation exception with RAD  RSS feed

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i am using RAD with Sybase 11.9.x and jconn2.jar as driver and hibernate3.jar. I followed all the steps given in tutorial found on the hibernate home page.

but when i start my server, i am getting following error even though i have put hibernate.cfg.xml under JavaSource root of the websphere.

Initial SessionFactory creation failed.org.hibernate.HibernateException: /hibernate.cfg.xml not found
Initial SessionFactory creation failed.org.hibernate.HibernateException: /hibernate.cfg.xml not found
Initial SessionFactory creation failed.org.hibernate.HibernateException: /hibernate.cfg.xml not found
Initial SessionFactory creation failed.org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml

Can anybody let me know problem?
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the hibernate.cfg.xml needs to be on the classpath, not in the source tree.

use the search function of the forum or google. actualy you should have done this before....

pascal
 
pramodh somashekara
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, in RAD JavaSource will be on classpath by default. Even after this, I was getting the error.

Actually in the cfg.xml file,

<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

I had removed "http://hibernate.sourceforge.net/" and had put actual dtd in the same folder as I was getting 'Unable to connect to host: http://hibernate.sourceforge.net' error in the RAD IDE.

Now I added it again to the dtd, and its working now.

But IDE shows 'Unable to connect to host: http://hibernate.sourceforge.net'

Can you tell what is the problem with RAD IDE?
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I remember RAD correctly you need to configure whether to allow it to look up DTDs over the network somewhere. Unfortunately I no longer have it installed so can't really help. Instead (since its not really a Hibernate question) I'll move this to the IDE forum, see if anyone else can help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!