I've been trying to run a JBPM example from here on Wildfly 8.0.0.Final:
With this example, I encounter numerous errors when deploying to Wildfly via the Maven plugin which I tried to hack my way through to see how far I could get.
Initially, I get problems from a transitive dependency originating from the jbpm jars:
18:28:42,630 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 61) MSC000001: Failed to start service jboss.persistenceunit."jbpm6-example.war#jbpm.unit01": org.jboss.msc.service.StartException in service jboss.persistenceunit."jbpm6-example.war#jbpm.unit01": org.hibernate.InvalidMappingException: Error while parsing file: vfs:/content/jbpm6-example.war/WEB-INF/lib/jbpm-human-task-jpa-6.1.0-SNAPSHOT.jar/META-INF/Taskorm.xml
Caused by: org.hibernate.InvalidMappingException: Error while parsing file: vfs:/content/jbpm6-example.war/WEB-INF/lib/jbpm-human-task-jpa-6.1.0-SNAPSHOT.jar/META-INF/Taskorm.xml
Caused by: org.hibernate.InvalidMappingException: Unable to read XML
Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
at org.hibernate.internal.util.xml.MappingReader.legacyReadMappingDocument(MappingReader.java:325) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
... 20 more
If I tailor the pom to exclude dom4j from being deployed, Hibernate then cannot parse a query in JBPMorm.xml:
HHH000177: Error in named query: GetProcessInstanceIdByCorrelation: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: key near line 1, column 133 [select key.processInstanceId from org.jbpm.persistence.correlation.CorrelationKeyInfo key left join key.properties props where size(key.properties) = cast(:elem_count as integer) and props.value in :properties group by key.id,key.processInstanceId having count(key.id) = :elem_count]
I put a temporary work around for this by editing the query to remove line "size(key.properties) = cast(:elem_count as integer) and" from the file which resulted in this error going away - obviously this is not a solution, but I wanted to see if this was the only remaining error before looking at this in depth. Sadly, it wasn't...
WELD subsequently seems to throw up quite a lot of problems:
org.jboss.weld.exceptions.IllegalStateException: WELD-001332: BeanManager method getBeans() is not available during application initialization
I resolve this issue by restarting Wildfly with the system property: -Dorg.jboss.weld.nonPortableMode=true
Then I get problems relating to Seam references in the example pom (comments say they are necessary for deployment):
- Producer Method [HttpServletRequest] with qualifiers [@Any @Default] declared as [[BackedAnnotatedMethod] @Produces @Typed @RequestScoped protected org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()],
If I remove the Seam references from the pom, I get the following:
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Injector with qualifiers @Default
at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedMethod] @Inject org.sonatype.guice.plexus.converters.PlexusXmlBeanConverter.setTypeConverterBindings(Injector)
And this is where I have decided to give up messing locally and post a question here.
Is JBPM 6.0.1 supported on Wildfly?
If so, is there another Maven based example I can look at to demonstrate BPM deploying to Wildfly?
And if not, when is it likely to be supported?
Given the early errors relating to dom4j class casting and the Hibernate query parsing issue, it feels more than a deployment issue at this point.