[jboss-jira] [JBoss JIRA] Created: (JBAS-6230) Programmatic configuration of hibernate fails
Penkov Vladimir (JIRA)
jira-events at lists.jboss.org
Fri Nov 21 09:35:36 EST 2008
Programmatic configuration of hibernate fails
---------------------------------------------
Key: JBAS-6230
URL: https://jira.jboss.org/jira/browse/JBAS-6230
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Hibernate service
Affects Versions: JBossAS-4.2.3.GA
Environment: Linux
Reporter: Penkov Vladimir
Assignee: Steve Ebersole
I try to programmatically configure hibernate 3.2 in MBean:
String mappings = " <?xml version=\"1.0\"?><hibernate-mapping></hibernate-mapping>";
new Configuration()
.addXML(mappings)
.setProperty("hibernate.session_factory_name", "hibernate/Test")
.setProperty("hibernate.dialect", "org.hibernate.dialect.MySQL5Dialect")
.setProperty("hibernate.connection.datasource", "java:/database")
.setProperty("hbm2ddl.auto", "update")
.setProperty("current_session_context_class", "thread").buildSessionFactory();
and recieve this exception:
org.apache.xerces.parsers.ObjectFactory$ConfigurationError: Provider PK not found
at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:51)
at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:187)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150)
at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:83)
at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)
at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)
at org.dom4j.io.SAXReader.read(SAXReader.java:435)
at org.dom4j.io.SAXReader.read(SAXReader.java:365)
at org.hibernate.cfg.Configuration.addXML(Configuration.java:435)
If I place xerces-3.2.6.jar from hibernate distribution, configuration will succeed, but jboss will not deploy any jar because it will be unable to parse descriptor
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list