Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.0
Name and version of the database you are using:
"DB2 v8.1.1.64", "s040812", "U498350", and FixPak "7"
The generated SQL (show_sql=true):
Issue:
We keep getting the following error randomly on one of the servers. I did make sure that the hibernate.cfg.xml is at the proper location. Also, the following error can be resolved if I bounce the servers. ( we are using the Websphere server on AIX):
Stack Trace:
com.foo.foobar.exception.fooappManagedException: Error Creating a Hibernate Session : Could not parse configuration: /opt/SBM/conf/hibernate.cfg.xml
at com.foo.foobar.DomUtils.DomPersistenceMgr.getHibernateSession(DomPersistenceMgr.java:60)
at com.foo.foobar.DomUtils.DomPersistenceMgr.lookupCustomerIntakeById(DomPersistenceMgr.java:1002)
at com.foo.foobar.adapters.bizsolo.LoadfoobarIntake.commit(LoadfoobarIntake.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.foobar.BizSolo.beans.EPFactoryBean.a(Unknown Source)
at com.foobar.BizSolo.beans.EPFactoryBean.executeAction(Unknown Source)
at com.foobar.BizSolo.beans.EPFactoryBean.executeAction(Unknown Source)
at com.foobar.BizSolo.tags.ExecuteActionTag.doEndTag(Unknown Source)
at com.ibm._jsp._Start._jspx_meth_bizsolo_executeAction_4(_Start.java:9240)
at com.ibm._jsp._Start._jspService(_Start.java:4621)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java(Inlined Compiled Code))
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: java.lang.ExceptionInInitializerError
at com.foo.foobar.DomUtils.HibernateUtil.createFactory(HibernateUtil.java:113)
at com.foo.foobar.DomUtils.HibernateUtil.getSessionFactory(HibernateUtil.java:76)
at com.foo.foobar.DomUtils.DomPersistenceMgr.getHibernateSession(DomPersistenceMgr.java:45)
... 33 more
Caused by: org.hibernate.HibernateException: Could not parse configuration: /opt/SBM/conf/hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1418)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1386)
at com.foo.foobar.DomUtils.HibernateUtil.createFactory(HibernateUtil.java:105)
... 35 more
Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1408)
... 37 more
Debug level Hibernate log excerpt:
[6/20/07 8:24:46:830 PDT] 0000049a SystemErr R org.hibernate.HibernateException: Could not parse configuration: .../conf/hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1418)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1386)
at com.foo.foobar.DomUtils.HibernateUtil.createFactory(HibernateUtil.java:105)
at com.foo.foobar.DomUtils.HibernateUtil.getSessionFactory(HibernateUtil.java:76)
at com.foo.foobar.DomUtils.DomPersistenceMgr.getHibernateSession(DomPersistenceMgr.java:45)
at com.foo.foobar.DomUtils.DomPersistenceMgr.lookupCustomerIntakeById(DomPersistenceMgr.java:1002)
at com.foo.foobar.adapters.bizsolo.LoadfoobarIntake.commit(LoadfoobarIntake.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.foobar.BizSolo.beans.EPFactoryBean.a(Unknown Source)
at com.foobar.BizSolo.beans.EPFactoryBean.executeAction(Unknown Source)
at com.foobar.BizSolo.beans.EPFactoryBean.executeAction(Unknown Source)
at com.foobar.BizSolo.tags.ExecuteActionTag.doEndTag(Unknown Source)
at com.ibm._jsp._Start._jspx_meth_bizsolo_executeAction_4(_Start.java:9240)
at com.ibm._jsp._Start._jspService(_Start.java:4621)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java(Inlined Compiled Code))
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1408)
... 37 more