-
1. Re: jboss-as-7.0.2.Final - /hibernate.cfg.xml not found
smarlow Nov 11, 2011 5:31 PM (in response to srikrishnak)It probably won't make a difference but could you try to recreate with the nightly build? Link for the nightly build is community.jboss.org/thread/167590
How are you associating your web application with the Hibernate jars? Perhaps adding a dependency on the shared "org.hibernate" module? Or including Hibernate jars with the application? If your including Hibernate jars with the application, which version of Hibernate are you including?
-
2. Re: jboss-as-7.0.2.Final - /hibernate.cfg.xml not found
srikrishnak Nov 14, 2011 11:37 AM (in response to smarlow)Hi Scott,
Thanks for the reply. Sorry, I missed to give out the detail about how I added hibernate. Yes, through META-INF/MANIFEST.MF file as follows:
"Dependencies: org.hibernate, org.apache.log4j"
I'll try out the nightly build and will let you know.
Thanks
Srikrishna Kalavacharla
-
3. Re: jboss-as-7.0.2.Final - /hibernate.cfg.xml not found
srikrishnak Nov 14, 2011 5:51 PM (in response to srikrishnak)Hi Scott,
I've tried the nightly build you have suggested (jboss-as-7.1.0.Alpha2-SNAPSHOT) and as you have suspected, it did not make any difference and I still get the same error as follows:
Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found
Thanks
Srikrishna Kalavacharla
-
4. Re: jboss-as-7.0.2.Final - /hibernate.cfg.xml not found
smarlow Nov 14, 2011 6:58 PM (in response to srikrishnak)Hi Srikrishna,
I would like to see the exception call stack that goes with the HibernateException, could you attach the as7/standalone/logs/server.log file (or a http://pastebin.com link to the contents).
Scott
-
5. Re: jboss-as-7.0.2.Final - /hibernate.cfg.xml not found
srikrishnak Apr 17, 2012 3:37 PM (in response to smarlow)Hi Scott,
I've fixed the issue by copying all the jar files into WEB-INF/lib folder. Now I'm trying to upgrade to 7.1.1.Final, I'm facing the same issue. I've tried doing the same (copying modules/org/hibernate/* jar files to WEB-INF/lib folder), but it did not do the trick this time. I've also tried moving the hibernate.cfg.xml around and trying to load it from a specific location (EX: "/com/companyname/repository/pojo/hibernate.cfg.xml") but with no luck. I'm thinking of trying to add a persistence.xml file in META-INF folder and also try adding a jboss-deployment-structure.xml file. Do you have any suggestions?
Thanks
Srikrishna Kalavacharla
-
6. Re: jboss-as-7.0.2.Final - /hibernate.cfg.xml not found
srikrishnak Jul 10, 2012 11:34 AM (in response to srikrishnak)If you try loading hibernate resources using a static block and if you try accessing these resources before the caller finishes initialization (Ex: before @PostConstruct is called or in the Constructor), you get this issue. Moving the logic which calls hiberante resources to @PostConstruct in case of a @Singleton and calling the resources in a non-static way, resolves this issue.
-
7. Re: jboss-as-7.0.2.Final - /hibernate.cfg.xml not found
jaikiran Jul 11, 2012 1:55 AM (in response to srikrishnak)I thought we had fixed the issue where the classloader wasn't being set to the deployment classloader when the component classes were being loaded and their static block was being executed. Would you be able to attach a simple application which reproduces this?