7 Replies Latest reply on Aug 1, 2005 2:26 AM by Ronald van Kuijk

    jBPM with JBoss and MySQL

    Igor Santos Newbie

      Hi! I'm trying to deploy jBPM and I'm having some problems. I managed to run the starters kit jboss configuration, that's easy but it's being too difficult to progress from there. I would like to run my own process examples translated from SPEM (using the xslt provided by Jan Berka), I just need a simulation of the execution of the processes, don't need to execute any more code. These are the list of problems I'm facing:

      1) I'm trying to configurate jbpm with mySQL. I ran the scripts to create the db succesfully but now I need to make the application work with it. I changed modified the jbpm.properties and included the hibernate.cfg.xml and hibernate.properties files under the org.jbpm package. Then I built the jbpm-3.0.jar again.It doesn't seem to work, any ideas?

      2) I'm using the starters kit configuration which comes tunned for jBPM to run the jBPM examples and I just overwrite the .war files when I modify them. Whenever I modify the original .war it doesn't work, why? Is this the way to go? How can I run tests on my modifications?I think I just need to modify the webapp.jar and some configuration on jbpm-3.0.jar for my purposes, am I right?

      3) I'm using ECLIPSE jBOSS IDE plug-in. Is anybody using this as well?Can you tell me how do run jbpm uder this?Which jBoss do you use? How do you test your apps?

      Please help!My MSc thesis depends on this and I'm a bit lost...

      Thanks in advance,

      Igor.

        • 1. Re: jBPM with JBoss and MySQL
          Igor Santos Newbie

          I have set up JBoss to work with a mySQL datasource. I want to deploy the .sar folder that comes with the starter's kit but with a few changes (in jbpm-3.0.jar and in the jbpm.sar.cfg.jar) I made to make jbpm work with mySQL. When I deploy the .sar folder I get the following error:

          17:35:31,396 ERROR [MainDeployer] could not create deployment: file:/D:/Dissertation/TechnicalStuff/jbpm-starters-kit-with-eclipse-3.0/jbpm-starters-kit-with-eclipse-3.0/jbpm-server/server/jbpm2/deploy/jbpm.sar/
          org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jbpm.db.jmx.JbpmService; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jbpm.db.jmx.JbpmService)
          at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:143)
          at org.jboss.system.ServiceController.install(ServiceController.java:202)
          at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
          at $Proxy4.install(Unknown Source)
          at org.jboss.deployment.SARDeployer.create(SARDeployer.java:220)
          at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
          at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
          at $Proxy8.deploy(Unknown Source)
          at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
          at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
          Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jbpm.db.jmx.JbpmService
          at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:198)
          at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:475)
          at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
          at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1189)
          at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:271)
          at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:329)
          at org.jboss.system.ServiceCreator.install(ServiceCreator.java:124)
          at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:153)
          at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
          ... 33 more

          Any ideas????

          Thanks,

          Igor.

          • 2. Re: jBPM with JBoss and MySQL
            Igor Santos Newbie

            Has anybody deployed any process successfully into mySQL using JBoss? Can you please tell how did you manage to do this???? That's the question I'm looking an answer for...

            Thanks,

            Igor.

            • 3. Re: jBPM with JBoss and MySQL
              Igor Santos Newbie

              I managed to deploy the websale process successfully to MySQL, but now I try to deploy the .sar (with the needed changes for MySQL) file to JBoss and I get the following errors:

              14:25:45,558 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 21s:781ms
              14:25:55,543 DEBUG [JbpmService] Creating jboss.jbpm:name=DefaultJbpm,service=JbpmService
              14:25:55,543 DEBUG [JbpmService] Created jboss.jbpm:name=DefaultJbpm,service=JbpmService
              14:25:55,543 DEBUG [JbpmService] Starting jboss.jbpm:name=DefaultJbpm,service=JbpmService
              14:25:55,543 DEBUG [JbpmService] starting jbpmSessionFactory for 'java:/jbpm/JbpmSessionFactory'...
              14:25:55,573 DEBUG [JbpmConfiguration] jbpm.task.instance.class=org.jbpm.taskmgmt.exe.TaskInstance
              14:25:55,573 DEBUG [JbpmConfiguration] jbpm.hibernate.cfg.xml=hibernate.cfg.xml
              14:25:55,573 DEBUG [JbpmConfiguration] jbpm.scheduler.service.factory=org.jbpm.scheduler.impl.SchedulerServiceImpl
              14:25:55,573 DEBUG [JbpmConfiguration] jbpm.hibernate.properties=hibernate.properties
              14:25:55,643 INFO [Environment] Hibernate 3.0.5
              14:25:55,653 INFO [Environment] hibernate.properties not found
              14:25:55,663 INFO [Environment] using CGLIB reflection optimizer
              14:25:55,663 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
              14:25:55,903 DEBUG [JbpmSessionFactory] using 'hibernate.cfg.xml' as hibernate configuration for jbpm
              14:25:55,903 INFO [Configuration] configuring from resource: hibernate.cfg.xml
              14:25:55,903 INFO [Configuration] Configuration resource: hibernate.cfg.xml
              14:25:55,923 INFO [Configuration] Mapping resource: org/jbpm/identity/User.hbm.xml
              14:25:56,124 INFO [HbmBinder] Mapping class: org.jbpm.identity.User -> JBPM_ID_USER
              14:25:56,224 INFO [HbmBinder] Mapping collection: org.jbpm.identity.User.permissions -> JBPM_ID_PERMISSIONS
              14:25:56,224 INFO [Configuration] Mapping resource: org/jbpm/identity/Group.hbm.xml
              14:25:56,264 INFO [HbmBinder] Mapping class: org.jbpm.identity.Group -> JBPM_ID_GROUP
              14:25:56,264 INFO [HbmBinder] Mapping collection: org.jbpm.identity.Group.permissions -> JBPM_ID_PERMISSIONS
              14:25:56,264 INFO [Configuration] Mapping resource: org/jbpm/identity/Membership.hbm.xml
              14:25:56,304 INFO [HbmBinder] Mapping class: org.jbpm.identity.Membership -> JBPM_ID_MEMBERSHIP
              ...
              ...
              14:25:58,267 INFO [Configuration] Mapping resource: org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml
              14:25:58,277 INFO [HbmBinder] Mapping subclass: org.jbpm.taskmgmt.log.SwimlaneAssignLog -> JBPM_LOG
              14:25:58,287 INFO [Configuration] Configured SessionFactory: null
              14:25:58,297 ERROR [JbpmService] Starting failed jboss.jbpm:name=DefaultJbpm,service=JbpmService
              java.lang.NullPointerException
              at java.io.Reader.(Reader.java:61)
              at java.io.InputStreamReader.(InputStreamReader.java:80)
              at java.util.Properties.load(Properties.java:266)
              at org.jbpm.db.JbpmSessionFactory.createConfiguration

              ...
              ...

              14:25:58,297 WARN [ServiceController] Problem starting service jboss.jbpm:name=DefaultJbpm,service=JbpmService
              java.lang.NullPointerException
              at java.io.Reader.(Reader.java:61)
              at java.io.InputStreamReader.(InputStreamReader.java:80)
              at java.util.Properties.load(Properties.java:266)
              at org.jbpm.db.JbpmSessionFactory.createConfiguration(JbpmSessionFactory.java:122)


              14:25:58,317 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
              --- MBeans waiting for other MBeans ---
              ObjectName: jboss.jbpm:name=DefaultJbpm,service=JbpmService
              State: FAILED
              Reason: java.lang.NullPointerException
              I Depend On:
              jboss.jca:name=MySqlDS,service=DataSourceBinding

              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
              ObjectName: jboss.jbpm:name=DefaultJbpm,service=JbpmService
              State: FAILED
              Reason: java.lang.NullPointerException
              I Depend On:
              jboss.jca:name=MySqlDS,service=DataSourceBinding

              Any clues????

              Thanks,

              Igor.

              • 4. Re: jBPM with JBoss and MySQL
                Alejandro Guizar Master

                JbpmSessionFactory.java:122 tries to read alternate properties for hibernate from the resource specified in property "jbpm.hibernate.properties" of jbpm.properties. You can find the jbpm.properties file that is added to the .sar in src/resources/jbpm.sar/jbpm.properties.

                Make sure that:
                -> the .sar contains the hibernate properties file
                -> the value in jbpm.properties matches the name of that file

                What were the "needed changes for MySQL" ?

                • 5. Re: jBPM with JBoss and MySQL
                  Igor Santos Newbie

                  Hi, thanks for that, I will try it even if now i'm getting some differente errors. The changes I made for MySql are on
                  http://www.jboss.com/index.html?module=bb&op=viewtopic&t=66882&start=10

                  Igor

                  • 6. Re: jBPM with JBoss and MySQL
                    Igor Santos Newbie

                    Hi all! Finally I got jbpm working fully with mySQL, it's time now to play with the SPEM processes and see how jbpm supports them...I'd like also to test the XMItoJPDL translator, has anybody worked with these?I'm enclosing my .war file structure in case it's of any help, I haven't used any .sar folder:

                    -login.jsp
                    -home.jsp
                    -...
                    -...
                    -hibernate.cfg.xml
                    -hibernate.properties
                    -ehcache.xml
                    +css
                    +images
                    +META-INF
                    +WEB-INF
                    -faces-config.xml
                    -jbpm.tld
                    -web.xml
                    -jboss-service.xml
                    +lib
                    -jbpm-3.0
                    -jbpm-webapp-3.0
                    -jbpm.sar.cfg
                    -commons-digester-1.5
                    -jbpm-identity-3.0
                    -commons-beanutils-1.6.1
                    -myfaces-1.0.9
                    -standard-1.1.2
                    -myfaces-jsf-api-1.0.9
                    -jstl-1.1.0
                    -myfaces-impl-1.0.9

                    Cheers,

                    Igor.

                    • 7. Re: jBPM with JBoss and MySQL
                      Ronald van Kuijk Master

                      xmi2jdpl was limited in both functionality and version. It was for jBPm 1.0, so I would not spend to much time on it unless you want to improve it and make it fit for 3.0