3 Replies Latest reply on Nov 22, 2005 7:14 PM by julian_k

    Can't Deploy Custom Classes

    julian_k

      I have searched through the forum and understand the issues with the classloader, but I still can't get my custom classes to load regardless which classloader they reside in. I have tried the following:

      1) I put the java classes in the WEB-INF/lib directory as a jar where I have the jbpm 3.0 jar deployed

      2) I put the java classes in the WEB-INF/classes directory

      3) I placed the classes in the par before deployment (both in the root directory of the par and a subfolder named classes)


      Unfortunately none of these have worked. The files were always nested in the proper folder hierarchy to represent the packages. Is there somewhere in the documentation that describes the proper deployment technique? Here is the error I continue to get:

      2005-11-21 19:16:05,291 [http-8081-Processor24] DEBUG org.jbpm.graph.def.GraphElement.executeActions at line 185 - executing action 'action[Review Action]'
      2005-11-21 19:16:05,341 [http-8081-Processor24] ERROR org.jbpm.graph.def.GraphElement.executeActions at line 189 - action threw exception: couldn't get value for file 'classes/com/tchs/workflow/action/ReviewAction.class'
      java.lang.RuntimeException: couldn't get value for file 'classes/com/tchs/workflow/action/ReviewAction.class'
       at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:160)
       at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:34)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:105)
       at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:90)
       at org.jbpm.graph.def.Action.execute(Action.java:78)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:186)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:149)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:133)
       at org.jbpm.graph.def.Node.enter(Node.java:274)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.graph.node.StartState.leave(StartState.java:73)
       at org.jbpm.graph.exe.Token.signal(Token.java:127)
       at org.jbpm.graph.exe.Token.signal(Token.java:92)
       at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:341)
       at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:272)
       at org.springframework.workflow.jbpm.JbpmTemplate$18.doInJbpm(JbpmTemplate.java:339)
       at org.springframework.workflow.jbpm.JbpmTemplate.execute(JbpmTemplate.java:357)
       at org.springframework.workflow.jbpm.JbpmTemplate.signalTasks(JbpmTemplate.java:327)
       at com.mycom.web.controller.workflow.WorkflowController.signalTaskInstances(WorkflowController.java:246)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:351)
       at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:305)
       at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:128)
       at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
       at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
       at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
       at org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:386)
       at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:355)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at com.ethidium.commons.servlet.filter.FirewallFilter.doFilter(FirewallFilter.java:180)
       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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
       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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
       at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.RuntimeException: file 'classes/com/tchs/workflow/action/ReviewAction.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)
       ... 53 more
      


      I am using Tomcat 5.5

      Thanks,
      Julian

        • 1. Re: Can't Deploy Custom Classes
          kukeltje

          did yo udeploy from the gpd? if so isn't there a name difference e.g. Reviewaction in stead of ReviewAction? I've had that once

          • 2. Re: Can't Deploy Custom Classes
            julian_k

            Nope...I get errors when trying to deploy via the gpd. Besides, I am not sure where in the par I am supposed to put the classes (e.g. in a classes subfolder, root directory of the par, and with/without the package structure). Finally, I should mention I see the file name in the database table jbpm_bytearray which references a row in the jbpm_moduleinstance. I figure the actual bytes of the file are in the jbpm_byteblock tabe, but I am unsure how to verify this.

            Thanks,
            Julian

            • 3. Re: Can't Deploy Custom Classes
              julian_k

              ok, so it turns out you need to put the class files with the appropriate pakcage structure in a classes subfolder of your par. Once I did this and ran the clean target followed by a deploy target, everything worked as expected.