Deploy derby database
I have developed an indexing application recently using derby database embedded in netbeans IDE, sure it is the first time to use derby database, and now I need to deploy my application, so does any one know how I can do that ? because I dont want to run the IDE every time I want to execute my application. Although, I tried to use EmbeddedDriver to connect to database, but it didnt work too. Any suggestion is welcome
If the embedded derby driver didn't work then you did something wrong.
What it was, we don't know.
As for deploying your app, Netbeans will have created a deploy directory which will contain everything you need to deploy as part of your app.
Thank you very much for your reply. In fact when I run the application through netbeans with ClientDriver every thing goes well, but when I use EmbeddedDriver also through netbeans the exception"SEVERE: null
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver" is shown, although the database is connected via netbeans. I also tried to add ";create=true" after database URL parameter but it was useless.
What you think I should do. Thank you
BTW I wonder that when I was using MySql database, it was necessary to run mysql service in background in order to response the queries, so is there any similar things with derby database .
thank you for your suggestions I guess I got it. Although I had added derby.jar to classpath and put it in \Java\jdk1.6.0_23\jre\lib\ext it didnt work until I added it under projects tab -> myproject -> libraries;then, the EmbeddedDriver is recognized, but now I need some suggesstions about how I can start java DB server without netbeans.
thank you so much.
and please accept my apology for what you named cross posting. I guessed that it would accelerate the process in order to find the solution and to distribute the info
Do not do that with jar files.
Originally Posted by Muaz.Sh
There is no need to either stick them on your system classpath or (most defintiely not) stick them in the JDK directory structure.
You add them to your project.
Now, does the embedded driver work?
If so then you're all set. It's there in the documentation for Derby, and it's pretty clear what you have to do.
OK thank you dear Tolls. Yes the Embedded Driver is working. Concerning the running of the java db server I will try to figure it out by reading derby documentations and then post the feedback here. Thanks
It's all pretty clear in the docs. I succeeded on a test one last year so that must be!
It's not a server either.
It runs as part of your app, accessing the db files stored wherever you say to create them.
I got it. In order to run java db server without using IDEs, I used the command "java -jar derbyrun.jar server start". For more info refer to:Getting Started with Derby
Thank you Tolls for your help I really appreciate it.
That's not embedded.
That's running a derby server.
This is embedded.
Ohh thank you. You are right I dont have to start java db server with embedded driver, but the problem was that I left the address and port number within the database URL parameter, and once I removed it, the program runs without needing to start the sever.