users@glassfish.java.net

transaction type JTA but no jtaDataSource

From: Johnny Tolliver <jxt_at_ornl.gov>
Date: Mon, 10 Mar 2008 10:26:50 -0400 (EDT)

[I posted this to the Netbeans J2EE mailing list over the weekend, but that
list apparently has very little traffic these days, so I'm trying here too.
Apologies if you've seen this already.]

I'm trying to use MySQL and JPA with ToplinkEssentials in a Glassfish
servlet. I've done this with both a local and remote Oracle instance, but
can't seem to get it working with MySQL on localhost. The error message I
get is:

PersistenceUnitInfo xxx has transactionType JTA, but doesnt have
jtaDataSource

The salient parts of persistence.xml are

  <persistence-unit name="SpediaAuthPersistenceUnit" transaction-type="JTA">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <jta-data-source>jdbc/spedia</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="toplink.ddl-generation" value="create-tables"/>
    </properties>
  </persistence-unit>

And jdbc/spedia is setup in sun-resources.xml to point to a MySQL connection
pool defined in the Glassfish admin interface with transaction support
enabled.

I've tried every combination of JTA, no JTA, RESOURCE_LOCAL, etc. I can
think of.

Any ideas? Thanks. This is with NB 6.1beta on Mac OS X (so Java 5), by the
way, and Glassfish v2u1.

Johnny S. Tolliver
Oak Ridge National Laboratory
tolliverjs_at_ornl.gov, 865-574-1305