Mule groovy组件入口点解析失败

Mule groovy组件入口点解析失败,groovy,mule,entry-point,Groovy,Mule,Entry Point,我有一个非常简单的Mule(3.x)流程: 当我执行测试时,我得到: org.mule.model.resolvers.EntryPointNotFoundException:未能找到组件的入口点,以下解析程序已尝试但失败:[…ReflectionEntryPointResolver:无法在“mypackage.MessageHandler”上找到入口点,参数为:“{class java.lang.String}”。] 但是,当我使用Java类时,它是有效的!!(也适用于groovy类上的可调用

我有一个非常简单的Mule(3.x)流程:

当我执行测试时,我得到:

org.mule.model.resolvers.EntryPointNotFoundException:未能找到组件的入口点,以下解析程序已尝试但失败:[…ReflectionEntryPointResolver:无法在“mypackage.MessageHandler”上找到入口点,参数为:“{class java.lang.String}”。]

但是,当我使用Java类时,它是有效的!!(也适用于groovy类上的可调用接口)

我正在使用gmaven插件进行groovy编译:

 <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>

org.codehaus.gmaven
gmaven插件
真的
真的
发电集团
编译
生成测试存根
测试编译

这里可能有什么问题?

尝试在组件之前的流中添加logger元素,以查看组件中会出现什么情况。

我假设MessageHandler在一个包中,只是当您粘贴到这个问题时,该行丢失了?这非常奇怪,因为您的Groovy类具有正确的签名。在org.mule.model.resolvers.ReflectionEntryPointResolver.invoke()中放置一个断点是值得的,并查看为什么没有拾取句柄方法。在我们解决问题之前,您可以使用专门针对handleMessage(无反射)。是的,它当然在包中。我尝试过:“”但没有帮助如果您将Maven项目发布到某个位置并指定您使用的确切Mule版本,我可以更深入地了解此问题。
class MessageHandler {
   String handleMessage(String xml) {   
      return xml + " Received";
   } 
}
 <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>