Hello,
I have a problem according to use the hibernate framework with the tomcat server. If I start my web application, I get the exception below -> if an exception occures than the tomcat server starts once again, and with the second launch all works fine,
Actually I have no idea, why this exception happens, if I had something misconfigured, than it wouldn't still work at the second time, but it works at the second time.
Could it be that I have some timing problem, because I use also the Spring Framework but in my case the Spring Framework doesn't support the Hibernate Framework, this means they are not connected.
Thanks for any help,
All the best,
Generic1
Code:
Exception in thread "Thread-1" java.lang.ExceptionInInitializerError
at net.test.hibernate.BasicManager.getSession(BasicManager.java:28)
at net.test.hibernate.EventManager.storeLogging(EventManager.java:37)
at net.test.hibernate.DatabaseInterface.createAndStoreLogging(DatabaseInterface.java:43)
at net.test.hibernate.StartDatabase.createAndStoreLogging(StartDatabase.java:185)
at net.test.service.StartService.<init>(StartService.java:17)
at net.test.contextlistener.ContextListener$1.run(ContextListener.java:22)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource net/test/hibernate/tTrend.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:616)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1635)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1603)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1582)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1556)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1476)
at net.test.hibernate.InitSessionFactory.<clinit>(InitSessionFactory.java:16)
... 6 more
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:555)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:613)
... 12 more
Caused by: org.dom4j.DocumentException: null Nested exception: null
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:546)
... 13 more
13.01.2010 14:57:43 org.hibernate.cfg.Configuration addResource