Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1730

Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ejb3
    • Environment:

      JBoss v5.0
      Spring 2.5

      Description

      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>

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                wolfc Carlo de Wolf
                Reporter:
                spectdev Spec Dev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: