Discussion:
[jboss-user] [jBPM] - Re: how to export jbpm database tables ?
eric jiang
2012-09-18 09:56:56 UTC
Permalink
eric jiang [https://community.jboss.org/people/kanawalo] created the discussion

"Re: how to export jbpm database tables ?"

To view the discussion, visit: https://community.jboss.org/message/760124#760124

--------------------------------------------------------------
I got it!!!

this is the answer:
these files need to be modified:
* db/persistence.xml
     <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

* task-service/resources/META-INF/persistence.xml
     <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
      <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
      <property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:test" />

* db/jBPM-ds.xml * If you're using the JBoss AS 5 server
this is on JBPM site, I also changed it.
     <connection-url>jdbc:oracle:thin:@localhost:1521:test</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>scott</user-name>
    <password>scott</password>

* standalone.xml * If you're using the JBoss AS 7 server
<datasource jndi-name="java:jboss/datasources/jbpmDS" pool-name="H2DS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
                    <connection-url>jdbc:oracle:thin:@localhost:1521:test</connection-url>
                    <driver>oracle</driver>
                    <pool>
                        <min-pool-size>1</min-pool-size>
                        <max-pool-size>4</max-pool-size>
                        <prefill>false</prefill>
                        <use-strict-min>false</use-strict-min>
                        <flush-strategy>FailingConnectionOnly</flush-strategy>
                    </pool>
                    <security>
                       <user-name>scott</user-name>
                       <password>scott</password>
                    </security>
                    <validation>
                       <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
                       <validate-on-match>false</validate-on-match>
                       <background-validation>false</background-validation>
                    </validation>
                </datasource>
                <drivers>
                    <driver name="oracle" module="com.oracle">
                        <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

                    </driver>
                </drivers>
            </datasources>



* db/driver_jar_moudle.xml
     <resource-root path="ojdbc14.jar"/>

after that, pls run
1. ant install.demo.db
2. ant start.demo.db


:^0
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/760124#760124]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
eric jiang
2012-09-20 07:38:54 UTC
Permalink
eric jiang [https://community.jboss.org/people/kanawalo] created the discussion

"Re: how to export jbpm database tables ?"

To view the discussion, visit: https://community.jboss.org/message/760521#760521

--------------------------------------------------------------
After I changed the DB configuation files above. I got new problem when running the EvaluationExample.java.  Before that, the *.war were deployed successfully in JBoss. Anybody know what is the cause? Thanks in advance.

| 0 | 20/09 15:29:55,781[main] ERROR service.hornetq.HornetQTaskClientConnector.connect  - *Unable to connect to server using configuration org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5445&host=127-0-0-1* |
org.jbpm.workflow.instance.WorkflowRuntimeException: [com.sample.humantask:1 - Review:2] -- Could not connect task client: on ip: 127.0.0.1 - port: 5445
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:130) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164) |
| | at org.jbpm.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:55) |
| | at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:51) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164) |
| | at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49) |
| | at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) |
| | at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) |
| | at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188) |
| | at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:303) |
| | at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:168) |
| | at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:138) |
| | at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1082) |
| | at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320) |
| | at org.jbpm.examples.humantask.HumanTaskExample.main(HumanTaskExample.java:42) |
Caused by: java.lang.IllegalArgumentException: Could not connect task client: on ip: 127.0.0.1 - port: 5445
| | at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.connect(GenericHTWorkItemHandler.java:119) |
| | at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:143) |
| | at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70) |
| | at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105) |
| | at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) |
| | ... 18 more |



When I open http://localhost:8080/jbpm-console/ http://localhost:8080/jbpm-console/  and logged in to it. I also got problem.
* URL: ' http://localhost:8080/gwt-console-server/rs/tasks/krisv http://localhost:8080/gwt-console-server/rs/tasks/krisv'
* Action: 'org.jboss.bpm.console.client.task.LoadTasksAction'
* Exception: 'class com.google.gwt.http.client.RequestException'
h1. HTTP Status 500 -
----
*type* Exception report
*message*
*description* The server encountered an internal error () that prevented it from fulfilling this request.
*exception*
org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: Could not initialize class org.jbpm.integration.console.StatefulKnowledgeSessionUtil$SessionHolder org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345) org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321) org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
*root cause*
java.lang.NoClassDefFoundError: Could not initialize class org.jbpm.integration.console.StatefulKnowledgeSessionUtil$SessionHolder org.jbpm.integration.console.StatefulKnowledgeSessionUtil.getStatefulKnowledgeSession(StatefulKnowledgeSessionUtil.java:131) org.jbpm.integration.console.SessionInitializer.<init>(SessionInitializer.java:25) org.jbpm.integration.console.TaskManagement.<init>(TaskManagement.java:51) org.jbpm.integration.console.ManagementFactory.createTaskManagement(ManagementFactory.java:26) org.jbpm.integration.console.ManagementFactory.createTaskManagement(ManagementFactory.java:19) org.jboss.bpm.console.server.TaskListFacade.getTaskManagement(TaskListFacade.java:72) org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:101) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209) org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

Pls advise. :-/
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/760521#760521]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Lisa DeSouza
2013-01-24 11:32:14 UTC
Permalink
Lisa DeSouza [https://community.jboss.org/people/lisadesouza89] created the discussion

"Re: how to export jbpm database tables ?"

To view the discussion, visit: https://community.jboss.org/message/794008#794008

--------------------------------------------------------------
any progress? I'm facing the same problem with jBPM 5.4, JBOSS and MySQL
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794008#794008]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
eric jiang
2013-01-25 00:43:15 UTC
Permalink
eric jiang [https://community.jboss.org/people/kanawalo] created the discussion

"Re: how to export jbpm database tables ?"

To view the discussion, visit: https://community.jboss.org/message/794196#794196

--------------------------------------------------------------
Hi Lisa,

Becase the limited project development time, we finally give up JBPM5 but changed to JBPM4.4 which is a more simply version.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794196#794196]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2013-01-25 05:44:17 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: how to export jbpm database tables ?"

To view the discussion, visit: https://community.jboss.org/message/794219#794219

--------------------------------------------------------------
Hi Eric Jiang,

Looking at the that you got there, it looks like Human Task Service is not started on localhost port 5445, It can be caused by that port is in use.

You can make sure that port 5445 is not used by other application / service before starting the human task service

Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794219#794219]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...