-->
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.  [ 1 post ] 
Author Message
 Post subject: hibernate.cfg.xml not found with net.sf.hibernate package
PostPosted: Wed Nov 11, 2009 2:04 am 
Newbie

Joined: Sun Feb 08, 2009 4:33 am
Posts: 8
Hi every body ,

I am using hibernate3.3.2 ,Glassfish and eclipse.
my hibernate.cfg.xml file is in my src folder and my mapping files are in src/comm just beside the persistence classes.
i use this code to save person to my database

Code:
SessionFactory sf=new Configuration().configure().buildSessionFactory();
      Session s=sf.openSession();
      Transaction txOne =  s.beginTransaction();
      Person p=new Person();
      p.setName("Joe");
      System.out.println("person created");
      s.save(p);
      System.out.println("person saved");
      txOne.commit();
      System.out.println("transaction committed");
      s.close();


when i use org.hibernate.* and org.hibernate.cfg.* every thing works fine and person is saved
But when i use net.sf.hibernate and net.sf.hibernate.cfg i get hibernate.cfg.xml not found error

do i need any extra code to be able to use net.sf.hibernate??

Any help is appreciated
Thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.