1

In my persistence.xml file I have the following connection defined...

<jta-data-source>java:comp/env/jdbc/jee</jta-data-source>

It works well in WebSphere (in fact it's the only way I can get WebSphere to work correctly) with JPA. It also worked with TomEE.

However when I deploy it in Payara/Glassfish I get the following error

com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : java:comp/env/jdbc/jee__pm

I have verified that I enabled Allow Non Component Callers in the connection pool configuration.

I also added a glassfish-ejb-jar.xml and glassfish-application.xml with the resource refs defined as

<resource-ref>
    <res-ref-name>java:comp/env/jdbc/jee</res-ref-name>
    <jndi-name>jdbc/jee</jndi-name>
</resource-ref>
<resource-ref>
    <res-ref-name>jdbc/jee</res-ref-name>
    <jndi-name>jdbc/jee</jndi-name>
</resource-ref>
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
  • I wonder if I should just delete this as I had a more generic version of this question. http://stackoverflow.com/questions/43809960/what-to-put-into-jta-data-source-of-persistence-xml-that-works-on-all-vendors – Archimedes Trajano May 05 '17 at 17:07
  • I posted an answer in the other question. If it answers this question too, I'd close it. – OndroMih May 05 '17 at 22:28

0 Answers0