4

My java EE application is giving following error when i try to run the application on glassfish server. It says "Invalid resource : jdbc/busservice__nontx". Where should i look to fix this error? Previously it was giving error with "jdbc/busservice__pm". Once I created JDBC resource and connected with connection pool, error disappeared. However i'm still getting error with "jdbc/busservice__nontx"

  Info:   PER02100: Could not load Toplink Essentials. Assuming this is an upgrade from V2. Switching Persistence Unit [BusReservationPU] to use [org.eclipse.persistence.jpa.PersistenceProvider] as JPA provider. If you intend to use Toplink Essentials, please ensure that it is visible to your application."
Severe:   Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
Severe:   java.lang.RuntimeException: Invalid resource : jdbc/busservice__nontx
    at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:593)
    at com.sun.enterprise.connectors.ConnectorRuntime.lookupNonTxResource(ConnectorRuntime.java:559)
    at org.glassfish.persistence.common.PersistenceHelper.lookupNonTxResource(PersistenceHelper.java:59)
    at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupNonTxDataSource(ProviderContainerContractInfoBase.java:76)
    at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:109)
    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
amal
  • 3,470
  • 10
  • 29
  • 43
  • I do not have experience with Glassfish, but try marking the DataSource as being JTA in both Glassfish and your persistence.xml file (or at least being of the same type: either resource-local or JTA). – V G Nov 28 '14 at 10:50
  • If you didnn't already solve the problem you should add your `persistence.xml` to the question. – unwichtich Nov 30 '14 at 19:00
  • see documentation http://stackoverflow.com/a/32117122/1498669 – Bernhard Aug 20 '15 at 11:43

1 Answers1

0

Do not add "jdbc/busservice__pm" to your Glassfish JDBC Resources, just add it as "jdbc/busservice". It looks like the __pm and __nontx are some internal names that it adds to the end of your jdbc name internally, and when you specifically add it will mess it up and throw that error.

nwodb.com
  • 55
  • 7