-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Problems migrating from Windows 2000 to Linux
PostPosted: Wed May 12, 2004 7:11 pm 
Senior
Senior

Joined: Wed Mar 24, 2004 11:40 am
Posts: 146
Location: Indianapolis, IN, USA
I am using Hibernate 2.1.2 with Resin 2.1.6 as my Application Server.

This topic may have been discussed before and I apologize in advance if it has. The issue I have is with the Configuration object being unable to find hibernate.cfg.xml file when I move my code to Linux.

I tried doing both

Code:
sessionFactorySAP = new Configuration().configure().buildSessionFactory();


and
Code:
sessionFactorySAP = new Configuration("/hibernate.cfg.xml").configure().buildSessionFactory();


Both work on the Windows machine. But on my Linux machine I get the following stack trace.

Code:
net.sf.hibernate.HibernateException: problem parsing configuration/hibernate.cfg.xml
  at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:917)
  at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856)
  at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:842)
  at com.foo.bar.utilities.HibernateManager.<clinit>(Unknown Source)
  at com.foo.bar.dao.user.UserDAO.search(Unknown Source)
  at com.foo.bar.control.site.access.LoginAction.update(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
  at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:252)
  at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
  at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
  at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
  at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
  at com.caucho.server.http.Invocation.service(Invocation.java:312)
  at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342)
  at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272)
  at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
  at java.lang.Thread.run(Thread.java:534)
Caused by: org.dom4j.DocumentException: Validation not supported for XMLReader: com.caucho.xml.Xml@171120a Nested exception: http://xml.org/sax/features/validation Nested exception: Validation not supported for XMLReader: com.caucho.xml.Xml@171120a Nested exception: http://xml.org/sax/features/validation
  at org.dom4j.io.SAXReader.read(SAXReader.java:358)
  at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:912)
  ... 23 more


I am not discounting the fact that this could also be caused by the following issue: http://www.hibernate.org/120.html#A11

But I don't understand why everything works fine on my NT box but won't on Linux. I have not changed the Parser settings on my Windows box.

Any suggestions?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 13, 2004 1:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Code:
"Caused by: org.dom4j.DocumentException: Validation not supported for XMLReader: com.caucho.xml.Xml@171120a Nested exception: http://xml.org/sax/features/validation Nested exception: Validation not supported for XMLReader: com.caucho.xml.Xml@171120a Nested exception: http://xml.org/sax/features/validation"


You are using a parser (caucho) which don't supports validation ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 13, 2004 9:46 am 
Senior
Senior

Joined: Wed Mar 24, 2004 11:40 am
Posts: 146
Location: Indianapolis, IN, USA
Max,

I notice that but I am using the same parser on the NT box as well and it isn't giving me any problems. I was wondering what would make a difference on Linux.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 13, 2004 10:07 am 
Senior
Senior

Joined: Wed Mar 24, 2004 11:40 am
Posts: 146
Location: Indianapolis, IN, USA
I finally figured out what the problem was. I was using Resin 2.1.12 on the NT Box and the Linux box has Resin 2.1.6 on it. The parser for the older version of Resin does not support validation. The solution is available at the following URL: http://www.caucho.com/quercus/faq/question.xtp?question_id=295

Sorry for the confusion.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.