teamderby wrote:
Emmanuel,
Thanks for your reply. I have tried using derby.jar instead of
derbyclient.jar and the result is exactly the same. Is there any more advice
you can give me?
Hi Mike,
The error message you gave, means one of two things;
1) The URL is not a Derby URL (i.e. typos, wrong protocol etc).
2) The required Derby driver (derby.jar or derbyclient.jar) isn't in
the classpath.
By looking at the code you posted, the only way I can see it failing as
you describe, is that you are loading the wrong driver.
For the embedded driver (derby.jar:
org.apache.derby.jdbc.EmbeddedDriver) the URL must start with
"jdbc:derby:DBNAME".
For the client driver (derbyclient.jar:
org.apache.derby.jdbc.ClientDriver) the URL must start with
"jdbc:derby://HOSTNAME[:PORT]/DBNAME".
If you are sure you have specified the correct path, and it still
doesn't work, this sounds like a classloader issue to me.
I don't know Tomcat, but have you placed the jar in the correct directory?
Are you sure it actually uses the environment variable you have modified?
It's also possible that a ClassNotFoundException is thrown and you
overlooked the error message, but if you're sure you have looked in the
correct log file that's not what's going on either...
Regards,
--
Kristian
Thanks,
Mike
Emmanuel Cecchet-5 wrote:
Michael,
You should have derby.jar in the classpath if you want to use embedded
mode.
CLASSPATH=\
Applications/apache-tomcat-6.0.18/lib/derbyclient.jar:\
derbyclient.jar contains only the JDBC driver code
(http://db.apache.org/derby/docs/dev/adminguide/tadminappschangingyourclasspath.html)
<%
String driver = "org.apache.derby.jdbc.EmbeddedDriver";
Hope this helps,
Emmanuel
--
Emmanuel Cecchet
FTO @ Frog Thinker
Open Source Development & Consulting
--
Web: http://www.frogthinker.org
email: [EMAIL PROTECTED]
Skype: emmanuel_cecchet