0

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 (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:


First step


Second step


Last step

Alex
  • 301
  • 5
  • 13

1 Answers1

0

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

dbeer
  • 6,963
  • 3
  • 31
  • 47
  • The problem is that I already did that (gonna post some screens soon)! What I can't grasp is why if the .jar file is outside my workspace it works well, if it's inside it doesn't work.. – Alex Sep 29 '11 at 22:09
  • I'm not sure why that would be the case. Hopefully someone else can shed some light on that. – dbeer Sep 30 '11 at 15:19