4 Replies Latest reply on Feb 8, 2006 7:30 AM by koen.aers

    3.0.2 and hibernate configuration

    dharraj

      Hello,

      I am running hsql server on 'localhost:1701'. I have modified the hibernate.cfg.xml in jbpm.sar.cfg.jar as

      <property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost:1701;sql.enforce_strict_size=true</property>
      

      and the jbpm.sar.cfg.jar is the first thing in my classpath. However, I am getting the following exception
      log4j:WARN No appenders could be found for logger (org.jbpm.JbpmConfiguration).
      log4j:WARN Please initialize the log4j system properly.
      Error obtaining JbpmSession. Error=org.hibernate.HibernateException: Could not find datasource
      Exception in thread "main" org.hibernate.HibernateException: Could not find datasource
       at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
       at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
       at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
       at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:366)
       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1859)
       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1152)
       at org.jbpm.db.JbpmSessionFactory.buildSessionFactory(JbpmSessionFactory.java:138)
       at org.jbpm.db.JbpmSessionFactory.<init>(JbpmSessionFactory.java:77)
       at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFactory.java:94)
       at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFactory.java:90)
       at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFactory.java:86)
       at jpl.mipl.pgs.jbpm.JBPMExeEngine.<init>(JBPMExeEngine.java:87)
       at jpl.mipl.pgs.jbpm.JBPMExeEngine.main(JBPMExeEngine.java:515)
      Caused by: javax.naming.NameNotFoundException: No object bound for java:/DefaultDS
       at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
       at javax.naming.InitialContext.lookup(InitialContext.java:347)
       at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
       ... 13 more
      


      If I specify a hibernate.cfg.xml in the current directory with the same url, it works. Also, is it possible to use JVM variables to specify these configuration files? I know this will require changing the JbpmConfiguration code but at the end it will make the configuration more flexible.


      Thanks
      Raj


        • 1. Re: 3.0.2 and hibernate configuration
          dharraj

          okay so I commented out

          hibernate.connection.datasource=java:/DefaultDS
          and that error went away, but now I am getting the following error
          Error obtaining JbpmSession. Error=java.lang.RuntimeException: couldn't get the jbpm table names
          Exception in thread "main" java.lang.RuntimeException: couldn't get the jbpm table names
           at org.jbpm.db.JbpmSchema.getJbpmTables(JbpmSchema.java:137)
           at org.jbpm.db.JbpmSchema.hasJbpmTables(JbpmSchema.java:119)
           at jpl.mipl.pgs.jbpm.JBPMExeEngine.<init>(JBPMExeEngine.java:88)
           at jpl.mipl.pgs.jbpm.JBPMExeEngine.main(JBPMExeEngine.java:515)
          


          Am I the only one having these problems?
          Sorry, but I am frustrated.
          Raj


          • 2. Re: 3.0.2 and hibernate configuration
            koen.aers

            Raj,

            Are you able to connect to HSQL with a database client (e.g. DBVisualizer)?

            Regards,
            Koen

            • 3. Re: 3.0.2 and hibernate configuration
              dharraj

              I am able to connect to hsql db using the hsqldb datamanager tool.

              Raj

              • 4. Re: 3.0.2 and hibernate configuration
                koen.aers

                We will need some more details to try and help you out. Are you running the starter's kit? What are all the modifications you did to make it run?
                Post (relevant excerpts of) your configuration files here please.

                Regards,
                Koen