[
https://jira.jboss.org/jira/browse/EJBTHREE-1730?page=com.atlassian.jira....
]
Marc Kropholler commented on EJBTHREE-1730:
-------------------------------------------
As an alternative to commenting out the jboss beans, you can rename persistence.xml to
e.g. jpa-persistence.xml and explicitly configure
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean to use this file using
setPersistenceXmlLocation. JBoss won't throw an exception then.
Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a
non-jta-data-source for a RESOURCE_LOCAL
------------------------------------------------------------------------------------------------------------
Key: EJBTHREE-1730
URL:
https://jira.jboss.org/jira/browse/EJBTHREE-1730
Project: EJB 3.0
Issue Type: Bug
Components: ejb3
Environment: JBoss v5.0
Spring 2.5
Reporter: Spec Dev
Assignee: Carlo de Wolf
The same application that works fine in JBoss 4.2.2 fails in JBoss v5.0 with the
following exception:
13:42:16,343 ERROR [AbstractKernelController] Error installing to Start:
name=persistence.unit:unitName=#MyPU state=Create
java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not
defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named:
MyPU
The persistence unit for the application uses a datasource configured and managed by
Spring.
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="MyPU"
transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.format_sql"
value="true"/>
<property name="hibernate.order_updates"
value="true"/>
<property name="hibernate.hbm2ddl.auto"
value="validate"/>
<property name="hibernate.dialect"
value="org.hibernate.dialect.Oracle10gDialect"/>
<!-- property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JTATransactionFactory"/-->
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
</properties>
</persistence-unit>
</persistence>
--
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