Results 1 to 12 of 12
  1. #1
    Muaz.Sh is offline Member
    Join Date
    Mar 2011
    Location
    Damascus
    Posts
    7
    Rep Power
    0

    Exclamation 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.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    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.

  3. #3
    Muaz.Sh is offline Member
    Join Date
    Mar 2011
    Location
    Damascus
    Posts
    7
    Rep Power
    0

    Default

    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

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

  5. #5
    Muaz.Sh is offline Member
    Join Date
    Mar 2011
    Location
    Damascus
    Posts
    7
    Rep Power
    0

    Default

    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.

  6. #6
    Muaz.Sh is offline Member
    Join Date
    Mar 2011
    Location
    Damascus
    Posts
    7
    Rep Power
    0

    Default

    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

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    Quote Originally Posted by Muaz.Sh View Post
    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.
    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.

  8. #8
    Muaz.Sh is offline Member
    Join Date
    Mar 2011
    Location
    Damascus
    Posts
    7
    Rep Power
    0

    Default

    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

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    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.

  10. #10
    Muaz.Sh is offline Member
    Join Date
    Mar 2011
    Location
    Damascus
    Posts
    7
    Rep Power
    0

    Default

    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.

  11. #11
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    That's not embedded.
    That's running a derby server.

    This is embedded.

  12. #12
    Muaz.Sh is offline Member
    Join Date
    Mar 2011
    Location
    Damascus
    Posts
    7
    Rep Power
    0

    Default

    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.

Similar Threads

  1. Derby.jar
    By wulfgarpro in forum New To Java
    Replies: 0
    Last Post: 10-02-2010, 05:22 AM
  2. how to access derby database with servlets
    By Mateen in forum Java Servlet
    Replies: 0
    Last Post: 07-12-2010, 09:16 PM
  3. Using Derby Database in Netbeans
    By DavidG24 in forum New To Java
    Replies: 1
    Last Post: 09-14-2009, 01:29 PM
  4. using if in derby
    By suhaib1thariq in forum JDBC
    Replies: 0
    Last Post: 01-25-2009, 04:46 AM
  5. saving date and time in a derby database from an ejb module
    By Dave in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 07-22-2008, 11:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •