• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Initial SessionFactory creation exception with RAD

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
His brain is the size of a cherry pit! About the size of this ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic