JBoss Community

Re: jbpm No persistence provider for EntityManager named org.drools.task

created by RSTVMA LDHYAGF in jBPM - View the full discussion

hey Mauricio Salatino,

 

I do have persistence.xml like this:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

 

- <persistence version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/persistence">

 

 

<persistence-unit name="org.drools.task">

 

 

<provider>org.hibernate.ejb.HibernatePersistence</provider>

 

 

<class>org.jbpm.task.Attachment</class>

 

 

<class>org.jbpm.task.Content</class>

 

 

<class>org.jbpm.task.BooleanExpression</class>

 

 

<class>org.jbpm.task.Comment</class>

 

 

<class>org.jbpm.task.Deadline</class>

 

 

<class>org.jbpm.task.Comment</class>

 

 

<class>org.jbpm.task.Deadline</class>

 

 

<class>org.jbpm.task.Delegation</class>

 

 

<class>org.jbpm.task.Escalation</class>

 

 

<class>org.jbpm.task.Group</class>

 

 

<class>org.jbpm.task.I18NText</class>

 

 

<class>org.jbpm.task.Notification</class>

 

 

<class>org.jbpm.task.EmailNotification</class>

 

 

<class>org.jbpm.task.EmailNotificationHeader</class>

 

 

<class>org.jbpm.task.PeopleAssignments</class>

 

 

<class>org.jbpm.task.Reassignment</class>

 

 

<class>org.jbpm.task.Status</class>

 

 

<class>org.jbpm.task.Task</class>

 

 

<class>org.jbpm.task.TaskData</class>

 

 

<class>org.jbpm.task.SubTasksStrategy</class>

 

 

<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>

 

 

<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>

 

 

<class>org.jbpm.task.User</class>

 

 

- <properties>

 

 

<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />

 

 

<property name="hibernate.connection.driver_class" value="org.h2.Driver" />

 

 

<property name="hibernate.connection.url" value="jdbc:h2:mem:mydb" />

 

 

<property name="hibernate.connection.username" value="sa" />

 

 

<property name="hibernate.connection.password" value="sasa" />

 

 

<property name="hibernate.connection.autocommit" value="false" />

 

 

<property name="hibernate.max_fetch_depth" value="3" />

 

 

<property name="hibernate.hbm2ddl.auto" value="create" />

 

 

<property name="hibernate.show_sql" value="true" />

 

</properties>

</persistence-unit>

</persistence>

 

but still when i run it now i got errors like this

 

028/06 16:08:25,500[main] ERROR ejb.packaging.PersistenceXmlLoader.fatalError  - Error parsing XML: XML InputStream(2) The processing instruction target matching "[xX][mM][lL]" is not allowed.

javax.persistence.PersistenceException: Unable to configure EntityManagerFactory

at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
at example.ExapmleMainClass.main(ExapmleMainClass.java:51)

Caused by: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.hibernate.ejb.packaging.PersistenceXmlLoader.loadURL(PersistenceXmlLoader.java:70)
at org.hibernate.ejb.packaging.PersistenceXmlLoader.deploy(PersistenceXmlLoader.java:89)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:222)
... 4 more

Reply to this message by going to Community

Start a new discussion in jBPM at Community