开发者

Mule groovy component entry point resolution failure

I have a very simple Mule (3.x) flow:

<spring:bean name="messageHandler" class="mypackage.MessageHandler"/>

<flow name="main">
    <vm:inbound-endpoint path="in" exchange-pattern="request-response"/>
    <component>         
        <spring-object bean="messageHandler"/>
    &l开发者_如何学运维t;/component>
    <vm:outbound-endpoint path="out"/>
</flow>    

where messageHandler is a simple Groovy class:

class MessageHandler {
   String handleMessage(String xml) {   
      return xml + " Received";
   } 
}

When I execute the test I get:

org.mule.model.resolvers.EntryPointNotFoundException: Failed to find entry point for component, the following resolvers tried but failed:[ ... ReflectionEntryPointResolver: Could not find entry point on: "mypackage.MessageHandler" with arguments: "{class java.lang.String}" ... ]

but when I use Java class it works!! (Also works with Callable interface on groovy class).

I'm using gmaven plugin for groovy compling:

 <plugin>
      <groupId>org.codehaus.gmaven</groupId>
      <artifactId>gmaven-plugin</artifactId>
      <extensions>true</extensions>
      <inherited>true</inherited>
      <executions>
         <execution>
              <goals>
                  <goal>generateStubs</goal>
                  <goal>compile</goal>
                  <goal>generateTestStubs</goal>
                  <goal>testCompile</goal>
               </goals>
          </execution>
      </executions>
   </plugin>

What could be the problem here?


Try adding the logger element in the flow before the component to see what's coming into the component.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜