[jboss-user] [JBoss jBPM] - Re: How to start a deployed process from a jsp file?

coolex do-not-reply at jboss.com
Wed May 14 13:04:24 EDT 2008


Ok, thank you so far.
Now I created a new JSP file that looks like this:
<%@ page import="org.jbpm.*" %>
  | <%@ page import="org.jbpm.graph.def.*" %>
  | <%@ page import="org.jbpm.graph.exe.*" %>
  | <%@ page import="org.jbpm.db.GraphSession" %>
  | 
  | <%!
  | private void startProcessDefinition() {
  | 	String processDefinitionName = new String("websale");
  | 	JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
  | 	JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
  | 	try {
  | 		GraphSession graphSession = jbpmContext.getGraphSession();
  | 		ProcessDefinition definition = graphSession.findLatestProcessDefinition(processDefinitionName);
  | 		ProcessInstance instance = definition.createProcessInstance();
  | 		instance.signal();
  | 		jbpmContext.save(instance);
  | 	} finally {
  | 		jbpmContext.close();
  | 	}
  | }
  | %>
  | 
  | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  |     pageEncoding="ISO-8859-1"%>
  | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  | <html>
  | <head>
  | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  | <title>Insert title here</title>
  | </head>
  | <body>
  | <% startProcessDefinition();%>
  | </body>
  | </html>
But when I execute it I get this error:
anonymous wrote : org.apache.jasper.JasperException: Unable to load class for JSP
  | 	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
  | 	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
  | 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  | 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  | 	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 
  | root cause
  | 
  | org.apache.jasper.JasperException: Unable to load class for JSP
  | 	org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
  | 	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
  | 	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
  | 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  | 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  | 	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 
  | root cause
  | 
  | java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
  | 	java.net.URLClassLoader$1.run(Unknown Source)
  | 	java.security.AccessController.doPrivileged(Native Method)
  | 	java.net.URLClassLoader.findClass(Unknown Source)
  | 	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
  | 	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
  | 	org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
  | 	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
  | 	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
  | 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  | 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  | 	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 
Any idea why this error arise?

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

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



More information about the jboss-user mailing list