[jboss-user] [JBoss jBPM] - Help on Exception Handlers

suchi1247 do-not-reply at jboss.com
Tue Sep 4 06:56:24 EDT 2007


Hi,

Iam new to JBPM and iam trying to test Exception Handling in jBPM.I didnt find any Examples on Exception Handling. So i have tried like this from previous forums and docs.
 
  |   <node name="node1">
  |       <transition name="" to="end1"></transition>
  |      <exception-handler>
  |       	          <action class="com.iton.classes.MyExceptionHandler"></action>
  |      </exception-handler>
  |      <action class="com.iton.classes.NodeAction"></action>
  |    </node> 

Actually..I dont know how to write this class  and what should it contain.
But i have written like :


  | 
  | public class MyExceptionHandler extends ExceptionHandler{
  | 
  | public MyExceptionHandler(){
  | 	System.out.println("In MyExceptionHandler");
  | }
  | }
  | 

I got the below exception :
  | 
  | 15:55:45,500 INFO   [STDOUT] In MyExceptionHandler
  | 15:55:45,500 ERROR  [[TestServlet]] Servlet.service() for servlet TestServlet threw exception
  | org.jbpm.graph.def.DelegationException: com.iton.classes.MyExceptionHandler
  |         at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:367)
  |         at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
  |         at org.jbpm.graph.def.Node.execute(Node.java:343)
  |         at org.jbpm.graph.def.Node.enter(Node.java:318)
  |         at org.jbpm.graph.def.Transition.take(Transition.java:151)
  |         at org.jbpm.graph.def.Node.leave(Node.java:393)
  |         at org.jbpm.graph.node.StartState.leave(StartState.java:70)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:194)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:139)
  |         at com.iton.servlets.TestServlet.doGet(TestServlet.java:32)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  |         at java.lang.Thread.run(Thread.java:595)
  | Caused by: java.lang.ClassCastException: com.iton.classes.MyExceptionHandler
  |         at org.jbpm.graph.def.Action.execute(Action.java:121)
  |         at org.jbpm.graph.def.ExceptionHandler.handleException(ExceptionHandler.java:60)
  |         at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  | 
  | 


Please some one help me to write the handling class properly.


Thanks in advance..


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080813#4080813

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080813



More information about the jboss-user mailing list