Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
04. Aug 2008, 11:09 CET | Link

Hi everybody,
I have a problem concerning the jbpm-integration into seam - especially deployment. I guess my understanding of this integration is not quite right and I hope that someone can help me with it.
I have a small web-application running on my JBoss 4.2.2. It was build with JBoss-Tools out of Eclipse. After reading that jbpm-processdefinitons shouldn't be deployed via components.xml (multiple deployments of the same process..) I decided to use the jbpm-web-console which is also quite handy during development. Long Story short - my app is running - jbpm-processes are deployed (via web-console) and running nicely, too.
For testing purposes i temporarily switch back to businessprocess-deployment via components.xml. Somehow this kind of deployment differs from the other, because after that, i get a NPE because the process-classloader is not able to find my Action-Handler (it's called at the timer-event).
I am a bit confused about this error - because all I did was adding the process-def to components.xml and restart my app. Does anybody know what my problem could be? - Is something wrong with my jBPM-Integration? (I am using Seam 2.0.2SP1 and jBpm 3.2.3)

11:01:57,859 ERROR [Delegation] couldn't instantiate delegation class 'org.domain.SeamProcessTest.action.TimerActionHandler'
java.lang.NullPointerException
	at org.jbpm.instantiation.FieldInstantiator.newInstance(FieldInstantiator.java:105)
	at org.jbpm.instantiation.FieldInstantiator.instantiate(FieldInstantiator.java:48)
	at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:163)
	at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:125)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.instantiation.Delegation_$$_javassist_4.getInstance(Delegation_$$_javassist_4.java)
	at org.jbpm.graph.def.Action.execute(Action.java:121)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.graph.def.Action_$$_javassist_63.execute(Action_$$_javassist_63.java)
	at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:259)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.graph.node.State_$$_javassist_8.executeAction(State_$$_javassist_8.java)
	at org.jbpm.job.Timer.execute(Timer.java:56)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.job.Job_$$_javassist_54.execute(Job_$$_javassist_54.java)
	at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:173)
	at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
11:01:57,890 ERROR [GraphElement] action threw exception: null
java.lang.NullPointerException
	at org.jbpm.graph.def.Action.execute(Action.java:122)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.graph.def.Action_$$_javassist_63.execute(Action_$$_javassist_63.java)
	at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:259)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.graph.node.State_$$_javassist_8.executeAction(State_$$_javassist_8.java)
	at org.jbpm.job.Timer.execute(Timer.java:56)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.job.Job_$$_javassist_54.execute(Job_$$_javassist_54.java)
	at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:173)
	at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
11:01:57,890 WARN  [Timer] timer action threw exception
org.jbpm.graph.def.DelegationException
	at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:382)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.graph.def.ProcessDefinition_$$_javassist_19.raiseException(ProcessDefinition_$$_javassist_19.java)
	at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:373)
	at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:276)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.graph.node.State_$$_javassist_8.executeAction(State_$$_javassist_8.java)
	at org.jbpm.job.Timer.execute(Timer.java:56)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.job.Job_$$_javassist_54.execute(Job_$$_javassist_54.java)
	at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:173)
	at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
Caused by: java.lang.NullPointerException
	at org.jbpm.graph.def.Action.execute(Action.java:122)
	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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
	at org.jbpm.graph.def.Action_$$_javassist_63.execute(Action_$$_javassist_63.java)
	at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:259)
	... 15 more

this is the error-msg I get

<?xml version="1.0" encoding="UTF-8"?>

<process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="Timertest">

	<start-state name="start">
		<transition to="wait-state"></transition>
	</start-state>

	<state name="wait-state">
		<timer name="1min-timer" duedate="10 seconds">				
			<action name="timer-notifier" class="org.domain.SeamProcessTest.action.TimerActionHandler">
				<msg>Yippie</msg>
			</action>	
		</timer>
		<transition to="end-state1"></transition>
	</state>

	<end-state name="end-state1">
		<event type="node-enter">
			<action name="timer-notifier" expression='#{timerutils.doSomething("Hallo")}'/>
		</event>
	</end-state>
</process-definition>

and this is my Business-Process-Definition.

Thx for any help.

1 Reply:
06. Aug 2008, 15:32 CET | Link

For anyone who might be interessted... The problem occured, because the timer wasn't set up correctly. I have chosen the integration via JobExecutor and once the the servlet was loaded it worked. The problem why it worked after deployment with the jbpm-console was, that I unintenionally deployed the handler to the jbpm-db.