[jboss-dev-forums] [Design of JBoss ESB] - Newbie problem

ama1 do-not-reply at jboss.com
Tue May 20 06:37:44 EDT 2008


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);
  | 	}
  | 
  | }

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

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



More information about the jboss-dev-forums mailing list