users@glassfish.java.net

Hibernate and Spring not working on Glassfish 2

From: Gerald Holl <gerald_at_holl.co.at>
Date: Mon, 29 Oct 2007 12:57:25 +0100

Hello,

I'm trying to port my app from Tomcat 6 to Glassfish 2.
I'm using Spring 2 and Hibernate 3.2
In persistence.xml I set the transaction-type to RESOURCE_LOCAL but
Glassfish complains every time that this can't be used:

com.sun.enterprise.deployment.backend.IASDeploymentException: Deployment
Error -- The persistence-context-ref-name [GenericService/em] in module
[C:\glassfish\domains\domain1\applications\j2ee-modules\bla] resolves to
a persistence unit called [bla] which is of type RESOURCE_LOCAL. Only
persistence units with transaction type JTA can be used as a container
managed entity manager. Please verify your application.

Here is the persistence.xml:
http://holl.co.at/download/glassfish/persistence.txt

And Springs applicationContext.xml:
http://holl.co.at/download/glassfish/applicationContext.txt


Why is it not possible to use RESOURCE_LOCAL?

cheers,
Gerald