Netbeans JavaDB won't start

1.3k Views Asked by At

Similarly to https://bz.apache.org/netbeans/show_bug.cgi?id=257948 , my JavaDB connections starting going haywire a couple days ago.

They were working nicely with Netbeans 12.1 and Glassfish 5.1 and JDK 15 until two days ago. I use the embedded driver in my codebase, and I use Services -> JavaDB to inspect my tables from within the Netbeans IDE.

Two days ago, without having changed anything on my system or in my setup, Services -> JavaDB stopped connecting to the database. JavaDB simply won't start. Until two days ago, I would get a prompt asking for username and password (which were empty). Now, I just get this in the output window, with an eternal spinner saying "JavaDB starting".

I have tried uninstalling all JDKs and JREs, uninstalling Netbeans, and reinstalling again with:

  • JDK 15
  • Netbeans 12.1
  • Glassfish 5.1

But this didn't fix the issue, see screenshot. I get an eternal "Starting the Java DB server" or "Connecting to database" spinner, but no username prompt and no connection to the database : Netbeans JavaDB connection error

I also tried starting from the command line as per the instructions given here. I don't see any errors when doing that:

C:\Users\johnrdorazio>java -cp "C:\Users\johnrdorazio\GlassFish_Server\javadb\lib\derby.jar;C:\Users\johnrdorazio\GlassFish_Server\javadb\lib\derbytools.jar;C:\Users\johnrdorazio\GlassFish_Server\javadb\lib\derbynet.jar" -Dderby.system.home="C:\Users\johnrdorazio\AppData\Roaming\BibleGetOpenOfficePlugin" org.apache.derby.drda.NetworkServerControl start
Thu Oct 22 22:16:27 CEST 2020 : Gestore della sicurezza installato con i criteri di sicurezza di base del server.
Thu Oct 22 22:16:29 CEST 2020 : Server di rete Apache Derby: 10.14.2.0 - (1828579) avviato e pronto ad accettare connessioni sulla porta 1527

I have verified paths are all correct in Java DB Properties. I'm at a loss as where to go from here.

I have set the System variable JAVA_HOME to the JDK 15 path, and the System Path contains only the JAVA_HOME variable (as regards Java paths).

1

There are 1 best solutions below

0
constant283 On

I my case the problem was that JavaDB Properties had the default Java DB Installtion location:

C:\Program Files\glassfish web-5.1.0\glassfish5\javadb.

Whereas in NetBeans 12.0, the actual path to glassfish, in my case is:

C:\Program Files\eclipse-glassfish web-5.1.0\glassfish5\javadb

I corrected that by using the actual path and then JavaDB connected immediately.