[JBoss jBPM] - exception-handler with custom exception in jbpm 3.2.6
by massimo.zanette
Hi,
I'm not able to define an exeption-handler that handle Exception included inside the process archive. I'm using jbpm 3.2.6SP1 with jboss 5.0.1 and jboss 4.2.3.
That's the problem:
Using JBPM console I deploy a process archive with this process definition:
| <?xml version="1.0" encoding="UTF-8"?>
| <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="testException">
| <start-state name="start">
| <transition to="state1"></transition>
| <event type="node-leave">
| <script name="sysout">
| java.lang.System.out.println("---STARTING PROCESS testException--- ");
| </script>
| </event>
| </start-state>
| <state name="state1">
| <transition to="end-state">
| <action name="ThrowMyException" class="com.sample.action.ThrowMyExceptionActionHandler"></action>
| </transition>
| </state>
| <end-state name="end-state">
| <event type="node-enter">
| <script name="sysout">
| java.lang.System.out.println("---END PROCESS testException--- ");
| </script>
| </event>
| </end-state>
| <exception-handler exception-class="com.sample.action.MyException">
| <action name="exceptionHandler"
| class="com.sample.action.MyExceptionHandler">
| </action>
| </exception-handler>
| </process-definition>
|
When the execution enter "state1" i can see that:
- com.sample.action.ThrowMyExceptionActionHandler is entered
- This action is empty, it only throws a com.sample.action.MyException-
- com.sample.action.MyExceptionHandler is not reached and JBPMConsole report this error:
Error signalling token: An exception of type "org.jbpm.JbpmException"
was thrown. The message is: class not found 'com.sample.action.MyException'
If i change the exception-class with java.lang.Exception inside the excpetion-handler the exception will be correctly caught and the process execution finish without problems.
| <exception-handler exception-class="java.lang.Exception">
| <action name="exceptionHandler"
| class="com.sample.action.MyExceptionHandler">
| </action>
| </exception-handler>
|
I don't experience this problem if i try this process with a simple JUnit test case.
Am i doing something wrong?
Thanks
Max
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249369#4249369
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249369
16 years, 9 months
[JBoss Portal] - Re: Help!!! HTTP Status 500 Error
by tripathi_sanjiv
i am getting following error during running portal on local system error is as follows
------------------------------------------------------------------------------------
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NullPointerException
org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:276)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.lang.NullPointerException
org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNode(PersistentPortalObjectContainer.java:252)
org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getContext(AbstractPortalObjectContainer.java:100)
org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getContext(AbstractPortalObjectContainer.java:80)
org.jboss.portal.core.model.portal.DefaultPortalCommandFactory.doMapping(DefaultPortalCommandFactory.java:72)
org.jboss.portal.core.controller.Controller.handle(Controller.java:208)
org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:250)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.
JBossWeb/2.0.1.GA
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249347#4249347
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249347
16 years, 9 months
[Installation, Configuration & DEPLOYMENT] - make sure my hibernate config in jboss remains the same??
by Elhanan
hi..
we have an ear which runs on jboss 4.2.3 and on was 6.1
the ear uses hibernate and beanlib (for cloning) lately i've disocvered that becouse of hte flat classloading jboss, our hibernate configuartion is radically altered then it is in was, for example in jboss hibenrate version is 3.2.4 sp1, while in websphere ,it's hibernate 3.2.3,
jboss configures hibernate to use javaasist, while in was it's cglib.
everytime we try to change the classloading in jboss to tree so it would focus on our ear, we crash. so how do i make sure my hibernate config remains the same in both enviorments (same jar versions, same confiugraitons settings).
for example can i print out the configuation settings Congiuration class and compare them against enviorments? if they are exactly the same, then will i be sure?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249340#4249340
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249340
16 years, 9 months