Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Duplicate
  • Affects Version/s: 3.2.0
  • Fix Version/s: 3.2.1
  • Component/s: Modules: Scripting
  • Labels:
    None
  • User impact:
    Medium
  • Similar Issues:
    None

Description

I tried to deploy the below script component example in mule 3.2.0 where the interface class was in the application classes directory. However, it throws an exception when loading the interface class not visible in the classloader. However, it works after I put the interface jar file in MULE_HOME/lib/user
directory. As guessed, script component may not be executing with the right application classloader.

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

Issue Links

Activity

Hide
Dirk Olmes added a comment -

Duplicate of MULE-5802

Show
Dirk Olmes added a comment - Duplicate of MULE-5802

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: