-
1. Re: Invoking JBPM business process from Seam pageflow
manarh May 4, 2015 3:28 AM (in response to aniket_nakhate)Please be warned that Seam 2.x doesn't work (actually nobody has tried that but it is almost true) with the latest JBPM 6.x or with 5.x or 4.x.
Community Seam 2.3.x was using my updated fork of JBPM 3.2.10.SP3 to Hibernate 4 API (jboss-seam/pom.xml at Seam_2_3 · seam2/jboss-seam · GitHub) but that was just a quick hack to use higher Hibernate 4 API instead of Hibernate 3 API.
If you would like to use JBPM 6 your path is Java EE 7 and CDI APIs.
-
2. Re: Invoking JBPM business process from Seam pageflow
pjotrovsky May 4, 2015 5:59 AM (in response to manarh)Just to let you know: you can give it a try: jBPM 3 -> Hibernate 4.3 Migration: petrandreev/jBPM3 at hib43 · GitHub
(contains fixes for two forgotten JIRA issues, tests passed)
Unfortunately I`ll stick to jBPM3 too until all my processes are migrated to BPMN.
-
3. Re: Invoking JBPM business process from Seam pageflow
sreenathac Jul 18, 2015 11:43 PM (in response to manarh)Hi Morek,
I am using 2.3.1 and JBPM 3.2 on Jboss 5.1 and now I am migrating to WildFly 8.2, as per my analysis wildfly 8.2 supports JBPM6.2 so I am planning to migrate from JBPM 3.2 to 6.2. As per above comments I understood that seam 2.3.1 will not support JBPM 6.
Is there any way to migrate my application to WidFly8.2.
Thanks,
Sreenath
-
4. Re: Invoking JBPM business process from Seam pageflow
manarh Jul 20, 2015 3:40 AM (in response to sreenathac)Hi, you can use Seam 2.3.x with JBPM 3.2 on Wildfly with bundled Hibernate libs in your application.
If you need to use higher version of JBpm like 4/5/6 you should refactor your application and replace Seam 2 with CDI.
-
5. Re: Invoking JBPM business process from Seam pageflow
sreenathac Jul 20, 2015 1:12 PM (in response to manarh)Hi Marek,
Thank you for your response, Is there any hibernate bundle lib which is already developed ?.If there is no such bundle,could you please share the classes which need to change and what is the impact on the existing hibernate,
-
6. Re: Invoking JBPM business process from Seam pageflow
manarh Jul 21, 2015 3:57 AM (in response to pjotrovsky)Hi Petr,
Do you mean those fixes are missing on top of this my fork mareknovotny/jbpm3-seam at development · GitHub ? That is possible.
-
7. Re: Invoking JBPM business process from Seam pageflow
manarh Jul 21, 2015 4:04 AM (in response to sreenathac)Hi Sreenath,
We are not on the same page , what I meant by bundling of hibernate jars is that you should include hibernate libs in your application deployment instead of relying on server runtime libraries. See an example in my older blog Seam 2 JPA example on JBoss AS7 in step 3 how to bundle hibernate jars in WAR type deployment. Similar way is when you need them in EAR deployment.
Hope that helps!
-
8. Re: Invoking JBPM business process from Seam pageflow
sreenathac Jul 23, 2015 11:38 AM (in response to manarh)Hi Marek,
Thanks for your post, now we are on same page I guess. However I tried as you mentioned in the above link, but I am facing UserTransaction exception, please find the below error log.
20:58:15,535 INFO [org.hibernate.cfg.Configuration] (MSC service thread 1-1) HHH000221: Reading mappings from resource: org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml
20:58:15,543 INFO [org.hibernate.cfg.Configuration] (MSC service thread 1-1) HHH000041: Configured SessionFactory: null
20:58:15,798 INFO [org.hibernate.dialect.Dialect] (MSC service thread 1-1) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
20:58:15,985 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-1) HHH000397: Using ASTQueryTranslatorFactory
20:58:16,004 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.1.3.Final
20:58:19,319 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./seam-todo: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./seam-todo: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_11]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_11]
Caused by: java.lang.RuntimeException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.bpm.jbpm
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:222)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
... 3 more
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.bpm.jbpm
at org.jboss.seam.Component.newInstance(Component.java:2208)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:343)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:317)
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:143)
at org.jboss.seam.init.Initialization.init(Initialization.java:813)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193)
... 7 more
Caused by: java.lang.RuntimeException: could not deploy a process definition
at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:303)
at org.jboss.seam.bpm.Jbpm.startup(Jbpm.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_11]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_11]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_11]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_11]
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
at org.jboss.seam.Component.callComponentMethod(Component.java:2313)
at org.jboss.seam.Component.callCreateMethod(Component.java:2236)
at org.jboss.seam.Component.newInstance(Component.java:2196)
... 14 more
Caused by: org.hibernate.TransactionException: Unable to locate JTA UserTransaction
at org.hibernate.engine.transaction.internal.jta.JtaTransaction.locateUserTransaction(JtaTransaction.java:86)
at org.hibernate.engine.transaction.internal.jta.JtaTransaction.doBegin(JtaTransaction.java:69)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162)
at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1435)
at org.jbpm.persistence.db.DbPersistenceService.beginTransaction(DbPersistenceService.java:120)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:114)
at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:328)
at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:648)
at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:189)
at org.jboss.seam.bpm.Jbpm.deployProcess(Jbpm.java:319)
at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:297)
... 24 more
20:58:19,356 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "todo-ear.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./seam-todo" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./seam-todo: Failed to start service
Caused by: java.lang.RuntimeException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.bpm.jbpm
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.bpm.jbpm
Caused by: java.lang.RuntimeException: could not deploy a process definition
Caused by: org.hibernate.TransactionException: Unable to locate JTA UserTransaction"}}
20:58:19,448 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed "mysql-connector-java-5.1.23-bin.jar" (runtime-name : "mysql-connector-java-5.1.23-bin.jar")
20:58:19,547 INFO [org.jboss.as.server] (ServerService Thread Pool -- 27) JBAS018559: Deployed "todo-ear.ear" (runtime-name : "todo-ear.ear")
20:58:19,608 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./seam-todo: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./seam-todo: Failed to start service
20:58:19,741 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:10190/management
20:58:19,741 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:10190
20:58:19,741 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.2.0.Final "Tweek" started (with errors) in 24103ms - Started 614 of 692 services (3 services failed or missing dependencies, 123 services are lazy, passive or on-demand)
20:58:19,963 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 42) JBAS011410: Stopping Persistence Unit (phase 2 of 2) Service 'todo-ear.ear/todo-ejb.jar#todo'
20:58:20,006 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 42) JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service 'todo-ear.ear/todo-ejb.jar#todo'
20:58:20,008 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010409: Unbound data source [java:/todoDatasource]
20:58:20,027 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010418: Stopped Driver service with driver-name = mysql-connector-java-5.1.23-bin.jar
20:58:20,095 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment mysql-connector-java-5.1.23-bin.jar (runtime-name: mysql-connector-java-5.1.23-bin.jar) in 195ms
20:58:20,122 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015974: Stopped subdeployment (runtime-name: jboss-seam.jar) in 221ms
20:58:20,122 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015974: Stopped subdeployment (runtime-name: todo-ejb.jar) in 221ms
20:58:20,186 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015974: Stopped subdeployment (runtime-name: todo.war) in 285ms
20:58:20,190 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment todo-ear.ear (runtime-name: todo-ear.ear) in 291ms
20:58:20,327 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 2) JBAS014901: Content removed from location D:\Migration_Workspace\Jboss\Jboss-8\wildfly-8.2.0.Final\standalone\data\content\c2\64e2114579474d13dd808a510fc74e762dda8c\content
20:58:20,327 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "mysql-connector-java-5.1.23-bin.jar" (runtime-name: "mysql-connector-java-5.1.23-bin.jar")
20:58:20,328 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "todo-ear.ear" (runtime-name: "todo-ear.ear")
20:58:20,330 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.subunit."todo-ear.ear"."jboss-seam.jar".deploymentCompleteService (missing) dependents: [service jboss.deployment.unit."todo-ear.ear".deploymentCompleteService]
Any inputs from your side ?
-
9. Re: Invoking JBPM business process from Seam pageflow
manarh Jul 24, 2015 4:24 AM (in response to sreenathac)you still are using hibernate at this error Validator 5.1.3 from server runtime as in your log is:
20:58:16,004 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.1.3.Final
20:58:19,319 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./seam-todo:
I should referenced DvdStore than the JPA example as there is also jbpm used anyway, read this Dvdstore example migration for JBoss AS 7.x too and what is important is addig exclusions for hibernate in jboss-deployment-structure.xml and set up transaction.manager_lookup_class property. Additionally set
jboss.as.jpa.providerModule property in persistence.xml. As that DvdStore blog is for JBoss AS 7.0 there could be some small differences, but you should get the way how to solve it
-
10. Re: Invoking JBPM business process from Seam pageflow
sreenathac Jul 29, 2015 10:55 AM (in response to manarh)Hi Marek,
Do I need to specifically exclude the hibernate validator or excluding hibernate is sufficient, I have my Jboss deployment Structure file under ear/META-INF folder and I have excluded hibernate. Still it is loading the hibernate validator 5.1.3. Below is my deployment Structure file
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclusions>
<module name="org.hibernate" slot="main"/>
</exclusions>
<dependencies>
<module name="org.dom4j" export="true"/>
<module name="javax.faces.api" export="true"/>
<module name="com.sun.jsf-impl" export="true"/>
<module name="org.javassist" export="true"/>
<module name="org.hibernate" export="true"/>
<module name="org.hibernate.envers" export="true"/>
<module name="org.apache.commons.logging" export="true"/>
<module name="org.apache.commons.collections" export="true"/>
</dependencies>
</deployment>
<sub-deployment name="project.war">
<exclusions>
<module name="javax.faces.api"/>
<module name="com.sun.jsf-impl"/>
<module name="org.hibernate"/>
</exclusions>
<dependencies>
<module name="javax.faces.api"/>
<module name="com.sun.jsf-impl"/>
</dependencies>
</sub-deployment>
<sub-deployment name="project-ejb.jar">
<exclusions>
<module name="org.hibernate"/>
</exclusions>
</sub-deployment>
</jboss-deployment-structure>
Please let me know if I am missing anything.
-
11. Re: Invoking JBPM business process from Seam pageflow
sreenathac Jul 29, 2015 12:21 PM (in response to sreenathac)I am getting the below exception.
java.lang.ClassNotFoundException: org.jboss.seam.pdf.DocumentStoreServlet.
I identified this Jar exists in jboss-seam-pdf.jar and I added this Jar in project.war/WEB-INF/lib, still I am getting the ClassNoTFound Exception.
Below is my stack trace
21:44:45,029 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.1.3.Final
21:44:45,966 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.subunit."project-ear.ear"."project.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."project-ear.ear"."project.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "project.war" of deployment "project-ear.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_11]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_11]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: org.jboss.seam.pdf.DocumentStoreServlet from [Module "deployment.project-ear.ear.project.war:main" from Service Module Loader]
at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.checkDeclaredApplicationClassAsServlet(JaxrsScanningProcessor.java:292)
at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scanWebDeployment(JaxrsScanningProcessor.java:154)
at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:105)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 5 more
Caused by: java.lang.ClassNotFoundException: org.jboss.seam.pdf.DocumentStoreServlet from [Module "deployment.project-ear.ear.project.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.checkDeclaredApplicationClassAsServlet(JaxrsScanningProcessor.java:290)
... 8 more
21:44:45,977 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "project-ear.ear")]) - failure description: {
"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"project-ear.ear\".\"project.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"project-ear.ear\".\"project.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment \"project.war\" of deployment \"project-ear.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: org.jboss.seam.pdf.DocumentStoreServlet from [Module \"deployment.project-ear.ear.project.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.jboss.seam.pdf.DocumentStoreServlet from [Module \"deployment.project-ear.ear.project.war:main\" from Service Module Loader]"},
-
12. Re: Invoking JBPM business process from Seam pageflow
manarh Jul 30, 2015 9:30 AM (in response to sreenathac)Sreenath Reddy wrote:
Hi Marek,
Do I need to specifically exclude the hibernate validator or excluding hibernate is sufficient, I have my Jboss deployment Structure file under ear/META-INF folder and I have excluded hibernate. Still it is loading the hibernate validator 5.1.3. Below is my deployment Structure file
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclusions>
<module name="org.hibernate" slot="main"/>
</exclusions>
<dependencies>
<module name="org.hibernate" export="true"/>
<module name="org.hibernate.envers" export="true"/>
I guess you still have included above the dependencies to hibernate. Just remove these 2 lines and it should be done. And certainly you need hibernate-validator.jar in META-INF/lib of your ear.
-
13. Re: Invoking JBPM business process from Seam pageflow
manarh Jul 30, 2015 9:34 AM (in response to sreenathac)Are you sure you have updated war in your EAR deployment?
-
14. Re: Invoking JBPM business process from Seam pageflow
sreenathac Jul 31, 2015 5:25 AM (in response to manarh)Hi Marek,
Thanks for the reply, I added the jboss-seam-pdf jar which is in Seam2.2.0 lib, but the class DocumentStoreServlet is not available in that Jar. I have added the appropriate jar and the issue was resolved. Bus still my jars are loading from hibernate 5.1. I and I am facing an issue while checking for Named queries, created a seperate thread for this
Hibernate NamedQuery Exception while migrating from Jboss 5.1 to WildFly 8.2
Please have a look at this issue and let me know if I am missing anything.