[jboss-user] [JBoss jBPM] - Re: posting data to an external web application

kamleshkr do-not-reply at jboss.com
Fri Nov 16 04:04:47 EST 2007


I have visited the blog http://weblogs.java.net/blog/edgars/archive/2007/08/understanding_j_1.html

Here i found the way. But i am getting one exception while implementing that,

My Servlet code is:

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		jbpmConfiguration= JbpmConfiguration.getInstance();
		JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
	    try {

	      GraphSession graphSession = jbpmContext.getGraphSession();
	      
	      ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("simplenodes");
	    
	      ProcessInstance processInstance = 
	          new ProcessInstance(processDefinition);
	      //Added for XML Post
	      processInstance.getContextInstance().setVariable("request", request);
	      processInstance.getContextInstance().setVariable("response", response);
	      //End of addition
	      Token token = processInstance.getRootToken(); 
	     
	      // Let's start the process execution
	      token.signal();
	      
	      //jbpmContext.save(processInstance);
	    }
	    finally
	    {
	    	jbpmContext.close();
	    }
	}  	

But i am getting the following exception:

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

java.lang.NoClassDefFoundError
	org.jbpm.context.exe.matcher.JcrNodeMatcher.class$(JcrNodeMatcher.java:33)
	org.jbpm.context.exe.matcher.JcrNodeMatcher.matches(JcrNodeMatcher.java:33)
	org.jbpm.context.exe.JbpmType.matches(JbpmType.java:53)
	org.jbpm.context.exe.VariableInstance.createVariableInstance(VariableInstance.java:86)
	org.jbpm.context.exe.VariableInstance.create(VariableInstance.java:65)
	org.jbpm.context.exe.VariableContainer.setVariableLocally(VariableContainer.java:173)
	org.jbpm.context.exe.VariableContainer.setVariable(VariableContainer.java:45)
	org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:212)
	org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:202)
	org.psl.IBMSaas.jbpm.CallWorkflowServlet.doGet(CallWorkflowServlet.java:48)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

java.lang.ClassNotFoundException: javax.jcr.Node
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
	java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	java.lang.Class.forName0(Native Method)
	java.lang.Class.forName(Class.java:164)
	org.jbpm.context.exe.matcher.JcrNodeMatcher.class$(JcrNodeMatcher.java:33)
	org.jbpm.context.exe.matcher.JcrNodeMatcher.matches(JcrNodeMatcher.java:33)
	org.jbpm.context.exe.JbpmType.matches(JbpmType.java:53)
	org.jbpm.context.exe.VariableInstance.createVariableInstance(VariableInstance.java:86)
	org.jbpm.context.exe.VariableInstance.create(VariableInstance.java:65)
	org.jbpm.context.exe.VariableContainer.setVariableLocally(VariableContainer.java:173)
	org.jbpm.context.exe.VariableContainer.setVariable(VariableContainer.java:45)
	org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:212)
	org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:202)
	org.psl.IBMSaas.jbpm.CallWorkflowServlet.doGet(CallWorkflowServlet.java:48)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

****************
So now please tell me what mistake i am doing. The exception comes at the line where i am setting the variables to the process instance....

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105339#4105339

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105339



More information about the jboss-user mailing list