8 Replies Latest reply on Nov 23, 2005 6:26 PM by Ronald van Kuijk

    ClassNotFoundException Even if class exists!

    ch praveen Newbie

      Hi,

      Iam getting below stack trace when transition occured towards node, "state readFile".

      Stack Trace
      ------------
      java.lang.ClassNotFoundException: class 'com.sample.webapp.demo1.ReadFile' could not be found by the process classloader
      at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:39)
      at org.apache.jsp.tmp_jsp._jspService(org.apache.jsp.tmp_jsp:52)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:405)
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:280)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.sample.workflow.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:25)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.sample.workflow.filter.PersistenceFilter.doFilter(PersistenceFilter.java:29)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.sample.workflow.filter.ContextFilter.doFilter(ContextFilter.java:20)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.sample.workflow.filter.LogFilter.doFilter(LogFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      11:20:17,407 ERROR [[/jbpm]] class 'com.sample.webapp.demo1.ReadFile' could not be found by the process classloader

      Process Definition
      ---------------------

      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition name="open file">
      
       <!-- SWIMLANES (= process roles) -->
      
       <swimlane name="fileOwner">
       <assignment expression="user(ernie)" />
       </swimlane>
      
       <swimlane name="pathOwner">
       <assignment expression="user(bert)" />
       </swimlane>
      
       <swimlane name="readFile" />
      
       <!-- NODES -->
      
       <start-state name="state fileOwner">
       <task swimlane="fileOwner">
       <controller>
       <variable name="fileName" />
       </controller>
       </task>
       <transition to="state pathOwner" />
       </start-state>
      
       <task-node name="state pathOwner">
       <task swimlane="pathOwner">
       <controller>
       <variable name="fileName" access="read"/>
       <variable name="pathName"/>
       </controller>
       </task>
       <transition to="state readFile" />
       </task-node>
      
       <node name="state readFile">
       <action class="com.sample.webapp.demo1.ReadFile">
       <msg>Action node Triggered For Reading File</msg>
       </action>
       <transition name="to end" to="end" />
       </node>
      
       <end-state name="end" />
      
      </process-definition>
      


      But point is Iam able to create an instance of com.sample.webapp.demo1.ReadFile in a test.jsp file which is given below.

      <%@ page language="java" %>
      <%@ page import="com.sample.webapp.demo1.ReadFile,org.jbpm.instantiation.*,org.jbpm.graph.def.*" %>
      <%
       ReadFile objRF = new ReadFile();
      %>
      


      when I added below snippet , ClassNotFoundException occured in test.jsp

       ProcessClassLoader prCL = new ProcessClassLoader( ReadFile.class.getClassLoader(), new ProcessDefinition() );
       prCL.findClass("com.sample.webapp.demo1.ReadFile");
      



      In org.jbpm.instantiation.ProcessClassLoader.findClass(String name) method I found below line

      fileName = "classes/" + name.replace( '.', '/' ) + ".class";
      


      whether including "classes/" in fileName variable is creating a problem. How can I resolve this.

      Thanks in advance

        • 1. Re: ClassNotFoundException Even if class exists!
          ch praveen Newbie

          HI Friends,

          Iam getting ClassNotFoundException because processDefinition.getFileDefinition() is fetching null for me. So, findClass(String name) method in org.jbpm.instantiation.ProcessClassLoader is throwing ClassNotFoundException.

          Iam loading process definition directly from an xml file as follows::

          loadProcessDef.jsp
          ---------------------

          <%
           UserBean objUserBean = (UserBean) session.getAttribute("userBean");
           if(objUserBean == null)
           {
          %>
           <jsp:forward page="demo1Login.jsp"/>
           <%
           }
          
           String processDefXMLPath = request.getParameter("xmlPathProcessDef");
           if(processDefXMLPath == null || processDefXMLPath.trim().equals(""))
           {
           %>
          
           <center>Please select process definition path to continue .....
           <p><a href="demo1Home.jsp">Home</a></center>
          <%
           return;
           }
          %>
          
          <%
           // Get process definition
           ProcessDefinition processDefinition = null;
           try
           {
           //String str = "D:\\neclipse\\Workspace\\jbpm-3.0.1\\src\\java.webapp\\com\\sample\\webapp\\testflow1.xml";
           processDefinition = ProcessDefinition.parseXmlInputStream(new FileInputStream(processDefXMLPath));
           }
           catch(FileNotFoundException fne)
           {
          %>
           <p><font color='red'>Error:: <%= fne.getMessage() %></font>
           <p><center>Failed to start process.
           <p><a href="demo1Home.jsp">Home</a></center>
          <%
           fne.printStackTrace();
           return;
           }
          
           System.out.println("**** = " + processDefinition.getStartState().getName());
          
           // Save process definition in db.
           //org.jbpm.webapp.context.Context.create();
           JbpmSession jbpmSession = Context.getPersistenceContext().getJbpmSession();
          
           GraphSession graphSession = jbpmSession.getGraphSession();
          
           graphSession.saveProcessDefinition(processDefinition);
          %>
          
           <center>Started process with Id, <b><%= processDefinition.getId() %></b> successfully
           <p><a href="demo1Home.jsp">Home</a></center>
          



          Iam able to create process instances & save it in db. also for the above process definition. But when I tried to fetch FileDefinition, its returning null. whether Iam loading process definition correctly or not. Do we got another approach to load/deploy process definition.

          Thanks in advance

          • 2. Re: ClassNotFoundException Even if class exists!
            Koen Aers Master

            It seems to me this is a bug. Can you enter a JIRA issue for this problem, referring to this thread?
            To work around the problem in the meantime, you can add your ReadFile class to the par deployment. Then the process classloader should be able to find it.

            Regards,
            Koen

            • 3. Re: ClassNotFoundException Even if class exists!
              Hannes Stillerich Newbie

              Have you tried the Unified-Classloader?

              $JBOSS_HOME\server\default\deploy\jbossweb-tomcat55.sar\META-INF
              jboss-service.xml:

              <attribute name="UseJBossWebLoader">true</attribute>


              • 4. Re: ClassNotFoundException Even if class exists!
                ch praveen Newbie

                Hi Hannes & Koen,

                Thanks for your suggestion. Strangly now after following your suggestion, my demo web application is working but still that problem persists in test file, test.jsp [here Iam getting processdefinition.getFileDefinition() as null]. Iam getting below stack trace::


                0:54:31,417 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
                java.lang.ClassNotFoundException: class 'com.sample.webapp.demo1.ReadFile' could not be found by the process classloader
                at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:39)
                at org.apache.jsp.tmp_jsp._jspService(org.apache.jsp.tmp_jsp:94)
                at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
                at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
                at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:405)
                at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:280)
                at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at com.sample.workflow.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:25)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at com.sample.workflow.filter.PersistenceFilter.doFilter(PersistenceFilter.java:29)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at com.sample.workflow.filter.ContextFilter.doFilter(ContextFilter.java:20)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at com.sample.workflow.filter.LogFilter.doFilter(LogFilter.java:38)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
                at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                at java.lang.Thread.run(Thread.java:595)
                0:54:31,464 ERROR [[/jbpm]] class 'com.sample.webapp.demo1.ReadFile' could not be found by the process classloader


                I have included below changes in tmp.jsp [in bold] now.

                <%@ page language="java" %>
                <%@ page import="com.sample.webapp.demo1.ReadFile,org.jbpm.instantiation.*,org.jbpm.graph.def.*,org.jbpm.file.def.*,org.jbpm.graph.exe.*,org.jbpm.taskmgmt.exe.*,com.sample.workflow.bean.*,java.util.*,org.jbpm.db.*,com.sample.workflow.context.*,java.io.*,org.jbpm.JbpmConfiguration.*" %>
                
                <%
                 ProcessDefinition processDefinition = null;
                 String str = "D:\\neclipse\\Workspace\\jbpm-3.0.1\\src\\java.webapp\\com\\sample\\webapp\\processdefinition.xml";
                
                 try
                 {
                 processDefinition = ProcessDefinition.parseXmlInputStream(new FileInputStream(str));
                 }
                 catch(FileNotFoundException fne)
                 {
                %>
                 <p><font color='red'>Error:: <%= fne.getMessage() %></font>
                 <p><center>Failed to start process.
                <%
                 fne.printStackTrace();
                 return;
                 }
                %>
                
                <%
                 ReadFile objRF = new ReadFile();
                
                 
                 FileDefinition fileDefinition = new FileDefinition();
                 fileDefinition.addFile("processdef2.xml", new FileInputStream(str));
                
                 processDefinition.addDefinition(fileDefinition);
                
                
                 JbpmSession jbpmSession = Context.getPersistenceContext().getJbpmSession();
                 GraphSession graphSession = jbpmSession.getGraphSession();
                 graphSession.saveProcessDefinition(processDefinition);
                
                 System.out.println("****got FileDEF As " + processDefinition.getFileDefinition()); // Now not getting null
                 //objRF.execute();
                 ProcessClassLoader prCL = new ProcessClassLoader( ReadFile.class.getClassLoader(), processDefinition );
                 prCL.findClass("com.sample.webapp.demo1.ReadFile");
                %>
                It's there !
                


                This change is getting below exception for me::


                0:57:13,067 ERROR [[/jbpm]] Root cause: file 'classes/com/sample/webapp/demo1/ReadFile.class' not found in db
                java.lang.RuntimeException: file 'classes/com/sample/webapp/demo1/ReadFile.class' not found in db
                at org.jbpm.file.def.FileDefinition.getByteArray(FileDefinition.java:184)
                at org.jbpm.file.def.FileDefinition.getBytesFromDb(FileDefinition.java:176)
                at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:157)
                at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:34)
                at org.apache.jsp.tmp_jsp._jspService(org.apache.jsp.tmp_jsp:94)
                at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
                at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
                at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:405)
                at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:280)
                at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at com.sample.workflow.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:25)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at com.sample.workflow.filter.PersistenceFilter.doFilter(PersistenceFilter.java:29)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at com.sample.workflow.filter.ContextFilter.doFilter(ContextFilter.java:20)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at com.sample.workflow.filter.LogFilter.doFilter(LogFilter.java:38)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
                at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                at java.lang.Thread.run(Thread.java:595)
                0:57:13,098 INFO [STDOUT] java.lang.RuntimeException: file 'classes/com/sample/webapp/demo1/ReadFile.class' not found in db


                Please correct me if Iam loading a process definition [xml file] wrongly. Whether we need to explicitly set FileDefinition to a process definition? Also now I worried whether I can deploy my sample jbpm web-based application in websphere server or not [as we are changing 'UseJbossWebloader' property to true in jboss server].


                Thanks in advance


                • 5. Re: ClassNotFoundException Even if class exists!
                  ch praveen Newbie

                  For more information, I have not created any par file and I have taken jbpm-webapp-3.0.1.jar file from starters kit, added my jsp files and class files to it and its directory structure is as follows::


                  jbpm
                  -------
                  11/23/2005 07:25 PM <DIR> .
                  11/23/2005 07:25 PM <DIR> ..
                  11/21/2005 03:12 PM <DIR> css
                  11/21/2005 03:12 PM <DIR> images
                  11/21/2005 03:12 PM <DIR> META-INF
                  11/23/2005 11:14 AM <DIR> WEB-INF
                  
                  09/05/2005 09:45 AM 1,248 admin.jsp
                  09/05/2005 09:45 AM 119 footer.jsp
                  09/05/2005 09:45 AM 1,869 header1.jsp
                  09/05/2005 09:45 AM 2,016 header2.jsp
                  09/05/2005 09:45 AM 2,116 home.jsp
                  09/05/2005 09:45 AM 164 index.jsp
                  09/05/2005 09:45 AM 767 login.jsp
                  09/05/2005 09:45 AM 295 monitor.jsp
                  09/05/2005 09:45 AM 2,063 task.jsp
                  
                  (below files added by me)
                  11/23/2005 10:29 AM 2,566 demo1Home.jsp
                  11/22/2005 09:31 PM 1,749 demo1LoadProcessDef.jsp
                  11/23/2005 10:29 AM 466 demo1Login.jsp
                  11/22/2005 09:30 PM 576 demo1LoginProcess.jsp
                  11/22/2005 09:31 PM 408 demo1Logout.jsp
                  11/22/2005 09:31 PM 1,300 demo1SelectProcess.jsp
                  11/22/2005 09:31 PM 1,287 demo1SelectTask.jsp
                  11/22/2005 09:31 PM 3,392 demo1Task.jsp
                  11/22/2005 09:31 PM 2,993 demo1TaskProcess.jsp
                  11/22/2005 09:30 PM 1,325 testFlow1.jsp
                  11/22/2005 09:30 PM 4,079 testFlow2.jsp
                  11/22/2005 09:30 PM 11,020 testFlow3.jsp
                  11/22/2005 09:30 PM 8,617 testFlow4.jsp
                  11/23/2005 07:25 PM 2,047 tmp.jsp
                   24 File(s)
                   6 Dir(s)
                  
                  jbpm/WEB-INF
                  ----------------
                  11/23/2005 11:14 AM <DIR> .
                  11/23/2005 11:14 AM <DIR> ..
                  11/23/2005 07:24 PM <DIR> classes
                  11/23/2005 11:14 AM <DIR> lib
                  11/21/2005 05:00 PM 2,534 faces-config.xml
                  09/05/2005 09:45 AM 648 jbpm.tld
                  11/21/2005 04:56 PM 2,854 web.xml
                   3 File(s)
                   4 Dir(s)
                  
                  jbpm/WEB-INF/classes
                  --------------------------
                  11/23/2005 07:24 PM <DIR> .
                  11/23/2005 07:24 PM <DIR> ..
                  11/23/2005 11:14 AM <DIR> com (this is my package)
                  11/23/2005 11:14 AM <DIR> org
                   0 File(s)
                   4 Dir(s)
                  
                  jbpm/WEB-INF/lib
                  --------------------
                  11/23/2005 11:14 AM <DIR> .
                  11/23/2005 11:14 AM <DIR> ..
                  09/05/2005 09:45 AM 118,726 commons-beanutils-1.6.1.jar
                  09/05/2005 09:45 AM 109,096 commons-digester-1.5.jar
                  09/05/2005 09:45 AM 16,923 jstl-1.1.0.jar
                  09/05/2005 09:45 AM 1,263,220 myfaces-1.0.9.jar
                  09/05/2005 09:45 AM 478,950 myfaces-impl-1.0.9.jar
                  09/05/2005 09:45 AM 220,488 myfaces-jsf-api-1.0.9.jar
                  09/05/2005 09:45 AM 393,259 standard-1.1.2.jar
                   7 File(s)
                   2 Dir(s)


                  Any help is highly appreciated.

                  Thanks


                  • 6. Re: ClassNotFoundException Even if class exists!
                    Alejandro Guizar Master

                    You are loading the process definition in a rightful way, yet inappropiate for your situation. A FileDefinition is not included by default in a process definition; rather, the process archive parser creates it when the archive contains additional files. See for yourself in org.jbpm.jpdl.par.FileArchiveParser. Therefore, you might want to create a .par and bundle your class there.

                    • 7. Re: ClassNotFoundException Even if class exists!
                      Alejandro Guizar Master

                      One more observation: when jBPM needs a process class loader, it is created centrally in ClassLoaderUtil::getProcessClassLoader(). However, the parent loader is that of class ClassLoaderUtil.

                      If the jBPM library is located, say, in the appserver's library repository, and delegation classes are bundled in a deployment package, jBPM won't be able to find these classes if the UCL is not used. The class search will jump from the process loader to the library loader, missing the context loader.

                      We need to provide a way to deal with this situation.

                      • 8. Re: ClassNotFoundException Even if class exists!
                        Ronald van Kuijk Master

                        Alex,

                        Should we? isn't it 'normal' that a classloader on the appservers level cannot access classes in the war file?

                        I'm afraid that if you want to achieve this, you'll have to create special classloaders for each appserver to support. We've seen problems with this even by changing from bea 6.1 to 8.1.

                        Unless we are able to pass the webapp classloader to the jbpm session so it can be used. Would that work?