users@glassfish.java.net

Re: Error deploying web app using JPA

From: Sahoo <Sahoo_at_Sun.COM>
Date: Mon, 02 Jul 2007 10:04:52 +0530

 From the error message, it appears that the server is referring to a
persistence unit that is of type transaction-type RESOURCE_LOCAL, where
as your persistence.xml is configured as JTA. Do you have multiple
persistence.xml in StocksWeb.war?

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> Hi, I'm trying to deploy a web app which is supposed to use a Glassfish managed connection pool, but am getting this error message
>
> [code]
> DPL8011: autodeployment failure while deploying the application : Deployment Error -- The persistence-context-ref-name [StocksBean/em] in module
> [/var/lib/java/glassfish/domains/domain1/applications/j2ee-modules/StocksWeb] resolves to a persistence unit
> called [stockfoo] 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.
> "|#]
> [/code]
>
> My persistence.xml file looks like
>
> [code]
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="1.0"
> xmlns="http://java.sun.com/xml/ns/persistence">
> <persistence-unit name="stockfoo" transaction-type="JTA">
> <jta-data-source>jdbc/stockfoo</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="toplink.logging.level" value="FINEST" />
> </properties>
> </persistence-unit>
> </persistence>
> [/code]
>
> I have checked that the JDBC resource is created on the server, and that the server is pingable from the connection pool interface. What am I doing wrong here?
> [Message sent by forum member 'fawad' (fawad)]
>
> http://forums.java.net/jive/thread.jspa?messageID=224817
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>