-->
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.  [ 7 posts ] 
Author Message
 Post subject: Could not configure datastore from input stream
PostPosted: Fri Nov 07, 2003 11:49 am 
Newbie

Joined: Fri Nov 07, 2003 11:41 am
Posts: 1
I am trying to launch an application which uses hibernate to have access to a database and when we run this application we have the following output traces.

Here are the output traces :

[ INFO] 16:36:59 - net.sf.hibernate.cfg.Configuration.addClass - Mapping resource: direm/persist/metier/Annulation.hbm.xml
[ERROR] 16:36:59 - net.sf.hibernate.cfg.Configuration.addInputStream - Could not configure datastore from input stream
org.dom4j.DocumentException: Validation not supported for XMLReader: org.dom4j.io.aelfred.SAXDriver@12b996 Nested exception: http://xml.org/sax/features/validation Nested exception: Validation not supported for XMLReader: org.dom4j.io.aelfred.SAXDriver@12b996 Nested exception: http://xml.org/sax/features/validation

I dot not understand what this exception deal with. Does anyone get this exception ? Then could he explain to me how to fix it ?

Ronan Guillory


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2003 11:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Looks like you need a validating XML parser. (I think)


Top
 Profile  
 
 Post subject: Still suffering
PostPosted: Sun Jan 18, 2004 4:08 pm 
Newbie

Joined: Sun Jan 18, 2004 4:05 pm
Posts: 5
Ok Guys I don't know if anyone out there was able to resolve this error, but I've been trying to resolve it for the past 24 hours, it's killing me especially that the code is working on my development environment but then it crashes when I upload it to my production machine!!!! I know it's got to be a configuration issue, but I can't seem to find it. HELP


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2004 8:31 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
We don't even know your configuration. How should we be able to help?

http://www.hibernate.org/ForumMailingli ... AskForHelp

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Ureka!
PostPosted: Mon Jan 19, 2004 1:25 am 
Newbie

Joined: Sun Jan 18, 2004 4:05 pm
Posts: 5
ok, sice I typed this message 12 hours ago, I haven't moved from my seat, but I have resolved that problem, I may not understansd the solution, but it works: Here is what I've found out :

- The error is due to the fact that the DOM4J pakcage does not have it's own SAX parser, so it uses any SAX parser provided to it in the classpath.
- According to the DOM4J documentation and I quote

Quote:
dom4j works with any SAX parser via JAXP. So putting a recent distribution of crimson.jar or xerces.jar on the CLASSPATH will allow Crimson or Xerces's parser to be used


- I had xerces.jar, aml-apis.jar and jaxp.jar in the classpath and in the lib directory of my resin webserver and it still gave me this error.

- The minute I put in crimson.jar it worked

Now for the interesting bit:
On my development environment I don't have crimson, in fact my production environment is a carbon copy of my development, with the exception of crimson now, the only other difference is that one machine is Linux (running on Intel) and the Other is Solaris (running on Sparc) of course the java distributions are slightly different, but Crimson does not come packaged with JDK so I'm at a loss as to why it was working on one end and not the other

As always we are logical people and every thing has a reason but for the lofe of me I can't find it, I intend to take the time after I'm done with the project and look into this more and as always I intend to keep you all informed should I come to any conclusions.


Top
 Profile  
 
 Post subject: Re: Ureka!
PostPosted: Mon Jan 19, 2004 9:47 am 
Senior
Senior

Joined: Wed Aug 27, 2003 6:04 am
Posts: 161
Location: Linz, Austria
nhenein wrote:
the only other difference is that one machine is Linux (running on Intel) and the Other is Solaris (running on Sparc) of course the java distributions are slightly different, but Crimson does not come packaged with JDK so I'm at a loss as to why it was working on one end and not the othe.


In fact, Crimson does come packaged with all Sun 1.4.x JDKs as the default JAXP implementation, in a slightly modified Sun version. After all, maybe there is a difference between the Linux and Solaris JDKs that you use?

Juergen


Top
 Profile  
 
 Post subject: A found solution
PostPosted: Wed Mar 17, 2004 12:19 pm 
Beginner
Beginner

Joined: Wed Dec 03, 2003 2:43 pm
Posts: 22
Hi,

This is for anyone who has this issue with resin in the future. I debugged this (resin 2.1.10/ jsk 1.4.1 / hibernate 2.1 though this a dom4j issue) and found the following result. In resin 2.1.10 there is a configuration option:
Code:
<!--
     - If true, the classloader order follows the Servlet spec.
     - If false, the classloader order follows the JDK spec.
    -->
  <servlet-classloader-hack>false</servlet-classloader-hack>


When this is set to true, my XML processing crashes. Specifically, it could not load hibernate.cfg.xml. When I set it to false (the resin default) this works fine.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.