Hibernate and JPOS Exception

48 views
Skip to first unread message

Abbey

unread,
Aug 23, 2010, 9:23:47 AM8/23/10
to jPOS Users
Hi, I tried using Hibernate for database acitivities within my Q2
server on JPOS but I keep getting this errors

<log realm="access-server.server.session/127.0.0.1" at="Mon Aug 23
14:19:00 WAT 2010.185">
<session-error>
<exception name="null">
java.lang.ExceptionInInitializerError
at com.access.server.LogMessage.logRequest(LogMessage.java:58)
at
com.access.server.RequestProcessor.processBalance(RequestProcessor.java:
96)
at
com.access.server.RequestProcessor.process(RequestProcessor.java:45)
at org.jpos.iso.ISOServer$Session.run(ISOServer.java:135)
at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:
71)
Caused by: org.hibernate.HibernateException: Could not parse
configuration: cfg\hibernate.cfg.xml
at
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1494)
at
org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at com.access.dao.DAO.<clinit>(DAO.java:22)
... 5 more
Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory
cannot be cast to org.dom4j.DocumentFactory Nested exception:
org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1484)
... 7 more
</exception>
</session-error>
</log>
<log realm="access-server.server.session/127.0.0.1" at="Mon Aug 23
14:19:00 WAT 2010.281">

I have copied the hibernate.cfg.xml file into the cfg folders inside
deploy and even tried putting the file into cfg folder in the build
folder.

Please help me check what the issue might be.

Thanks

Alejandro Revilla

unread,
Aug 23, 2010, 11:54:19 AM8/23/10
to jpos-...@googlegroups.com
Your Hibernate configuration seems to be wrong, looks like a question for the Hibernate forum.


--
You received this message because you are subscribed to the  "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users

Mark Salter

unread,
Aug 23, 2010, 12:27:48 PM8/23/10
to jpos-...@googlegroups.com
On 23/08/2010 14:23, Abbey wrote:
> Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory
> cannot be cast to org.dom4j.DocumentFactory Nested exception:
> org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
> at org.dom4j.io.SAXReader.read(SAXReader.java:484)
> at

> I have copied the hibernate.cfg.xml file into the cfg folders inside


> deploy and even tried putting the file into cfg folder in the build
> folder.

Is your configuration valid and well structured?

>
> Please help me check what the issue might be.

The above Exception suggests a class loading issue to me, the failure

org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory

smells a little - do you have multiple classloaders?

--
Mark

Reply all
Reply to author
Forward
0 new messages