5 Replies Latest reply on Jul 29, 2008 10:59 AM by Sascha Janz

    how to integrate commandservicebean

    Sascha Janz Master


      i installed jbpm suite 3.2.3

      i want to use the commandservicebean for my application, but i can't find it.

      what must i do to install the commandservicebean?

        • 1. Re: how to integrate commandservicebean
          Mauricio Salatino Master

          You must use jbpm-enterprise.ear..

          • 2. Re: how to integrate commandservicebean
            Sascha Janz Master

            thats what i did.

            i copied the jbpm-enterprise.ear to the deploy directory

            but i got the following error

            10:06:33,316 WARN [ServiceController] Problem starting service jboss.j2ee:service=EjbModule, module=jbpm-enterprise.jar
            org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:
            JbpmDS was not deployed or type-mapping was not configured.
            at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.getTypeMap

            but in the logs appears

            10:05:59,410 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service = DataSourceBinding, name=JbpmDS' to JNDI name 'java:JbpmDS'

            where is the error?

            • 3. Re: how to integrate commandservicebean
              Martin Weiler Apprentice

              Check your datasource configuration file, it must have a section for the type-mapping:

              <metadata><type-mapping>Hypersonic SQL</type-mapping></metadata>

              where the value matches one of the entries in server/jbpm/conf/standardjbosscmp-jdbc.xml.

              • 4. Re: how to integrate commandservicebean
                Sascha Janz Master

                ok. added type mapping to the jbpm-ds

                and datasource mapping in the jbosscmp-jdbc.xml


                but now when i execute the following code
                 Object returnValue;
                 try {
                 GetProcessDefinitionsCommand cmd = new GetProcessDefinitionsCommand();
                 InitialContext initialContext = new InitialContext();
                 LocalCommandServiceHome localCommandServiceHome = (LocalCommandServiceHome) initialContext
                 LocalCommandService localCommandService = localCommandServiceHome
                 returnValue = localCommandService.execute(cmd);
                 } catch (Exception e) {
                 throw new RuntimeException("couldn't execute command", e);

                i got

                13:53:20,598 ERROR [LogInterceptor] RuntimeException in method: public abstract java.lang.Object org.jbpm.command.CommandService.execute(org.jbpm.command.Command):
                org.jbpm.JbpmException: couldn't start JTA transaction

                what is now missing?

                it's now nearly two days trying to get it work.......

                • 5. Re: how to integrate commandservicebean
                  Sascha Janz Master

                  ok finally made it

                  in the jbpm.cfg.xml was jta defined...dont know why or from where i got this file

                  changing it to

                   <service name="persistence">
                   <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
                   <field name="isCurrentSessionEnabled"><true /></field>
                   <field name="isTransactionEnabled"><false /></field>

                  solved the problem...

                  really a lot things to configure....