グルービー成分エントリポイント解像度障害:私はテストを実行するミュール私は非常に単純なミュール(3.xの)フロー有する
class MessageHandler {
String handleMessage(String xml) {
return xml + " Received";
}
}
:messageHandler
は単純なGroovyクラスである
<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>
を私は得る:
org.mule.model.resolvers.EntryPointNotFoundException:コンポーネントのエントリポイントを見つけることができなかった、次のリゾルバが試みたしかし、失敗しました:[... ReflectionEntryPointResolver:引数を持つ "mypackage.MessageHandler": "{クラスjava.lang.String}" ...上のエントリポイントが見つかりませんでした]
のが、ときに私は、Javaクラスを使用しますできます!! (groovyクラスのCallableインターフェイスでも動作します)。
私はグルーヴィー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>
ここに問題がある可能性がありますか?
私はMessageHandlerがパッケージに入っていると想定していますが、この質問に貼り付けたときにその行が表示されません。 –
Groovyクラスに正しいシグネチャがあるため、これは非常に奇妙です。これは、org.mule.model.resolvers.ReflectionEntryPointResolver.invoke()にブレークポイントを設定し、なぜハンドルメソッドが選択されていないかを確認する価値があります。問題がわかるまでは、http://www.mulesoft.org/documentation/display/MULE3USER/Entry+Point+Resolver+Configuration+Reference#EntryPointResolverConfigurationReference-MethodentrypointresolverをhandleMessageのターゲットに具体的に(反射なし)使用できます。 –
もちろん、パッケージに入っています。 – csviri