-->
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.  [ 1 post ] 
Author Message
 Post subject: SAX Parser Initialization problem
PostPosted: Tue May 23, 2006 7:33 am 
Newbie

Joined: Mon May 08, 2006 12:14 am
Posts: 18
Hi,

I am running an application with hibernate on Eclipse platform. While testing with JUnit test case, I get an exception. I am using jdk1.5 and hibernate3. I am using MySQL database. I have included xml-apis.jar in the class path. Still it is giving the following exception:


INFO: Configuration resource: /hibernate.cfg.xml
Warning: Caught exception attempting to use SAX to load a SAX XMLReader
Warning: Exception was: java.lang.IllegalAccessException: Class org.xml.sax.helpers.NewInstance can not access a member of class org.orbeon.oxf.xml.XercesSAXParser with modifiers "public"
Warning: I will print the stack trace then carry on using the default SAX parser
java.lang.IllegalAccessException: Class org.xml.sax.helpers.NewInstance can not access a member of class org.orbeon.oxf.xml.XercesSAXParser with modifiers "public"
at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:74)
at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:647)
at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:530)
at org.dom4j.io.SAXReader.read(SAXReader.java:309)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1297)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1241)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1227)
at com.stabilix.utils.HibernateUtil.<clinit>(HibernateUtil.java:19)
at com.stabilix.hibernate.TestConnection.setUp(TestConnection.java:16)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
May 23, 2006 5:01:18 PM com.stabilix.utils.HibernateUtil <clinit>
SEVERE: Initial SessionFactory creation failed.
org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1307)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1241)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1227)
at com.stabilix.utils.HibernateUtil.<clinit>(HibernateUtil.java:19)
at com.stabilix.hibernate.TestConnection.setUp(TestConnection.java:16)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.dom4j.DocumentException: Could not initialize a SAX Parser. Please add a SAX parser to your classpath along with preferably jaxp.jar Nested exception: Could not initialize a SAX Parser. Please add a SAX parser to your classpath along with preferably jaxp.jar
at org.dom4j.io.SAXReader.read(SAXReader.java:358)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1297)
... 14 more


Please help in solving my problem.

Thanks in advance
Merin


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

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.