Yes, I can ping the datasource from the admin GUI with no problems. And no, there are no NPEs before the EclipseLink exception. The full error log is below.
Since I'm specifying the jta-data-source in the persistence.xml and not the individual properties, I don't know how to force it to use the javax.persistence.jdbc properties instead of the eclipselink.jdbc properties. Again, this error is generated when I use the JPA tools and tell it generate the tables from the entities. When I run the actual application, I don't get any error messages in server.log or the eclipse log, but the EntityManager reference doesn't get injected and is null.
[EL Info]: property eclipselink.jdbc.user is deprecated, property javax.persistence.jdbc.user should be used instead.
[EL Info]: property eclipselink.jdbc.driver is deprecated, property javax.persistence.jdbc.driver should be used instead.
[EL Info]: property eclipselink.jdbc.url is deprecated, property javax.persistence.jdbc.url should be used instead.
[EL Info]: property eclipselink.jdbc.password is deprecated, property javax.persistence.jdbc.password should be used instead.
[EL Config]: The access type for the persistent class [class com.leadingstep.test.db.School] is set to [FIELD].
[EL Config]: The access type for the persistent class [class com.leadingstep.test.db.User] is set to [FIELD].
[EL Config]: The alias name for the entity class [class com.leadingstep.test.db.School] is being defaulted to: School.
[EL Config]: The column name for element [field itemID] is being defaulted to: ITEMID.
[EL Config]: The column name for element [field schoolName] is being defaulted to: SCHOOLNAME.
[EL Config]: The alias name for the entity class [class com.leadingstep.test.db.User] is being defaulted to: User.
[EL Config]: The column name for element [field itemID] is being defaulted to: ITEMID.
[EL Config]: The column name for element [field userName] is being defaulted to: USERNAME.
[EL Info]: property eclipselink.jdbc.user is deprecated, property javax.persistence.jdbc.user should be used instead.
[EL Info]: property eclipselink.jdbc.driver is deprecated, property javax.persistence.jdbc.driver should be used instead.
[EL Info]: property eclipselink.jdbc.url is deprecated, property javax.persistence.jdbc.url should be used instead.
[EL Info]: property eclipselink.jdbc.password is deprecated, property javax.persistence.jdbc.password should be used instead.
[EL Info]: EclipseLink, version: Eclipse Persistence Services - 2.0.0.v20091127-r5931
[EL Severe]: Local Exception Stack:
Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot acquire data source [jdbc/testDB].
Internal Exception: javax.naming.NamingException: Lookup failed for 'jdbc/testDB' in SerialContext [Root exception is javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext [Root exception is java.lang.NullPointerException]]
at org.eclipse.persistence.exceptions.ValidationException.cannotAcquireDataSource(ValidationException.java:451)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:116)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
at org.eclipse.jpt.eclipselink.core.ddlgen.Main.perform(Main.java:85)
at org.eclipse.jpt.eclipselink.core.ddlgen.Main.execute(Main.java:76)
at org.eclipse.jpt.eclipselink.core.ddlgen.Main.main(Main.java:63)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/testDB' in SerialContext [Root exception is javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext [Root exception is java.lang.NullPointerException]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:569)
at javax.naming.InitialContext.lookup(InitialContext.java:396)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:110)
... 11 more
Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext [Root exception is java.lang.NullPointerException]
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:276)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
... 14 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:297)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:271)
... 15 more
[Message sent by forum member 'drrevis' (renee_at_leadingstep.com)]
http://forums.java.net/jive/thread.jspa?messageID=384176