1 2 Previous Next 24 Replies Latest reply on Sep 5, 2008 5:35 AM by francis17101970 Go to original post
      • 15. Re: How to deploy a BPEL process using the APIs?
        aguizar

        The hibernate configuration in jbpm-bpel-1.1.GA/config is set to acquire JDBC connections from a data source registered in the app server JNDI service.

        <!-- DataSource properties (begin) -->
         <property name="hibernate.connection.datasource">java:/DefaultDS</property>
         <!-- DataSource properties (end) -->

        If you want to deploy processes outside the app server, you need to configure hibernate to acquire connections from the driver manager, because data sources are not available outside the app server.
        <!-- JDBC connection properties (begin) -->
         <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
         <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm;sql.enforce_strict_size=true</property>
         <property name="hibernate.connection.username">sa</property>
         <property name="hibernate.connection.password"/>
         <property name="hibernate.hbm2ddl.auto">create</property>
         <!-- JDBC connection properties (end) -->

        You can deploy processes outside the app server like this, but in my opinion it is easier to post your process archive to the deployment servlet through the ProcessDeployer class, like the DeployProcessTask does.
        public void execute() throws BuildException {
         ProcessDeployer processDeployer = new ProcessDeployer();
        
         if (host != null)
         processDeployer.setHost(host);
         if (port != null)
         processDeployer.setPort(port.intValue());
         if (context != null)
         processDeployer.setContext(context);
        
         processDeployer.deployProcess(processfile);
        
         int problemCount = processDeployer.getProblemHandler().getProblemCount();
         if (problemCount > 0)
         throw new BuildException("Problems (" + problemCount + " item[s])");
         }


        • 16. Re: How to deploy a BPEL process using the APIs?
          aguizar

          I made a mistake in my last post. ProcessDeployer and DeployProcessTask only submit the process file URL. In jBPM BPEL 1.1.GA this trivial deployment mechanism was replaced with a HTTP file upload. Please look at the DeploymentTask instead, which relies the Apache HttpClient library to perform the actual upload.

          protected void writeRequest(PostMethod post) throws IOException {
           // process part
           String contentType = URLConnection.getFileNameMap().getContentTypeFor(processArchive.getName());
           FilePart processPart = new FilePart("processArchive", processArchive, contentType,
           FileUtil.DEFAULT_CHARSET.name());
          
           // multipart request
           post.setRequestEntity(new MultipartRequestEntity(new Part[] { processPart }, post.getParams()));
          
           log("deploying process: " + processArchive.getName());
           }


          • 17. Re: How to deploy a BPEL process using the APIs?
            dhanushgopinath

            Hello Alex,

            Thanks Again. I actually followed the hibernate configuration route. Now my sample code is running. But even though the line

            builder.buildModule(processDefinition);
            in the deployWebModule method will execute without any exception, it causes a server side exception to be thrown, which is as given below.

            14:15:12,272 INFO [ServiceEndpointManager] WebService stopped: http://127.0.0.1:9090/Workflow3/StartWorkflow3PortTypeRole
            14:15:12,272 INFO [ServiceEndpointManager] WebService stopped: http://127.0.0.1:9090/Workflow3/ReceiveWS2CBServicePortRole
            14:15:12,272 INFO [ServiceEndpointManager] WebService stopped: http://127.0.0.1:9090/Workflow3/ReceiveWS1CBServicePortRole
            14:15:12,272 INFO [ServiceEndpointManager] WebService stopped: http://127.0.0.1:9090/Workflow3/ReceiveWS3CBServicePortRole
            14:15:13,224 INFO [TomcatDeployer] deploy, ctxPath=/Workflow3, warUrl=.../tmp/deploy/tmp9437Workflow3-exp.war/
            14:15:13,396 ERROR [[/Workflow3]] Exception sending context initialized event to listener instance of class org.jbpm.bpel.integration.server.IntegrationConfigurator
            org.jbpm.bpel.BpelException: process not found: name=Workflow3, targetNamespace=http://www.altair.com/Workflow3, version=null
             at org.jbpm.bpel.deploy.DeploymentDescriptor.findProcessDefinition(DeploymentDescriptor.java:89)
             at org.jbpm.bpel.integration.server.IntegrationConfigurator.contextInitialized(IntegrationConfigurator.java:56)
             at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
             at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
             at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
             at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
             at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
             at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
             at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
             at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
             at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
             at org.jboss.web.WebModule.startModule(WebModule.java:83)
             at org.jboss.web.WebModule.startService(WebModule.java:61)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:417)
             at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy45.start(Unknown Source)
             at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
             at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
             at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
             at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
             at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
             at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy46.start(Unknown Source)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
             at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy9.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
            14:15:13,817 ERROR [StandardContext] Error listenerStart
            14:15:13,817 ERROR [StandardContext] Context [/Workflow3] startup failed due to previous errors
            14:15:13,817 WARN [ServiceController] Problem starting service jboss.web.deployment:war=Workflow3.war,id=1423543122
            org.jboss.deployment.DeploymentException: URL file:/D:/JBOSS/jboss-4.2.0.GA/server/default/tmp/deploy/tmp9437Workflow3-exp.war/ deployment failed
             at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:379)
             at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
             at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
             at org.jboss.web.WebModule.startModule(WebModule.java:83)
             at org.jboss.web.WebModule.startService(WebModule.java:61)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:417)
             at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy45.start(Unknown Source)
             at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
             at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
             at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
             at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
             at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
             at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy46.start(Unknown Source)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
             at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy9.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
            14:15:13,833 ERROR [MainDeployer] Could not start deployment: file:/D:/JBOSS/jboss-4.2.0.GA/server/default/deploy/Workflow3.war
            org.jboss.deployment.DeploymentException: URL file:/D:/JBOSS/jboss-4.2.0.GA/server/default/tmp/deploy/tmp9437Workflow3-exp.war/ deployment failed
             at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:379)
             at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
             at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
             at org.jboss.web.WebModule.startModule(WebModule.java:83)
             at org.jboss.web.WebModule.startService(WebModule.java:61)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:417)
             at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy45.start(Unknown Source)
             at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
             at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
             at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
             at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
             at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
             at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy46.start(Unknown Source)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
             at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy9.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
            


            Any idea why this is happening ? Please let me know if you have some idea. Meanwhile I will try the other route you mentioned.

            Thanks Again

            Dhanush

            • 18. Re: How to deploy a BPEL process using the APIs?
              aguizar

              You need to configure the server and the client to use the same database. If you are using HSQL, you have to configure the datasource for server mode, allowing the client to access the database over TCP. Read the comments in hsqldb-ds.xml, located in the deploy directory, for details. The client properties must be set accordingly.

              • 19. Re: How to deploy a BPEL process using the APIs?
                dhanushgopinath

                Hi Alex,

                Where are the client properties configured? is it in jbpm.hibernate.cfg.xml ? I tried configuring the hsqldb-ds.xml to use it over tcp. I also made jbpm.hibernate.cfg.xml to use the JDBC Conenction Properties as you mentioned earlier.

                But it was failing to load the BPEL. The Database Connection page in the JBPM BPEL was showing Database Connection Failure.

                Please see my hsqldb-ds.xml

                <?xml version="1.0" encoding="UTF-8"?>
                
                <!-- The Hypersonic embedded database JCA connection factory config -->
                
                <!-- $Id: hsqldb-ds.xml 39791 2006-01-10 18:14:42Z dimitris $ -->
                
                <datasources>
                 <local-tx-datasource>
                
                 <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
                 <!-- Datasources are not available outside the virtual machine -->
                 <jndi-name>DefaultDS</jndi-name>
                
                 <!-- For server mode db, allowing other processes to use hsqldb over tcp.
                 This requires the org.jboss.jdbc.HypersonicDatabase mbean.
                 <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url> -->
                
                 <!-- For totally in-memory db, not saved when jboss stops.
                 The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
                 <connection-url>jdbc:hsqldb:.</connection-url>
                 -->
                 <!-- For in-process persistent db, saved when jboss stops.
                 The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
                 -->
                 <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
                
                 <!-- The driver class -->
                 <driver-class>org.hsqldb.jdbcDriver</driver-class>
                
                 <!-- The login and password -->
                 <user-name>sa</user-name>
                 <password></password>
                
                 <!--example of how to specify class that determines if exception means connection should be destroyed-->
                 <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
                
                 <!-- this will be run before a managed connection is removed from the pool for use by a client-->
                 <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
                
                 <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
                 <min-pool-size>5</min-pool-size>
                
                 <!-- The maximum connections in a pool/sub-pool -->
                 <max-pool-size>20</max-pool-size>
                
                 <!-- The time before an unused connection is destroyed -->
                 <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
                 <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
                 <idle-timeout-minutes>0</idle-timeout-minutes>
                
                 <!-- sql to call when connection is created
                 <new-connection-sql>some arbitrary sql</new-connection-sql>
                 -->
                
                 <!-- sql to call on an existing pooled connection when it is obtained from pool
                 <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
                 -->
                
                 <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
                 <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
                 -->
                
                 <!-- Whether to check all statements are closed when the connection is returned to the pool,
                 this is a debugging feature that should be turned off in production -->
                 <track-statements/>
                
                 <!-- Use the getConnection(user, pw) for logins
                 <application-managed-security/>
                 -->
                
                 <!-- Use the security domain defined in conf/login-config.xml -->
                 <security-domain>HsqlDbRealm</security-domain>
                
                 <!-- Use the security domain defined in conf/login-config.xml or the
                 getConnection(user, pw) for logins. The security domain takes precedence.
                 <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
                 -->
                
                 <!-- HSQL DB benefits from prepared statement caching -->
                 <prepared-statement-cache-size>32</prepared-statement-cache-size>
                
                 <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
                 <metadata>
                 <type-mapping>Hypersonic SQL</type-mapping>
                 </metadata>
                
                 <!-- When using in-process (standalone) mode -->
                 <depends>jboss:service=Hypersonic,database=localDB</depends>
                 <!-- Uncomment when using hsqldb in server mode
                 <depends>jboss:service=Hypersonic</depends>
                 -->
                 </local-tx-datasource>
                
                 <!-- Uncomment if you want hsqldb accessed over tcp (server mode)
                
                 <mbean code="org.jboss.jdbc.HypersonicDatabase"
                 name="jboss:service=Hypersonic">
                 <attribute name="Port">1701</attribute>
                 <attribute name="BindAddress">localhost</attribute>
                 <attribute name="Silent">true</attribute>
                 <attribute name="Database">default</attribute>
                 <attribute name="Trace">false</attribute>
                 <attribute name="No_system_exit">true</attribute>
                 </mbean>
                 -->
                
                 <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
                 <mbean code="org.jboss.jdbc.HypersonicDatabase"
                 name="jboss:service=Hypersonic,database=localDB">
                 <attribute name="Database">localDB</attribute>
                 <attribute name="InProcessMode">true</attribute>
                 </mbean>
                
                </datasources>
                


                and jbpm.hibernate.cfg.xml

                <?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>
                
                 <!-- SQL dialect -->
                 <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
                 <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
                
                 <!-- JDBC connection properties (begin) === -->
                 <!--
                 <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
                 <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm;sql.enforce_strict_size=true</property>
                 <property name="hibernate.connection.username">sa</property>
                 <property name="hibernate.connection.password"/>
                 <property name="hibernate.hbm2ddl.auto">create</property> -->
                 <!-- ==== JDBC connection properties (end) -->
                
                 <!-- DataSource properties (begin) -->
                 <property name="hibernate.connection.datasource">java:/DefaultDS</property>
                 <!-- DataSource properties (end) -->
                
                 <!-- JTA transaction properties (begin) ===
                 <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
                 <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
                 <property name="jta.UserTransaction">UserTransaction</property>
                 ==== JTA transaction properties (end) -->
                
                 <!-- logging properties (begin) -->
                 <property name="hibernate.format_sql">true</property>
                 <property name="hibernate.use_sql_comments">true</property>
                 <!-- logging properties (end) -->
                
                 <!-- ############################################ -->
                 <!-- # mapping files with external dependencies # -->
                 <!-- ############################################ -->
                
                 <!-- following mapping file has a dependendy on -->
                 <!-- 'bsh-{version}.jar'. -->
                 <!-- uncomment this if you don't have bsh on your -->
                 <!-- classpath. you won't be able to use the -->
                 <!-- script element in process definition files -->
                 <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
                
                 <!-- following mapping files have a dependendy on -->
                 <!-- 'jbpm-identity.jar', mapping files -->
                 <!-- of the pluggable jbpm identity component. -->
                 <!-- Uncomment the following 3 lines if you -->
                 <!-- want to use the jBPM identity mgmgt -->
                 <!-- component. -->
                 <!-- identity mappings (begin) -->
                 <mapping resource="org/jbpm/identity/User.hbm.xml"/>
                 <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
                 <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
                 <!-- identity mappings (end) -->
                
                 <!-- following mapping files have a dependendy on -->
                 <!-- the JCR API -->
                 <!-- jcr mappings (begin) ===
                 <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
                 ==== jcr mappings (end) -->
                
                 <!-- ###################### -->
                 <!-- # jbpm mapping files # -->
                 <!-- ###################### -->
                
                 <!-- hql queries and type defs -->
                 <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
                
                 <!-- graph.def mapping files -->
                 <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
                 <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
                
                 <!-- graph.node mapping files -->
                 <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
                
                 <!-- context.def mapping files -->
                 <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
                 <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
                
                 <!-- taskmgmt.def mapping files -->
                 <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
                
                 <!-- module.def mapping files -->
                 <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
                
                 <!-- bytes mapping files -->
                 <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
                
                 <!-- file.def mapping files -->
                 <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
                
                 <!-- scheduler.def mapping files -->
                 <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
                 <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
                
                 <!-- graph.exe mapping files -->
                 <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
                
                 <!-- module.exe mapping files -->
                 <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
                
                 <!-- context.exe mapping files -->
                 <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
                
                 <!-- job mapping files -->
                 <mapping resource="org/jbpm/job/Job.hbm.xml"/>
                 <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
                 <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
                 <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
                
                 <!-- taskmgmt.exe mapping files -->
                 <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
                
                 <!-- logging mapping files -->
                 <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
                 <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
                 <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
                 <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
                 <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
                
                 <!-- ###################### -->
                 <!-- # bpel mapping files # -->
                 <!-- ###################### -->
                
                 <!-- hql queries and type defs -->
                 <mapping resource="org/jbpm/bpel/persistence/db/hibernate.queries.hbm.xml" />
                
                 <!-- graph.def mapping files -->
                 <mapping resource="org/jbpm/bpel/graph/def/BpelProcessDefinition.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/def/ImportDefinition.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/def/Import.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/def/LinkDefinition.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/def/Activity.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/def/Namespace.hbm.xml" />
                
                 <!-- graph.basic mapping files -->
                 <mapping resource="org/jbpm/bpel/graph/basic/BasicActivity.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/basic/AssignOperation.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/basic/assign/Copy.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/basic/assign/From.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/basic/assign/To.hbm.xml" />
                
                 <!-- graph.struct mapping files -->
                 <mapping resource="org/jbpm/bpel/graph/struct/StructuredActivity.hbm.xml" />
                
                 <!-- graph.scope mapping files -->
                 <mapping resource="org/jbpm/bpel/graph/scope/Scope.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/scope/Handler.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/scope/Compensate.hbm.xml" />
                
                 <!-- graph.exe mapping files -->
                 <mapping resource="org/jbpm/bpel/graph/exe/LinkInstance.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/exe/ScopeInstance.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/graph/exe/FaultInstance.hbm.xml" />
                
                 <!-- variable.def mapping files -->
                 <mapping resource="org/jbpm/bpel/variable/def/VariableDefinition.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/variable/def/VariableType.hbm.xml" />
                
                 <!-- variable.exe mapping files -->
                 <mapping resource="org/jbpm/bpel/variable/exe/ElementInstance.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/variable/exe/MessageValue.hbm.xml" />
                
                 <!-- sublang.def mapping files -->
                 <mapping resource="org/jbpm/bpel/sublang/def/Snippet.hbm.xml" />
                
                 <!-- alarm mapping files -->
                 <mapping resource="org/jbpm/bpel/alarm/AlarmAction.hbm.xml" />
                
                 <!-- integration.catalog mapping files -->
                 <mapping resource="org/jbpm/bpel/integration/catalog/CatalogEntry.hbm.xml" />
                
                 <!-- integration.def mapping files -->
                 <mapping resource="org/jbpm/bpel/integration/def/CorrelationSetDefinition.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/integration/def/PartnerLinkDefinition.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/integration/def/Correlations.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/integration/def/Correlation.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/integration/def/MessageAction.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/integration/def/ReceiveAction.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/integration/def/ReplyAction.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/integration/def/InvokeAction.hbm.xml" />
                
                 <!-- integration.exe mapping files -->
                 <mapping resource="org/jbpm/bpel/integration/exe/CorrelationSetInstance.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/integration/exe/PartnerLinkInstance.hbm.xml" />
                
                 <!-- endpointref mapping files -->
                 <mapping resource="org/jbpm/bpel/endpointref/EndpointReference.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/endpointref/SoapEndpointReference.hbm.xml" />
                
                 <!-- wsdl mapping files -->
                 <mapping resource="org/jbpm/bpel/wsdl/impl/PropertyImpl.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/wsdl/impl/PartnerLinkTypeImpl.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/wsdl/impl/PropertyAliasImpl.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/wsdl/impl/OperationImpl.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/wsdl/impl/PortTypeImpl.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/wsdl/impl/OperationMember.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/wsdl/impl/MessageImpl.hbm.xml" />
                 <mapping resource="org/jbpm/bpel/wsdl/impl/PartImpl.hbm.xml" />
                
                 </session-factory>
                
                </hibernate-configuration>


                Please let me know how will these two behave in this case over TCP.

                When we configure it over TCP should other properties becommented? Like the Default Datasource and all?

                Thanks
                Dhanush

                • 20. Re: How to deploy a BPEL process using the APIs?
                  dhanushgopinath

                  Alex,

                  I moved this entire deployment to a Webservice Impl that is deployed on a JBOSS AS. So no I presume I can use the default DataSource and not the Hibernate Server Mode over TCP.(Am I right??)

                  I am using the default Data Source, but still the same issue is coming.

                  The issue is

                  18:40:58,385 INFO [TomcatDeployer] deploy, ctxPath=/Workflow3, warUrl=.../tmp/deploy/tmp55362Workflow3-exp.war/
                  18:40:59,103 ERROR [[/Workflow3]] Exception sending context initialized event to listener instance of class org.jbpm.bpel.integration.server.IntegrationConfigurator
                  org.jbpm.bpel.BpelException: process not found: name=Workflow3, targetNamespace=http://www.altair.com/Workflow3, version=null
                   at org.jbpm.bpel.deploy.DeploymentDescriptor.findProcessDefinition(DeploymentDescriptor.java:89)
                   at org.jbpm.bpel.integration.server.IntegrationConfigurator.contextInitialized(IntegrationConfigurator.java:56)


                  if you look at it you can see that when I am trying to deploy the web module it is not able to find the process that was deployed.

                  In this case graphSession.findLatestProcessDefinition is returning null

                  Why is it not able to find?

                  After deploying the process definition i tried to use the same API to find the process definition using the following code: In this case I was able to get it



                  if (processDefinition instanceof BpelProcessDefinition)
                   {
                   BpelGraphSession graphSession = BpelGraphSession.getContextInstance(jbpmContext);
                   graphSession.deployProcessDefinition((BpelProcessDefinition) processDefinition);
                  
                   ProcessDefinition processDefinition2 = graphSession.findLatestProcessDefinition(processDefinition.getName(),"http://www.altair.com/Workflow3");
                  }
                  


                  in this case processDefinition2 was identical as processDefinition.

                  But when I go ahead and deploy web module, it tries to find the deployed process definition it is returned null. Why is this happening.

                  Is there anything else I need to do ?

                  Please let me know. I am following the same code base as given earlier.

                  Thanks
                  Dhanush

                  • 21. Re: How to deploy a BPEL process using the APIs?
                    dhanushgopinath

                    Alex,

                    Any help for the above post will be much appreciated.

                    It is some time i tested it, now with MYSQL DB. But it still giving the smae problem.

                    Thanks & Regards
                    Dhanush

                    • 22. Re: How to deploy a BPEL process using the APIs?
                      aguizar

                       

                      I presume I can use the default DataSource and not the Hibernate Server Mode over TCP.(Am I right??)

                      Yes you are right
                      Why is it not able to find?

                      My guess without looking at the code of your service is that you have not committed the transaction where you deploy the process prior to building the web module. Closing the jbpm context results in committing the transaction.

                      Upon deployment the newly built web module retrieves the process definition from the database in a separate transaction. Your process deployment service must have committed the insertion of the new process definition for the web module to be able to read it.

                      • 23. Re: How to deploy a BPEL process using the APIs?
                        dhanushgopinath

                        Alex,

                        Bingo!!. That was perfect. I got in working now and was able to deploy a few processes. Many Thanks.

                        But sometimes I run into Out Of Memory Exception in JVM. I guess I Need to fine tune the Server or is it with the BPEL ?

                        Many Thanks Again.

                        Dhanush

                        • 24. Re: How to deploy a BPEL process using the APIs?

                          When do you get out of memory ? after several deployments ?
                          there are known issues related with PermGen Space
                          try add these parameters to java

                          -XX:+CMSClassUnloadingEnabled
                          -XX:+CMSPermGenSweepingEnabled
                          -XX:MaxPermSize=256M


                          bye

                          1 2 Previous Next