View Single Post
  #1 (permalink)  
Old 05-02-2008, 01:11 AM
sireesha sireesha is offline
Member
 
Join Date: Nov 2007
Posts: 49
sireesha is on a distinguished road
Problem with First Hibernate program
Hi EveryOne,

I downloaded hibernate-3.2.6 and i working with eclipse3.3,oracle10g and JRE 1.6.
Is it necessary to download any plugins for hibernate to use in eclipse ?
I wrote a simple java application using hibernate.To write that code i took some help from a website.Here is my directory structure...


HibernatePro1
l
l__src
l l
l l_ events
l l l_ Event.java
l l l
l l l_ Event.hbm.xml
l l
l l_ client
l l l_ TestClient.java
l l l
l l l_ EventManager.java
l l
l l__Event.cfg.xml
l l
l l
l l__log4j.properties
l
l
l__+JRE System Library
l
l__+Hibernate User Library


I included all my hibernate .jar files in "Hibernate User Library"

Now when i try to run TestClient.java i am getting exception like below
Code:
17:12:05,062 INFO Environment:514 - Hibernate 3.2.6 17:12:05,093 INFO Environment:547 - hibernate.properties not found 17:12:05,156 INFO Environment:681 - Bytecode provider name : cglib 17:12:05,171 INFO Environment:598 - using JDK 1.4 java.sql.Timestamp handling 17:12:05,390 INFO Configuration:1432 - configuring from resource: /hibernate.cfg.xml 17:12:05,390 INFO Configuration:1409 - Configuration resource: /hibernate.cfg.xml Exception in thread "main" org.hibernate.HibernateException: /hibernate.cfg.xml not found at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147) at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1411) at org.hibernate.cfg.Configuration.configure(Configuration.java:1433) at org.hibernate.cfg.Configuration.configure(Configuration.java:1420) at client.TestClient.openSession(TestClient.java:23) at client.TestClient.main(TestClient.java:48)
Is there any wrong with my directory structure ?
Can any one please help me in solving this problem.

Thank q very much,
sirisha.
Reply With Quote
Sponsored Links