0 Replies Latest reply on Dec 13, 2007 1:33 AM by manjunath mone

    java.lang.ClassCastException: com.sample.action.AutomatedAsy

    manjunath mone Newbie

      Hi,

      I am getting classcastException while calling the action handler in the transition like this.

      
       <transition name="Check Duplicatelist" to="Check Duplicatelist">
       <action class = "com.sample.action.AutomatedAsyncflowHandler">
       <message>CheckDuplicatelist</message>
       </action>
       </transition>
      
      




      my action handler is
      package com.sample.action;
      
      import org.jbpm.graph.def.ActionHandler;
      import org.jbpm.graph.exe.ExecutionContext;
      
      public class AutomatedAsyncflowHandler implements ActionHandler {
      
       private static final long serialVersionUID = 1L;
      
       /**
       * The message member gets its value from the configuration in the
       * processdefinition. The value is injected directly by the engine.
       */
       String message;
      
       /**
       * A message process variable is assigned the value of the message
       * member. The process variable is created if it doesn't exist yet.
       */
       public void execute(ExecutionContext context) throws Exception {
       context.getContextInstance().setVariable("message", message);
      
       System.out.println("i am in the MessageActionHandler" + message);
       }
      
      
      }
      
      


      this exception is coming for me

      java.lang.ClassCastException: com.sample.action.AutomatedAsyncflowHandler
      at org.jbpm.graph.def.Action.execute(Action.java:121)
      at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
      at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
      at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
      at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
      at org.jbpm.graph.def.Transition.take(Transition.java:138)
      at org.jbpm.graph.def.Node.leave(Node.java:393)
      at org.jbpm.graph.node.StartState.leave(StartState.java:70)
      at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke()
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$ad0ec870.leave()
      at org.jbpm.graph.exe.Token.signal(Token.java:194)
      at org.jbpm.graph.exe.Token.signal(Token.java:157)
      at org.jbpm.jsf.core.action.SignalActionListener.handleAction(SignalActionListener.java:56)
      at org.jbpm.jsf.core.impl.JbpmActionListenerWrapper.processAction(JbpmActionListenerWrapper.java:82)
      at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
      at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:758)
      at javax.faces.component.UICommand.broadcast(UICommand.java:368)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
      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)


      please find the solution for this.Its urgent in my project.

      thanks
      Mone