i am deploying an ear file to the orion app server and have in the root of the ear file the
hibernate.cfg.xml file. Within the ear file i have an ejb jar file that has a ejb class that calls:
Code:
Configuration cfg = new Configuration().configure();
to load the hibernate.cfg.xml file. When this happens i get an error in my log file:
INFO [RMICallHandler-4] (Configuration.java:689) - Configuration resource: /hibernate.cfg.xml
WARN [RMICallHandler-4] (Configuration.java:693) - /hibernate.cfg.xml not found
From what i have read, it appears the hibernate.cfg.xml file is usually placed in the WEB-INF/classes dir, but with an ear file (only has EJB jar files and application jar files) i do not have this directory. Therefore the question is simple, where do i place the hibernate.cfg.xml file so that it is seen by the Configuration object? The simple answer is in the root of the classpath. However based on my configuration with a single ear file that contains many jar files where the hibernate.cfg.xml file lives at the same level in the ear as the jars how do i make the hibernate.cfg.xml visible?
thanks in advance for your reply.