Hi,
I am trying to create timer programatically.
But I am getting class cast exception when registring the action for timer.
| CreateTimerAction cta = new CreateTimerAction();
| cta.setTimerName("myTimer");
|
| cta.setDueDate("1 minutes");
| cta.setTransitionName("myTransition" );
|
| Action action = null;
| String actionName = "MydActionHandler";
| Class actionType =
ClassLoaderUtil.getClassLoader().loadClass(actionName);
| try {
|
| action =
(org.jbpm.graph.def.Action) actionType.newInstance()
| cta.setTimerAction(action);
| } catch (Exception e) {
| log.error("error msgs =
"+e.toString());
|
| }
the log is as follows
couldn't instantiate action 'com.TrialActions.SecondActionHandler', of type
'com.TrialActions.SecondActionHandler'
| java.lang.ClassCastException
| at
com.TrialActions.InJoinActionHandler.execute(InJoinActionHandler.java:52)
| at org.jbpm.graph.def.Action.execute(Action.java:123)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
| at
org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
| at org.jbpm.graph.def.Node.enter(Node.java:301)
| at
org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at
org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:161)
| at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$a65f5a67.enter(<generated>)
Could someone pls. tell me what is going wrong. and how to correct it.
Thanks in advance
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954145#3954145
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954145
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user