Announcement

Collapse
No announcement yet.

has anyone try to use h2 intead of derby

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • has anyone try to use h2 intead of derby

    I have tried several times (embedded and over tcp), including executing queries to create the Database tables manually. H2 is very compatible with derby, I have use in several projects, made sure that the launcher has the jar included, move jar to custom, also made sure that the drivers list (under conf/custom/dbdrivers.xml was properly edited), created the folders for h2 under conf using derby as a start point. I still get the following:

    WARN 2008-09-11 09:20:10,602 [SslListener0-1] com.webreach.mirth.server.controllers.Configuratio nController: could not retrieve status of database
    java.sql.SQLException: No suitable driver found for jdbc:h2:file://C:\mirthdb
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.ibatis.common.jdbc.SimpleDataSource.popConnect ion(SimpleDataSource.java:580)
    at com.ibatis.common.jdbc.SimpleDataSource.getConnect ion(SimpleDataSource.java:222)
    at com.webreach.mirth.server.controllers.Configuratio nController.getStatus(ConfigurationController.java :631)
    at com.webreach.mirth.server.servlets.ConfigurationSe rvlet.doPost(ConfigurationServlet.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:616)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
    at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:428)
    at org.mortbay.jetty.servlet.ServletHandler.dispatch( ServletHandler.java:666)
    at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.ja va:1530)
    at org.mortbay.http.HttpContext.handle(HttpContext.ja va:1482)
    at org.mortbay.http.HttpServer.service(HttpServer.jav a:909)
    at org.mortbay.http.HttpConnection.service(HttpConnec tion.java:816)
    at org.mortbay.http.HttpConnection.handleNext(HttpCon nection.java:982)
    at org.mortbay.http.HttpConnection.handle(HttpConnect ion.java:833)
    at org.mortbay.http.SocketListener.handleConnection(S ocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedSer ver.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadP ool.java:534)

    P.s.: while the server is starting I have messages that the server could not start, also at the administration console I can't authenticate. (I am on windows, same happens on a linux box.)

    can anyone help me to figure it out the next step or if there was something I am missing? or perhaps a work around this.

  • #2
    Re:has anyone try to use h2 intead of derby

    Never heard of h2 before. I took a look at their website and saw that it has a Postgres and MySQL compatibility modes. Would it be possible to connect to it by telling Mirth it is one of those?

    Otherwise it looks like a common classpath issue. Which path are your JDBC driver JARs in? What path is Mirth installed to?
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:has anyone try to use h2 intead of derby

      I placed H2 under custom and lib to same effect.

      I will try mySQL compatible mode and test. (get back to you on that)

      Comment


      • #4
        Re:has anyone try to use h2 intead of derby

        Again tried with mysql and derby modality under h2 to no effect. anything else I can do other than place h2.jar under lib/custom and/or lib to try to make the h2.jar forcibly visible to the application. BTW I have tried the application laucher adding the jar directly there - and no it still does not work.

        Comment


        • #5
          Re:has anyone try to use h2 intead of derby

          well some good news...

          I finally got H2 to work.

          On the mirth.properties file I left as derby, on the DerbySQlMapConfig.properties I setup all the h2 settings (driver, jdbc url, user name, etc), that solves the problem, also I used derby SQL maps but replace the selects "with UR"'s since that is derby specific (basically just deleted the WITH UR), and H2 does not work with it.

          I thought it might be the name of the driver since it was the only one alpha-numeric, but that did not resolve it either.

          I will update the files I am using as soon as I can. I need to zip them.

          I also want to make sure that when it comes to derby what specific treatment the Java code has for it. Any other way I tried it complains about either the ${driver} and/or about Java reflection issues (driver not found) etc.

          Hope this helps other people.

          p.s.: h2 is much faster than derby and it shows. that might help the appliances get a bit faster to respond. Specially small ones.

          If anyone has an opinion please voice it, I would like to know what is the difference.

          Cheers

          Comment


          • #6
            Re:has anyone try to use h2 intead of derby

            I'm interested to see how you solved this. When you post the files I'll give H2 a whirl and see how it does. I'm also curious to see if you didn't run into some issues because of slight differences between the Windows and Linux distributions.

            I agree that Derby can get slow in a hurry, but like most file based or small databases (SQLite being the main competitor) its there for low-duty applications and development. When running higher loads it really is a good idea to move to a full blown database engine like Postgres. Having said that if H2 will push that line further out, its certainly a good option to have.

            There have been a flurry of questions recently regarding the use of less common database engines. Some are there to keep the number of different vendors to a minimum and others are there to work with a specific database for a channel. Regardless of the use case, having your info handy will certainly help someone else get their preferred database running with Mirth.

            Thanks for posting your solution!
            Jon Bartels

            Zen is hiring!!!!
            http://consultzen.com/careers/
            Talented healthcare IT professionals wanted. Engineers to sales to management.
            Good benefits, great working environment, genuinely interesting work.

            Comment


            • #7
              Re:has anyone try to use h2 intead of derby

              :huh:

              Post edited by: gazetaj, at: 09/18/2008 08:00

              Comment


              • #8
                Re:has anyone try to use h2 intead of derby

                Here are the files... Mirth-e01c69464d1abc345d723e6555e68a15.zip (33677 bytes)

                Comment

                Working...
                X