Can't connect to Derby database if derby.jar is in Eclipse workspace
I've been trying to create a Derby DB via Eclipse Data Tools Platform and at the beginning I couldn't manage to get it to work.. no matter what I did, I always got the same error:
Could not connect to New Derby.
Error creating SQL Model Connection connection to New Derby. (Error: null)
java.lang.NullPointerException
Error creating JDBC Connection connection to New Derby. (Error: null)
java.lang.NullPointerException
While I was trying this the derby.jar file containing the driver was inside "workspace/myproject/lib" folder. Then I put the same exact file to my Desktop, set the driver to point to the new location of my derby.jar and all started to work automagically...
I did some experiments and it happens that it works everywhere EXCEPT when I put inside my Eclipse workspace folder. Why?
And most important: if I want to deploy my application on different machines do I need the derby.jar inside my project folder 开发者_StackOverflow社区(and thus inside the .jar of my project)?
Thanks in advance to everyone
EDIT: I already added derby.jar to the project through Eclipse interface, here's how:
You have to add the jar file using eclipse's interface. This website shows how:
http://www.cs.duke.edu/courses/cps004g/fall05/assign/final/addlibrary.html
精彩评论