derby db connecting problem (using ij)

derby db connecting problem (using ij)

This problem happened to me when i tried the apache derby database (now it’s also called java db, part of jdk 6).
Trying the following command in ij (the bundled simple console) just gave me an error like this “ERROR: Unable to establish connection”:

ij> connect “jdbc:derby://localhost/firstdb;create=true”;

It’s annoying, because i didn’t know what’s wrong from the error message.
Finally, i found out the reason, which is quite trivial. That is: i should not use the double quote (”) to quote the database url. Instead, i need to use single quote (’).

Maybe it’s documented somewhere in the derby documents, which , unfortunately, i missed.

Leave a Reply

Spam Protection by WP-SpamFree