I got the same exception using jbpm 3.2 on JBoss 5. After 4 hours of investigation
I've found that my development approach was not correct.
The main cause of the problem was that I was trying to use the JBPM enterprise
installation from a Web Application deployed on the same JBoss container. My first attempt
was to add the jbpm-identity and jbpm-jpdl jars as J2EE module dependencies and deploy
them inside WEB-INF/lib of my War.
Initially, this step was required to avoid class not found exception while accessing to
the jbpm structures.
I think that the java.lang.ClassCastException occurred because the interface of
org.jbpm.msg.jms.JmsMessageServiceFactory is not present inside jbpm-identity and
jbpm-jpdl jars. Instead the interface is located inside the jbpm-enterprise.jar
directory.
Namely, I think that Java run-time raises the exception because jbpm-enterprise.jar is
loaded by a different Java class loader.
I solved my problem as follows:
| I removed jbpm-* jars from my WEB-INF/lib deployment
| I deployed the war of my application inside deploy/jbpm directory of JBoss, instead of
deploy. This avoid the class not found exceptions
| I added the web.xml and jboss-web.xml deployment descriptors inside my WEB-INF
directory, using the contents described in
http://docs.jboss.com/jbpm/v3.2/userguide/html_single/#clientcomponents. This avoid jms
name not bound exceptions.
|
|
| I think that JBoss documentation on how to use jbpm from Web and enterprise
applications really lacks details and a good tutorial.
|
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270272#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...