Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Eclipse application using Hibernate
Eclipse application using Hibernate [message #75085] Wed, 19 December 2007 04:33
trushna is currently offline trushnaFriend
Messages: 24
Registered: July 2009
Junior Member
Hi all,

There are 2 different projects in my workspace. Project A and
A is dependent on B. A has a java class X(say) that uses hibernate to
fetch data from database.
.hbm.xml files and corresponding classes needed for the same are
in project B and under same package. When i run class X individually
(using public static void main...), it works fine. But when i try to run
the project as eclipse application, it doesnt find hibernate.cfg.xml. If i
hardcode the file path(which is not right way of doing it) in my class
while calling .configuer(path), it gets the file but doesnt find any
class which is mentioned in .hbm.xml file.
My hibernate.cfg.xml is in project B. Even if i place it in
project A it gives same problem. I tried placing it under root dir/ in
src, in both the projects but faced same problem.
I tried adding all the properties and classes through code using
configure.addClass(..) and configure.setProperty(..). Still it didnt work.

Can anybody help?
Previous Topic:Eclipse Group Growing on
Next Topic:Eclipse application using Hibernate
Goto Forum:

Current Time: Wed Feb 28 17:31:08 GMT 2024

Powered by FUDForum. Page generated in 0.02688 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top