-
1. Re: Problem trying Class Tutorial
cpob Jul 18, 2006 12:27 PM (in response to falazar)"falazar" wrote:
The first image has a com.jbay.action package which I dont seem to have.
That's the package for where you want the class. It will get created when you click finish. The package name doesn't really matter."falazar" wrote:
the org.jbpm.graph.def.ActionHandler doesnt appear to exist either.
Do you not have the jbpm.jar in your project's classpath? -
2. Re: Problem trying Class Tutorial
falazar Jul 18, 2006 12:50 PM (in response to falazar)I set the CLASSPATH to jbpm/src/resources/jbpm.jar
in the terminal (Fedora Core 4) and restarted eclipse, but that didnt appear to have any effect.
Is that the correct location of the jar?
Do I need to set it within eclipse?
James -
3. Re: Problem trying Class Tutorial
cpob Jul 18, 2006 1:01 PM (in response to falazar)That's now how you set the path in eclipse. You have to modify your project (Project menu -> Properties) and in there should be settings for build path /libraries/etc.
You point to it through there. -
4. Re: Problem trying Class Tutorial
falazar Jul 18, 2006 4:41 PM (in response to falazar)Set the classpath and moved forward....
The last part of it is throwing an error.... When running figure 4.8
CastException error... but I dont know why
15:30:49,146 [main] DEBUG GraphElement : event 'process-start' on 'ProcessDefinition(TestActionClass)' for 'Token(/)'
15:30:49,149 [main] DEBUG GraphElement : event 'before-signal' on 'StartState(start)' for 'Token(/)'
15:30:49,150 [main] DEBUG GraphElement : event 'node-leave' on 'StartState(start)' for 'Token(/)'
15:30:49,151 [main] DEBUG GraphElement : event 'transition' on 'Transition(to_auction)' for 'Token(/)'
15:30:49,152 [main] DEBUG GraphElement : executing action 'action[hello]'
15:30:49,161 [main] ERROR GraphElement : action threw exception: com.jbay.action.HelloActionHandler
java.lang.ClassCastException: com.jbay.action.HelloActionHandler
at org.jbpm.graph.def.Action.execute(Action.java:122)
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.Transition.take(Transition.java:106)
at org.jbpm.graph.def.Node.leave(Node.java:382)
at org.jbpm.graph.node.StartState.leave(StartState.java:70)
at org.jbpm.graph.exe.Token.signal(Token.java:174)
at org.jbpm.graph.exe.Token.signal(Token.java:123)
at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)
at com.jbay.HelloTest.testProcess(HelloTest.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
1 -
5. Re: Problem trying Class Tutorial
kukeltje Jul 18, 2006 4:53 PM (in response to falazar)do you have some other jbpm jar/sar on the classpath?
-
6. Re: Problem trying Class Tutorial
falazar Jul 18, 2006 4:59 PM (in response to falazar)Only the Three TestJBPM ones that it included,
and the jBPM Library (3.1.1)
James Ratcliff -
7. Re: Problem trying Class Tutorial
kukeltje Jul 18, 2006 5:05 PM (in response to falazar)sorry, I mistyped.... is there more then one com.jbay.action.HelloActionHandler on the classpath?
-
8. Re: Problem trying Class Tutorial
falazar Jul 18, 2006 5:13 PM (in response to falazar)It does not appear there is the HelloActionHandler in the path at all.. In eclipse I checked the path, and it is not there, but I cannot find out how to add it to the classpath their either.
James -
9. Re: Problem trying Class Tutorial
kukeltje Jul 19, 2006 1:01 AM (in response to falazar)if you create a jbpm project in the gpd and a processdefinition, there is a src dir. The HelloActionHandler should go there
-
10. Re: Problem trying Class Tutorial
falazar Jul 19, 2006 9:13 AM (in response to falazar)There is a src/java in the project, and a src, if I put them in the plain src, it wont let me test, so they are in the src/java.
Getting confusing with the pictures in the Ch 4, cause they show in two different spots.
Attaching a screen shot of what I have right now, hopefully that is right... also shows part of the error.
http://www.falazar.com/ut/Screenshot-3.png
James[/img] -
11. Re: Problem trying Class Tutorial
cpob Jul 19, 2006 9:19 AM (in response to falazar)I almost posted this yesterday, but I figured it was obvious, also your other screen shot showed the class implementing the ActionHandler interface, so I assumed it still did.
It needs to implement org.jbpm.graph.def.ActionHandler -
12. Re: Problem trying Class Tutorial
kukeltje Jul 19, 2006 9:21 AM (in response to falazar)your class should extend ActionHandler. Because you forgot that, jBPM cannot cast your class to a generic ActionHandler and execute the method
-
13. Re: Problem trying Class Tutorial
falazar Jul 19, 2006 10:50 AM (in response to falazar)Hmm ok yes, Im not sure how that got messed up, fixed that part, but still getting another failure that I was getting sometimes yesterday as well.
http://www.falazar.com/ut/Screenshot-4.png
junit.framework.AssertionFailedError: The greeting variable should not exist
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNotNull(Assert.java:220)
at com.jbay.action.HelloTest.testActionHandler(HelloTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) -
14. Re: Problem trying Class Tutorial
kukeltje Jul 19, 2006 12:01 PM (in response to falazar)I cannot make anything out of the screenshot....