-
1. Re: jbpm 4.1 installation problems on jboss 4.2.3
kukeltje Sep 28, 2009 3:08 PM (in response to sridhar18)is the ds deployed at all? Can you check via the AS console?
-
2. Re: jbpm 4.1 installation problems on jboss 4.2.3
sridhar18 Sep 29, 2009 10:03 AM (in response to sridhar18)Yes. I'm able to see JbpmDs from the jmx-console.
-
3. Re: jbpm 4.1 installation problems on jboss 4.2.3
kukeltje Sep 29, 2009 11:15 AM (in response to sridhar18)with or without the java: prefix? And what about the name in the config file? Does that contain the prefix or not?
-
4. Re: jbpm 4.1 installation problems on jboss 4.2.3
c4s4l Sep 29, 2009 11:22 AM (in response to sridhar18)I have the same problem, the JbpmDS is deployed and started as I can see in jmx-console. I also am installing jbpm4.1 on jboss 4.2.3, any ideas?
Thanks,
Sergio -
5. Re: jbpm 4.1 installation problems on jboss 4.2.3
sridhar18 Sep 29, 2009 11:25 AM (in response to sridhar18)It's java:JbpmDS both in the console and the ds config file.
-
6. Re: jbpm 4.1 installation problems on jboss 4.2.3
c4s4l Sep 29, 2009 1:53 PM (in response to sridhar18)"sridhar18" wrote:
It's java:JbpmDS both in the console and the ds config file.
By ds config you mean the jbpm-*-ds.xml? One should set <jndi-name> to java:JbpmDS? It guives the error :Could not create deployment: file:/C:/jboss/jboss-4.2.3.GA/server/default/deploy/jbpm/jbpm-hsqldb-ds.xml org.jboss.deployment.DeploymentException: Invalid character ':' in value part of property
When I deploy it with the <jndi-name> as JbpmDS, in the jmx-console the bindname appears like java:JbpmDS, but the hibernate does not find the datasource java:JbpmDS specified in the hibernate.connection.datasource property.
Can you clarify what you wrote please?
BRegards,
Sergio -
7. Re: jbpm 4.1 installation problems on jboss 4.2.3
sridhar18 Sep 29, 2009 2:15 PM (in response to sridhar18)Yes. In the jbpm-*-ds.xml I have it as JbpmDS so jboss prefixes it with java: when it tries to load it.
-
8. Re: jbpm 4.1 installation problems on jboss 4.2.3
c4s4l Sep 29, 2009 2:24 PM (in response to sridhar18)And you have the hibernate.connection.datasource = java:JbpmDS ?
-
9. Re: jbpm 4.1 installation problems on jboss 4.2.3
sridhar18 Sep 29, 2009 2:41 PM (in response to sridhar18)i have it as java:/JbpmDS
-
10. Re: jbpm 4.1 installation problems on jboss 4.2.3
c4s4l Sep 30, 2009 8:49 AM (in response to sridhar18)The error was coming from a workaround that I was using, related to jbpm-service.beans, after removing this the datasource was correctly binded. Nevertheless now I have an authentication error:
Failed to load users/passwords/role files java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found at org.jboss.security.auth.spi.Util.loadProperties(Util.java:315)
I have changed the jbpm policy in login-config.xml to the correct query:SELECT g.NAME_ ,'Roles' FROM JBPM4_ID_USER u,JBPM4_ID_MEMBERSHIP m, JBPM4_ID_GROUP g WHERE g.TYPE_='security-role' AND m.GROUP_ = g.DBID_ AND m.USER_ = u.DBID_ AND u.ID_=?
Anyone knows what is missing? Do I have to create a users.properties?
Thanks,
Sergio -
11. Re: jbpm 4.1 installation problems on jboss 4.2.3
c4s4l Sep 30, 2009 10:13 AM (in response to sridhar18)Found the error, the policy name was changed apparently, so login-conf.xml should be according to:
<application-policy name = "jbpm-console"> <authentication> <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required"> <module-option name="dsJndiName">java:/JbpmDS</module-option> <module-option name="principalsQuery"> SELECT PASSWORD_ FROM JBPM4_ID_USER WHERE ID_=? </module-option> <module-option name="rolesQuery"> SELECT g.NAME_ ,'Roles' FROM JBPM4_ID_USER u, JBPM4_ID_MEMBERSHIP m, JBPM4_ID_GROUP g WHERE g.TYPE_='security-role' AND m.GROUP_ = g.DBID_ AND m.USER_ = u.DBID_ AND u.ID_=? </module-option> </login-module> </authentication> </application-policy>
-
12. Re: jbpm 4.1 installation problems on jboss 4.2.3
c4s4l Sep 30, 2009 11:23 AM (in response to sridhar18)Well, the login-conf.xml may stay untouched because there is a dynamic login bean in the jboss-service.xml in the jbpm-service.sar, my problem is that it was missing from there so you may discard the login-conf change. The dynamic bean is like this:
<mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="org.jbpm:service=LoginConfig"> <attribute name="PolicyConfig" serialDataType="jbxb"> <jaas:policy xsi:schemaLocation="urn:jboss:security-config:4.1 resource:security-config_4_1.xsd" xmlns:jaas="urn:jboss:security-config:4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <jaas:application-policy name="jbpm-console"> ...
Regds,
Sergio -
13. Re: jbpm 4.1 installation problems on jboss 4.2.3
pbaltz Sep 30, 2009 11:41 AM (in response to sridhar18)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. -
14. Re: jbpm 4.1 installation problems on jboss 4.2.3
kukeltje Sep 30, 2009 12:18 PM (in response to sridhar18)I'm no jboss service /.sar specialist, but afaik, it should wait until the datasource is deployed.
At least is does this for JBoss AS 5 in distro/src/main/files/install/src/jboss/config.jboss5/deploy/jbpm/jbpm-service.sar/jbpm-service-jboss-beans.xml
for 4 in distro/src/main/files/install/src/jboss/config.jboss4/deploy/jbpm/jbpm-service.sar/jboss-beans.xml this seams missing. Can you try adding something similar in this file and see if it works then.