[jboss-user] [Beginner's Corner] - java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction()

Liberino Covelli do-not-reply at jboss.com
Sat Aug 25 11:46:01 EDT 2012


Liberino Covelli [https://community.jboss.org/people/rino.covelli] created the discussion

"java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction()"

To view the discussion, visit: https://community.jboss.org/message/755954#755954

--------------------------------------------------------------
I'm developing my first enterpise application with jpa ejb ecc

when i try to save an object : java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction()

this è the my persistance.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.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_2_0.xsd">
    <persistence-unit name="jpa"  transaction-type="RESOURCE_LOCAL">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
         <jta-data-source>java:jboss/newDataSource</jta-data-source>
        
        <properties>
            <property name="hibernate.hbm2ddl.auto" value="create-drop"/>     
        </properties>
        
    </persistence-unit> 
</persistence>
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/755954#755954]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120825/b9ac735f/attachment-0001.html 


More information about the jboss-user mailing list