Sanford
2007-04-20 14:30:05 UTC
I had hibernate working fine in the Netbeans 5.5 IDE when I wasn't using Netbeans as a rich client platform. Hibernate isn't working now.
In Netbeans, I've created a module suite project. Also created a couple of module projects. I installed hibernate under a library wrapper project. My module projects have a dependency to the hibernate library wrapper. Hibernate runs just fine, but it can't find the hibernate.cfg.xml file or the class mapping files.
I was able to work around finding the hibernate.cfg.xml file by specifying a path (but this obviously isn't ideal):
File configFile = new File("d:\dev\projects\hibernate.cfg.xml");
Configuration cfg = new Configuration();
cfg.configure(filename);
I'm using the following method to lookup the mapping files:
cfg.addclass(org.sanford.model.Class1.class);
Before moving to Netbeans as a platform, this successfully found the mapping file in org\sanford\model\build\classes.
I could really use some help figuring out where to put the hibernate.cfg.xml and mapping files and how to instruct NetBeans platform to reference them.
Thanks,
Andy
In Netbeans, I've created a module suite project. Also created a couple of module projects. I installed hibernate under a library wrapper project. My module projects have a dependency to the hibernate library wrapper. Hibernate runs just fine, but it can't find the hibernate.cfg.xml file or the class mapping files.
I was able to work around finding the hibernate.cfg.xml file by specifying a path (but this obviously isn't ideal):
File configFile = new File("d:\dev\projects\hibernate.cfg.xml");
Configuration cfg = new Configuration();
cfg.configure(filename);
I'm using the following method to lookup the mapping files:
cfg.addclass(org.sanford.model.Class1.class);
Before moving to Netbeans as a platform, this successfully found the mapping file in org\sanford\model\build\classes.
I could really use some help figuring out where to put the hibernate.cfg.xml and mapping files and how to instruct NetBeans platform to reference them.
Thanks,
Andy