2 Replies Latest reply on May 20, 2008 9:58 AM by Patrick Pussar

    Newbie problem

    Patrick Pussar Newbie

      Hi,
      I have some starting problem with my ESB project. I tryed to develop an easy use case. A file should be read and the message object instance should be printed on the command line. But I have a deployment problem.

      The error message: Failed to find action class 'com.sample.action.MessageActionHandler'.

      So I think my package structure is wrong, but thats strange too, due to I use the maven JbossESB integration, which should know how a esb package should look alike!?

      Any suggestions are very welcome!!


      Here is my package structure (*.esb file), I actualy have only 3 files in it:
      com/sample/action/MessageActionHandler.class
      lib/jbpm-3.1.1.jar
      META-INF/jboss-esb.xml


      here is the content of jboss-esb.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
       parameterReloadSecs="5"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd
      D:\Tools\jbossesb-server-4.3.CR1\docs\schema\jbossesb-1.0.1.xsd">
       <providers>
       <fs-provider name="file_inbound">
       <fs-bus busid="inbound_channel">
       <fs-message-filter directory="d:/temp/inbound"
       input-suffix=".xml"
       work-suffix=".esbWorking"
       post-delete="false"
       post-directory="d:/temp/outbound"
       post-suffix=".sentToEsb"
       error-delete="false"
       error-directory="d:/temp/outbound"
       error-suffix=".IN_ERROR"/>
       </fs-bus>
       </fs-provider>
       </providers>
       <services>
       <service category="myCategory" name="HOH" description="xx">
       <listeners>
       <fs-listener name="File-Gateway"
       busidref="inbound_channel"
       maxThreads="1"
       is-gateway="false"
       poll-frequency-seconds="5"/>
       </listeners>
       <actions>
       <action name="test" class="com.sample.action.MessageActionHandler"/>
       </actions>
       </service>
       </services>
      </jbossesb>


      And MessageActionHandler.java:
      package com.sample.action;
      
      import org.jbpm.graph.def.ActionHandler;
      import org.jbpm.graph.exe.ExecutionContext;
      
      public class MessageActionHandler implements ActionHandler {
      
       private static final long serialVersionUID = 1L;
      
       /**
       * The message member gets its value from the configuration in the
       * processdefinition. The value is injected directly by the engine.
       */
       String message;
      
       /**
       * A message process variable is assigned the value of the message
       * member. The process variable is created if it doesn't exist yet.
       */
       public void execute(ExecutionContext context) throws Exception {
       context.getContextInstance().setVariable("message", message);
       System.out.println("----> " + message);
       }
      
      }