Hello!
I'm using Hibernate 2 in a Java application, which is based on eclipse RCP framework (
http://www.eclipse.org/rcp/).
When I run the application from eclipse, everything works fine.
However, when I create a stand-alone application (i. e. a Java application, which runs without eclipse), I'm getting a strange error.
When Configuration is initialized, there is a statement like
configuration.addClass(MyClass.class).
As soon as this stamenent is executed, the application "hangs". I get no error message (last message before the program hangs is "mapping resource from file X.hbm.xml"), no exceptions and nothing happens.
The same application runs without problems, if I execute it from eclipse.
I did following:
1) Verified that the classpaths in the stand-alone application are OK
2) Compared mapping documents, which work and those, which don't and found no differences in their structure. There are two classes, both of which contain only primitive properties. But one of these classes can be configured and the other not.
3) Tried to use configuration.addURL(...) instead of addClass. The mapping document can be read by the class loader, i. e. it is not null.
4) Tried to put all mappings into one XML file (instead of separate mapping file for each class).
None of these measures helped.
Please tell me
a) how I can solve, or, at least,
b) diagnose this problem (see the error, which causes configuration.addClass(...) to hang).
I appreciate any hint.
TIA
Dmitri Pissarenko