[mule-user] script component binding not working in 3.2.0

1 view
Skip to first unread message

Ken LAI

unread,
Sep 26, 2011, 9:42:04 AM9/26/11
to us...@mule.codehaus.org
I tried to deploy the script component example in mule 3.2.0.
However, it throws an exception the interface not visible in the class
loader. Is it a bug and anything I miss out?

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


Andrew Perepelytsya

unread,
Sep 26, 2011, 9:53:23 AM9/26/11
to us...@mule.codehaus.org

Hi Ken,

Where is your custom class located physically?

Andrew

Ken LAI

unread,
Sep 26, 2011, 6:52:24 PM9/26/11
to us...@mule.codehaus.org
In MULE_HOME/apps/<app>/classes/ . As you ask this question, does the
class file of component binding interface require to put in
MULE_HOME/lib instead?

Thanks,
-Ken

Ken LAI

unread,
Sep 28, 2011, 6:06:44 AM9/28/11
to us...@mule.codehaus.org
It works after I put the interface jar file in MULE_HOME/lib/user
directory. That means I have to put it aside. Is there any alternate
way to maintain it inside the apps?

-Ken

Andrew Perepelytsya

unread,
Sep 28, 2011, 7:43:56 AM9/28/11
to us...@mule.codehaus.org

I think script component is not executing with the right application classloader.  In that case its a bug,  please file a jira.

Andrew

Ken LAI

unread,
Sep 28, 2011, 9:57:17 AM9/28/11
to us...@mule.codehaus.org
Hi Andrew,

Already filed a jira

http://www.mulesoft.org/jira/browse/MULE-5802

Thanks
-Ken

Reply all
Reply to author
Forward
0 new messages