[JBoss jBPM] - NoClassDefFound
by Candersen
Hello,
I am trying to integrate my own objects into jbpm, but I keep getting exceptions. I think its best to outline my problem:
I created a very simple processdefiniton:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="" name="objectTest">
| <start-state name="start">
| <event type="node-leave">
| <action name="action1" class="com.test.SetUpActionHandler"/>
| </event>
| <transition name="" to="node1"></transition>
| </start-state>
|
| <end-state name="end">
| </end-state>
| <node name="node1">
| <action class="com.test.ObjectTestActionHandler" />
| <transition name="" to="end"></transition>
| </node>
| </process-definition>
|
The SetUpActionHandler adds an object of the type "TestObject" as a variable to the context instance:
| package com.test;
|
| import org.jbpm.graph.def.ActionHandler;
| import org.jbpm.graph.exe.ExecutionContext;
|
| public class ObjectTestActionHandler implements ActionHandler {
|
| private static final long serialVersionUID = 1L;
|
| public void execute(ExecutionContext executionContext) throws Exception
| {
| TestObject to = new TestObject();
| to.setText("TestString");
| executionContext.getContextInstance().createVariable("Test", to);
| }
| }
|
|
The TestObject is a very simple java object, it contains only one field, a string called "text".
In the node in my process, I try to retrieve the TestObject from the contextInstance. This is done in the ObjectTestActionHandler:
| package com.test;
|
| import org.jbpm.graph.def.ActionHandler;
| import org.jbpm.graph.exe.ExecutionContext;
|
| public class ObjectTestActionHandler implements ActionHandler {
|
| private static final long serialVersionUID = 1L;
|
| public void execute(ExecutionContext executionContext) throws Exception
| {
| TestObject to = (TestObject) executionContext.getContextInstance().getVariable("Test");
| System.out.println(to.getText());
| }
| }
|
|
When i test this process locally, it works fine. When I deploy it to a JBoss-Server (3.2), I get an exception. The stack-trace looks like this:
|
| ava.lang.NoClassDefFoundError: com/test/TestObject
| com.test.SetUpActionHandler.execute(SetUpActionHandler.java:12)
| org.jbpm.graph.def.Action.execute(Action.java:122)
| org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:247)
| org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
| org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
| org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
| org.jbpm.graph.def.Node.leave(Node.java:381)
| org.jbpm.graph.node.StartState.leave(StartState.java:70)
| org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated>)
| net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| org.jbpm.graph.def.Node$$EnhancerByCGLIB$$5a43c9d9.leave(<generated>)
| org.jbpm.graph.exe.Token.signal(Token.java:194)
| org.jbpm.graph.exe.Token.signal(Token.java:165)
| org.jbpm.webapp.bean.ProcessBean.startInstance(ProcessBean.java:162)
| org.jbpm.webapp.bean.ProcessBean$StartInstanceListener.processAction(ProcessBean.java:123)
| javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
| javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:758)
| javax.faces.component.UICommand.broadcast(UICommand.java:368)
| javax.faces.component.UIData.broadcast(UIData.java:854)
| javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)
| javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
| com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
| com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
| com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
Can anyone help me solve this?
Regards
Claus Andersen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077175#4077175
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077175
18Â years, 8Â months
[Beginners Corner] - Help needed concerning the architecture decision
by dkane
Dear JBoss experts,
Our system communicates with some devices via low-level TCP/IP protocol (socket layer). Database and web-presentation parts of this system are implemented as JBoss application.
The current version of this system has following structure :
1) Devices connects to socket server - standalone console Java application.
2) Socket server is remote EJB client for JBoss application server. Plain byte stream from devices is being parsed by socket server and turned to database entities.
3) Web-presentation application is JBoss Seam application, interacting with the same entities as socket server.
4) Both socket server and web client are JMS publishers/subscribers. When device wants to deliver some data to client, socket server publishes a message and client refreshes the page with new data. When client wants to say something to device - web-application publishes a message , socket server receives it and sends appropriate bytes to socket connection of the specified device.
This is already working solution, but logically I feel that remote EJB communication between socket server and JBoss server is unnecessary layer. It would be great if I can have socket server application already inside the container, not as standalone Java app.
So far I have not found any way for that, but I have no much experience with JBoss and may not be aware of some technologies/options.
I would appreciate very much your comments and recommendations concerning this point, or architecture of the system as a whole.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077168#4077168
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077168
18Â years, 8Â months