0

I'm trying to figure out where is the definition of the above resources stored. My application does not have and never had such resource defined. So I'm actually sure this is some kind of server reference but the question is where such stuff could be defined. It looks for me like some kind of cached references existing somewhere on the server and used when the same names are tried.

People advice workarounds like creating resources manually or using java:app/ prefix. However I'd like to go tot the bottom of the problem and resolve the source of the problem instead.

The contain entity manager config could be the first thing to check but where is it? What config file should I examine, modify or remove.

Here is the beginning of the error message:

Severe:   Exception while preparing the app : Invalid resource : jdbc/CustomerDEV1__nontx
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/CustomerDEV1__nontx
Bosko Mijin
  • 3,287
  • 3
  • 32
  • 45
smoczyna
  • 489
  • 6
  • 18

2 Answers2

3

To get rid of it, you´ll need to remove the persistence.xml cached by the IDE. For example (using Netbeans 8 under Windows 8.1):

C:\Users\jMarcel\AppData\Local\NetBeans\Cache\8.0\index\s71\java\14\classes\META-INF\persistence.xml

Hint: in WindowsExplorer, set your directory to C:\Users\yourUser**AppData\Local\NetBeans** and perform a search for the persistence.xml file.

jMarcel
  • 958
  • 5
  • 24
  • 54
1

I hope you are not letting the server know what type of resource you are looking up in the JNDI tree and confusing it. You look for JDBC resource in within application. Please note that if you use java:app/ then it means

The java:app namespace is used to look up local enterprise beans packaged within the same application. That is, the enterprise bean is packaged within an EAR file containing multiple Java EE modules. JNDI addresses using the java:app namespace are of the following form:

You have to use java:comp/env/jdbc/CustomerDEV1__nontx for JDBC Datasource. java:comp/env/jdbc denotes it is a JDBC resource in the Java components environment

Keerthivasan
  • 12,760
  • 2
  • 32
  • 53
  • Thank you for quick response. I definitely try your suggestion to see what happens but actually I'm not interested in using this missing resource. What I'd like to do is to get rid of the reference to this recourse instead. I'm sure my application do not call it. I can have the same entity names eventually used before so why I'm getting this error and how to fix it? I mean finding and removing the reference and not creating the resource or using prefixes. – smoczyna May 09 '14 at 11:07
  • @user3455071 May be you have configured it somewhere or an application trying to access it – Keerthivasan May 09 '14 at 13:26