Results 1 to 12 of 12
Thread: Deploy derby database
- 03-15-2011, 11:56 PM #1
Member
- Join Date
- Mar 2011
- Location
- Damascus
- Posts
- 7
- Rep Power
- 0
Deploy derby database
Hi all,
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
Thank you.
- 03-16-2011, 09:00 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,448
- Rep Power
- 16
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.
- 03-16-2011, 10:40 PM #3
Member
- Join Date
- Mar 2011
- Location
- Damascus
- Posts
- 7
- Rep Power
- 0
Dear Tolls
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 .
thanks
- 03-17-2011, 12:02 AM #4
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,605
- Rep Power
- 5
Cross posted at How to deploy derby database?
- 03-17-2011, 12:22 AM #5
Member
- Join Date
- Mar 2011
- Location
- Damascus
- Posts
- 7
- Rep Power
- 0
Dear all
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.
- 03-17-2011, 12:29 AM #6
Member
- Join Date
- Mar 2011
- Location
- Damascus
- Posts
- 7
- Rep Power
- 0
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
- 03-17-2011, 08:33 AM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,448
- Rep Power
- 16
Do not do that with jar files.
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.
- 03-17-2011, 12:55 PM #8
Member
- Join Date
- Mar 2011
- Location
- Damascus
- Posts
- 7
- Rep Power
- 0
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
- 03-17-2011, 01:10 PM #9
Moderator
- Join Date
- Apr 2009
- Posts
- 10,448
- Rep Power
- 16
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.
- 03-17-2011, 02:20 PM #10
Member
- Join Date
- Mar 2011
- Location
- Damascus
- Posts
- 7
- Rep Power
- 0
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.
- 03-17-2011, 02:34 PM #11
Moderator
- Join Date
- Apr 2009
- Posts
- 10,448
- Rep Power
- 16
That's not embedded.
That's running a derby server.
This is embedded.
- 03-17-2011, 06:02 PM #12
Member
- Join Date
- Mar 2011
- Location
- Damascus
- Posts
- 7
- Rep Power
- 0
Similar Threads
-
Derby.jar
By wulfgarpro in forum New To JavaReplies: 0Last Post: 10-02-2010, 05:22 AM -
how to access derby database with servlets
By Mateen in forum Java ServletReplies: 0Last Post: 07-12-2010, 09:16 PM -
Using Derby Database in Netbeans
By DavidG24 in forum New To JavaReplies: 1Last Post: 09-14-2009, 01:29 PM -
using if in derby
By suhaib1thariq in forum JDBCReplies: 0Last Post: 01-25-2009, 04:46 AM -
saving date and time in a derby database from an ejb module
By Dave in forum Enterprise JavaBeans (EJB)Replies: 2Last Post: 07-22-2008, 11:14 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks