java.lang.IllegalArgumentException: interface org.mule.components.script.CalloutService is not visible from class loader

MuleSoft JIRA | Pablo La Greca | 5 years ago
  1. 0

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

    MuleSoft JIRA | 5 years ago | Pablo La Greca
    java.lang.IllegalArgumentException: interface org.mule.components.script.CalloutService is not visible from class loader
  2. 0

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

    MuleSoft JIRA | 5 years ago | Pablo La Greca
    java.lang.IllegalArgumentException: interface org.mule.components.script.CalloutService is not visible from class loader
  3. 0

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

    MuleSoft JIRA | 5 years ago | Ken Lai
    java.lang.IllegalArgumentException: interface org.mule.components.script.CalloutService is not visible from class loader
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    starting thread using jboss5 thread pool

    Stack Overflow | 5 years ago | rich oates
    org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.IllegalArgumentException: interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader
  6. 0

    Trouble deciphering java class not visible from class loader error

    Stack Overflow | 7 years ago | Mike2012
    java.lang.IllegalArgumentException: interface IKPictureTaker$_Class is not visible from class loader

    17 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      interface org.mule.components.script.CalloutService is not visible from class loader

      at java.lang.reflect.Proxy.getProxyClass()
    2. Java RT
      Proxy.newProxyInstance
      1. java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
      2. java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
      2 frames
    3. JSR-223 Scripting
      ScriptComponent.doInitialise
      1. org.mule.module.scripting.component.ScriptComponent.configureComponentBindings(ScriptComponent.java:117)
      2. org.mule.module.scripting.component.ScriptComponent.doInitialise(ScriptComponent.java:49)
      2 frames
    4. Mule Core
      AbstractFlowConstruct.initialise
      1. org.mule.component.AbstractComponent$1.onTransition(AbstractComponent.java:255)
      2. org.mule.component.AbstractComponent$1.onTransition(AbstractComponent.java:228)
      3. org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
      4. org.mule.component.ComponentLifecycleManager.fireInitialisePhase(ComponentLifecycleManager.java:54)
      5. org.mule.component.AbstractComponent.initialise(AbstractComponent.java:227)
      6. org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:77)
      7. org.mule.construct.AbstractFlowConstruct.initialiseIfInitialisable(AbstractFlowConstruct.java:278)
      8. org.mule.construct.AbstractPipeline.doInitialise(AbstractPipeline.java:146)
      9. org.mule.construct.AbstractFlowConstruct$1.onTransition(AbstractFlowConstruct.java:98)
      10. org.mule.construct.AbstractFlowConstruct$1.onTransition(AbstractFlowConstruct.java:92)
      11. org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
      12. org.mule.construct.FlowConstructLifecycleManager.fireInitialisePhase(FlowConstructLifecycleManager.java:81)
      13. org.mule.construct.AbstractFlowConstruct.initialise(AbstractFlowConstruct.java:91)
      13 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames