Question

I have just re-installed NetBeans 8.0 and now I can't access anymore the database my project works with. During the deployment of the project I receive this message in the logs of GlassFish 4.0: SEVERE: Exception while preparing the app : Invalid resource : jdbc/qcm__pm

It's the same for all my projects with different databases.

With the previous version of NetBeans 8.0 I had no problem at all.

The definition of the databases are given with a glassfish-resource.xml file. There is no problem if I define the database directly in GlassFish (definition of a connection pool and JDBC resource with the domain admin console of GlassFish).

The problem happens with old databases and new ones.

I have no problem if I work with the sample database of Java DB.

I am a teacher and most of my students have the same problem (they have just installed NetBeans too). Few of them have no problem; we didn't see a significant difference between the versions of the tools (an older version of Java DB).

The versions I use: GlassFish 4.0 (build 89), Java DB 10.9.1.0, NetBeans 8.0 (Build 201403101706), Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01, Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11, Windows 7 version 6.1 running on x86

Did someone encounter the same problem?

Could you help me to find the reason of this problem? I suspect a problem with glassfish-resource.xml but I could not modify it to solve the problem. I don't want to use a direct definition of the database with the admin console of GlassFish.

Thanks in advance for your help.

Was it helpful?

Solution

There is certainly a bug in the last version of GlassFish (or a bug of NetBeans which does not load glassfish-resources.xml as a resource into GlassFish before deploying the application?).

In order to use glassfish-resources.xml like before, I had to add a new GlassFish 4.0 server with a domain not in the Roaming directory of Windows but under my home directory (C:\users\myname). It works very well now with this new server.

By default, the domain for the GlassFish server was created under the Roaming directory (under Appdata).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top