3.0.2 and hibernate configuration
dharraj Feb 6, 2006 6:49 PMHello,
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