11

I have checked the services tab to the left and there isn't a javaDB in the database option, there's nothing in there? i'm using jsp's and beans, is there something i'm doing wrong?.

i'm getting the message

The Java DB location is not set correctly

when i run my jsp for the first time.

John Smith
  • 276
  • 1
  • 2
  • 15
  • Is javaDB installed at all? (Could be in/via your IDE or your container for example glassfish or tomcat). If not install it, otherwise add it in the services tab. – esej Apr 29 '12 at 10:31
  • how can i add it? if i click the plus next to the databases on the services tab then nothing appears, the plus just disappears and thats it – John Smith Apr 29 '12 at 10:52
  • Possible duplicate of [the java db location is not set correctly](https://stackoverflow.com/questions/5669117/the-java-db-location-is-not-set-correctly) – Kalle Richter Jul 18 '18 at 00:54

4 Answers4

31

You have to make sure that the paths to the Java DB are actually available!

To do this please do the following:

  1. Click on "Windows" - "Services"
  2. Expand "Databases"
  3. Select "Java DB"
  4. Do a right-click and select "Properties..."
  5. Make sure that the locations are valid!

Sample paths

Java DB Installation: C:\glassfish\glassfish-3.1.2.2\javadb

Database Location: C:\Users\YourUsername.netbeans-derby

Screenshot:

enter image description here

Benny Code
  • 51,456
  • 28
  • 233
  • 198
1

Detailed instructions on how to install(probably unecessary javaDB is part of JDK6), configure and register JavaDB for Netbeans can be found @ Netbeans KB. The steps are basically:

  1. Find where javaDB is installed (search for folder "javadb" ?) or download and install it.
  2. Make/choose a directory to keep the databases in. (So now you have/know two directories)
  3. Register this info with Netbeans by specifying theese two directories.
  4. Test that it works.
esej
  • 3,059
  • 1
  • 18
  • 22
1

just re-installed netbeans, now it works fine, must of just bugged out...

John Smith
  • 276
  • 1
  • 2
  • 15
0

I downloaded the netbeans with only JavaSE. When I downloaded the full version, uninstalled the JavaSE only version and then installed the full version, I could then find glassfish under ProgramFiles and navigate to the JavaDB directory.