<!--// START SNIPPET: binding-config -->
<flow name="scriptWithBindings">
<description>
This example demonstrates how to orchestrate message flows
using bindings. The example calls out to two
different services and passes the results on to the outbound router.
</description>
<inbound-endpoint ref="client_request" exchange-pattern="one-way"/>
<script:component>
<script:script engine="groovy">
msg = CalloutService.doSomething(payload)
return CalloutService.doSomethingElse(msg)
</script:script>
<script:java-interface-binding
interface="org.mule.components.script.CalloutService"
method="doSomething">
<outbound-endpoint ref="callout_1"
exchange-pattern="request-response"/>
</script:java-interface-binding>
<script:java-interface-binding
interface="org.mule.components.script.CalloutService"
method="doSomethingElse">
<outbound-endpoint ref="callout_2"
exchange-pattern="request-response"/>
</script:java-interface-binding>
</script:component>
<outbound-endpoint ref="client_response" exchange-pattern="one-way"/>
</flow>
java.lang.IllegalArgumentException: interface
org.mule.components.script.CalloutService is not visible from class
loader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
at org.mule.module.scripting.component.ScriptComponent.configureComponentBindings(ScriptComponent.java:117)
at org.mule.module.scripting.component.ScriptComponent.doInitialise(ScriptComponent.java:49)
at org.mule.component.AbstractComponent$1.onTransition(AbstractComponent.java:255)
at org.mule.component.AbstractComponent$1.onTransition(AbstractComponent.java:228)
at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
at org.mule.component.ComponentLifecycleManager.fireInitialisePhase(ComponentLifecycleManager.java:54)
at org.mule.component.AbstractComponent.initialise(AbstractComponent.java:227)
at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:77)
at org.mule.construct.AbstractFlowConstruct.initialiseIfInitialisable(AbstractFlowConstruct.java:278)
at org.mule.construct.AbstractPipeline.doInitialise(AbstractPipeline.java:146)
at org.mule.construct.AbstractFlowConstruct$1.onTransition(AbstractFlowConstruct.java:98)
at org.mule.construct.AbstractFlowConstruct$1.onTransition(AbstractFlowConstruct.java:92)
at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
at org.mule.construct.FlowConstructLifecycleManager.fireInitialisePhase(FlowConstructLifecycleManager.java:81)
at org.mule.construct.AbstractFlowConstruct.initialise(AbstractFlowConstruct.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
....
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Hi Ken,
Where is your custom class located physically?
Andrew
Thanks,
-Ken
-Ken
I think script component is not executing with the right application classloader. In that case its a bug, please file a jira.
Andrew