2007 Dec 07 12:54 PM
Hello!
I have a library project that contains hibernate 3 jars which I deployed
on the server. From an EAR I can access the contained classes, initialize
and use them.
Now I created a project that contains all my persistence code. I created
a jar file from the contents and inserted that jar into a j2ee library component
which I deployed onto the server. The deployment process succeeded.
Now I wrote my login module, created a jar and inserted that jar into a
j2ee component library which I also deployed on the server. Then I
referenced and registered the new login module library in order to ensure
the module is accessed during the next login process.
In the logfiles I can see, that the module is accessed. Unfortunately it
fails, when the persistence code tries to initialize the hibernate library.
It tells me, that hibernate.cfg.xml (which is in the root of the persistence jar)
is missing. I narrowed that down to a problem with the classloader.
The hibernate configuration code uses
Thread.currentThread().getContextClassLoader() for loading the hibernate.cfg.xml
resource.
Has anyone encountered any similar problems? Has anyone information about
the classloader hierarchy that is associated with the login process.
Kind regards,
Christian Kreutzfeldt
2007 Dec 11 1:43 PM