This was reported by Shivaraju Gowda as Jira-4381 on 18-Sep-09. I thought it would make a good tip for others that might be creating database is directories whose pathes contain special characters. Be sure to escape special characters in the directory names used in connection URLs.
In 64 bit windows vista OS, if an executable is 32 bit than it is generally installed under "C:\Program Files (x86)" folder. The brackets in the path cause problems while connecting to any database stored in that folder(in jar format) through derby JDBC.
This fails because the closing brackets is not escaped.
The JDBC escape character is the back slash, quoting the path may also resolve this problem.