[jBPM Users] - Re: hibernate.cfg.xml not found
by elhostis
"kukeltje" wrote : It should be on the classpath.
What do you mean by "on the classpath" ?
I launch my project with this command :
java -classpath
| /usr/share/java/mysql.jar:
| /usr/share/java/hibernate/hibernate3.jar:
| /usr/share/java/dom4j/dom4j-1.6.1.jar:
| /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/log4j.jar:
| /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/coucheMetier.jar:
| /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/coucheMetier2.jar:
| /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/jdom.jar:
| /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/workflow.jar:
| /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/jbpm-3.1.1.jar:
| /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/commons-logging.jar:
| /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/appTCP/appTCP.jar:
| /home/config/hibernate.cfg.xml smartagsw.smartouch.appTCP.Server
|
I have the config file in the classpath (in bold), but the problem still exixts.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257912#4257912
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257912
15 years, 4 months
[jBPM Users] - Re: jbpm 4.1 installation problems on jboss 4.2.3
by pbaltz
A little more background on this. I managed to get it working on 4.2.3.
I looked into the jBPM source code where the exception related to looking up JbpmDS was coming from, and it looks like jBPM only tries to lookup the datasource in JNDI once. On subsequent calls, it checks if an exception was thrown previously, and if one was thrown earlier, it won't even try to lookup the datasource.
The problem is caused by jBPM running as a service in the microcontainer which apparently gets started very early on in the JBoss boot process. The exception occurs, and jBPM is dead in the water way before JbpmDS gets bound by JBoss.
I did find a work-around though. You can modify the jBPM hibernate configuration to use JDBC directly to avoid this. Just change your jbpm.hibernate.cfg.xml to something like the following (which uses HSQL):
| <?xml version="1.0" encoding="utf-8"?>
|
| <!DOCTYPE hibernate-configuration PUBLIC
| "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
| "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
| <hibernate-configuration>
| <session-factory>
|
| <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
| <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
| <property name="hibernate.connection.url">jdbc:hsqldb:hsql://opus.workpc.tds.net:1701</property>
| <property name="hibernate.connection.username">sa</property>
| <property name="hibernate.connection.password"></property>
| <property name="hibernate.format_sql">true</property>
|
| <mapping resource="jbpm.repository.hbm.xml" />
| <mapping resource="jbpm.execution.hbm.xml" />
| <mapping resource="jbpm.history.hbm.xml" />
| <mapping resource="jbpm.task.hbm.xml" />
| <mapping resource="jbpm.identity.hbm.xml" />
|
| </session-factory>
| </hibernate-configuration>
|
I think this should be okay for most people, since jBPM should be the only thing talking to that database directly. The other option I saw that looked like a possibility was bootstrapping the datasource into JNDI as a microcontainer bean which can be seen in other forum posts, but I haven't tried it myself.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257890#4257890
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257890
15 years, 4 months
[jBPM Users] - hibernate.cfg.xml not found
by elhostis
Hi,
I have a problem to deploy my application in production.
I have a projet named "Workflow" which use jBPM. It works fine.
I have a second project named "appTCP" which use the "Workflow" project. It works fine in my dev environment.
Now, I have to deploy these projects in production, and when I test the "appTCP" project, I have the message hibernate.cfg.xml not found. But i don't know where jBPM is searching the file.
My config :
static{
| jbpmConfiguration = JbpmConfiguration.parseXmlString(
| "<jbpm-configuration>" +
| " <jbpm-context>" +
| " <service name='persistence' " +
| " factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />" +
| " </jbpm-context>" +
| " <string name='resource.hibernate.cfg.xml' value='hibernate.cfg.xml' />" +
| "</jbpm-configuration>"
| );
I try to use a real path like /home/appTCP/hibernate.cfg.xml but I doesn't work. Any idea to help me ?
Tks a lot.
Eric
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257879#4257879
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257879
15 years, 4 months