1

非常に単純な Mule (3.x) フローがあります。

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

<flow name="main">
    <vm:inbound-endpoint path="in" exchange-pattern="request-response"/>
    <component>         
        <spring-object bean="messageHandler"/>
    </component>
    <vm:outbound-endpoint path="out"/>
</flow>    

messageHandler単純な Groovy クラスです。

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

テストを実行すると、次のようになります。

org.mule.model.resolvers.EntryPointNotFoundException: コンポーネントのエントリ ポイントが見つかりませんでした。次のリゾルバが試行されましたが失敗しました:[ ... ReflectionEntryPointResolver: 次のエントリ ポイントが見つかりませんでした: "mypackage.MessageHandler" と引数: "{class java .lang.String}" ... ]

しかし、Javaクラスを使用すると機能します!! (groovy クラスの Callable インターフェイスでも動作します)。

Groovy Complingにgmavenプラグインを使用しています:

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

ここで何が問題になる可能性がありますか?

4

1 に答える 1

0

コンポーネントの前に logger 要素をフローに追加して、コンポーネントに何が入ってくるかを確認してください。

于 2012-02-16T18:48:55.607 に答える