【问题标题】:Script engine Jython was not found in Mule ESB 3.7.0 application在 Mule ESB 3.7.0 应用程序中找不到脚本引擎 Jython
【发布时间】:2016-06-11 20:24:32
【问题描述】:

我是 Mule ESB 的新手。 我正在尝试在我的 mule 项目中使用 python 脚本块,但是当我运行该项目时,我收到以下错误:

console: Failed to install '': java.nio.charset.UnsupportedCharsetException: cp0.
ERROR 2016-06-11 22:10:32,827 [main] org.mule.module.launcher.application.DefaultMuleApplication: null
org.mule.api.lifecycle.InitialisationException: Scripting engine 'jython' not found.  Available engines are: [org.python.jsr223.PyScriptEngineFactory@26f46fa6, jdk.nashorn.api.scripting.NashornScriptEngineFactory@2f236de0, com.sun.script.juel.JuelScriptEngineFactory@12fcc71f, org.jruby.embed.jsr223.JRubyEngineFactory@a66e580, com.sun.phobos.script.javascript.RhinoScriptEngineFactory@1e7ab390, com.sun.script.jruby.JRubyScriptEngineFactory@3e33d73e, org.codehaus.groovy.jsr223.GroovyScriptEngineFactory@65b97f47, com.sun.phobos.script.javascript.EmbeddedRhinoScriptEngineFactory@277b8fa4]
    at org.mule.module.scripting.component.Scriptable.initialise(Scriptable.java:103) ~[mule-module-scripting-3.7.0.jar:3.7.0]
    at org.mule.api.lifecycle.LifecycleUtils.initialiseIfNeeded(LifecycleUtils.java:39) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.module.scripting.transformer.ScriptTransformer.initialise(ScriptTransformer.java:30) ~[mule-module-scripting-3.7.0.jar:3.7.0]
    at org.mule.endpoint.DefaultInboundEndpoint.createMessageProcessorChain(DefaultInboundEndpoint.java:172) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.endpoint.AbstractEndpoint.getMessageProcessorChain(AbstractEndpoint.java:521) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:100) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:325) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:353) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.Flow.doStart(Flow.java:90) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:136) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:132) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:138) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:92) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:131) ~[mule-core-3.7.0.jar:3.7.0]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:237) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:91) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:67) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:140) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:111) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:88) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:141) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:91) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:87) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:69) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:61) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:294) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:134) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.artifact.ArtifactWrapper$4.execute(ArtifactWrapper.java:98) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:129) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.artifact.ArtifactWrapper.start(ArtifactWrapper.java:93) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:26) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:310) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:330) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:155) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:256) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:78) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedApps(DeploymentDirectoryWatcher.java:275) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:150) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:100) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:170) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:15) ~[tooling-support-3.7.0.jar:?]
INFO  2016-06-11 22:10:32,829 [main] org.mule.module.launcher.application.DefaultMuleApplication: 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Disposing app 'mypythonapplication'                     +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO  2016-06-11 22:10:32,830 [main] org.mule.lifecycle.AbstractLifecycleManager: Disposing RegistryBroker
INFO  2016-06-11 22:10:32,832 [main] org.mule.construct.FlowConstructLifecycleManager: Disposing flow: mypythonapplicationFlow
ERROR 2016-06-11 22:10:32,839 [main] org.mule.construct.Flow: Failed to stop service: mypythonapplicationFlow
org.mule.api.lifecycle.LifecycleException: Lifecycle Manager 'mypythonapplicationFlow.stage1' phase 'start' does not support phase 'dispose'
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:153) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.FlowConstructLifecycleManager.fireDisposePhase(FlowConstructLifecycleManager.java:144) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct.dispose(AbstractFlowConstruct.java:162) ~[mule-core-3.7.0.jar:3.7.0]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:237) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.phases.MuleContextDisposePhase.applyLifecycle(MuleContextDisposePhase.java:102) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.config.spring.SpringRegistryLifecycleManager$SpringContextDisposePhase.applyLifecycle(SpringRegistryLifecycleManager.java:141) ~[mule-module-spring-config-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:91) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:67) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:140) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:111) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.AbstractRegistry.dispose(AbstractRegistry.java:68) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.AbstractRegistryBroker$2.onTransition(AbstractRegistryBroker.java:69) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.AbstractRegistryBroker$2.onTransition(AbstractRegistryBroker.java:64) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:140) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryBrokerLifecycleManager.fireDisposePhase(RegistryBrokerLifecycleManager.java:82) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.AbstractRegistryBroker.dispose(AbstractRegistryBroker.java:63) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:137) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:91) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:87) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:69) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:61) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.DefaultMuleContext.dispose(DefaultMuleContext.java:345) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.application.DefaultMuleApplication.doDispose(DefaultMuleApplication.java:405) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.application.DefaultMuleApplication.dispose(DefaultMuleApplication.java:288) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.artifact.ArtifactWrapper$1.execute(ArtifactWrapper.java:39) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:129) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.artifact.ArtifactWrapper.dispose(ArtifactWrapper.java:34) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:30) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:310) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:330) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:155) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:256) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:78) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedApps(DeploymentDirectoryWatcher.java:275) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:150) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:100) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:170) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:15) ~[tooling-support-3.7.0.jar:?]
Caused by: java.lang.IllegalStateException: Lifecycle Manager 'mypythonapplicationFlow.stage1' phase 'start' does not support phase 'dispose'
    at org.mule.lifecycle.AbstractLifecycleManager.checkPhase(AbstractLifecycleManager.java:118) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.processor.SedaStageLifecycleManager.fireDisposePhase(SedaStageLifecycleManager.java:117) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.processor.SedaStageInterceptingMessageProcessor.dispose(SedaStageInterceptingMessageProcessor.java:429) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.processor.chain.AbstractMessageProcessorChain.dispose(AbstractMessageProcessorChain.java:136) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct.disposeIfDisposable(AbstractFlowConstruct.java:341) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractPipeline.doDispose(AbstractPipeline.java:463) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct$4.onTransition(AbstractFlowConstruct.java:166) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct$4.onTransition(AbstractFlowConstruct.java:163) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:138) ~[mule-core-3.7.0.jar:3.7.0]
    ... 41 more
INFO  2016-06-11 22:10:33,063 [main] org.mule.config.spring.MuleArtifactContext: Closing org.mule.config.spring.MuleArtifactContext@2b76ff4e: startup date [Sat Jun 11 22:10:22 CEST 2016]; root of context hierarchy
INFO  2016-06-11 22:10:33,289 [main] org.mule.DefaultMuleContext: 
**********************************************************************
* Application "mypythonapplication" shut down normally on:          *
* 11/06/16 22.10                                                     *
* Up for: 0 days, 0 hours, 0 mins, 3.200 sec                         *
**********************************************************************
ERROR 2016-06-11 22:10:33,355 [main] org.mule.module.launcher.DefaultArchiveDeployer: 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Failed to deploy artifact 'mypythonapplication', see    +
+ below                                                    +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
org.mule.module.launcher.DeploymentStartException: InitialisationException: Scripting engine 'jython' not found.  Available engines are: [org.python.jsr223.PyScriptEngineFactory@26f46fa6, jdk.nashorn.api.scripting.NashornScriptEngineFactory@2f236de0, com.sun.script.juel.JuelScriptEngineFactory@12fcc71f, org.jruby.embed.jsr223.JRubyEngineFactory@a66e580, com.sun.phobos.script.javascript.RhinoScriptEngineFactory@1e7ab390, com.sun.script.jruby.JRubyScriptEngineFactory@3e33d73e, org.codehaus.groovy.jsr223.GroovyScriptEngineFactory@65b97f47, com.sun.phobos.script.javascript.EmbeddedRhinoScriptEngineFactory@277b8fa4]
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:156) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.artifact.ArtifactWrapper$4.execute(ArtifactWrapper.java:98) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:129) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.artifact.ArtifactWrapper.start(ArtifactWrapper.java:93) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:26) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:310) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:330) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:155) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:256) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:78) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedApps(DeploymentDirectoryWatcher.java:275) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:150) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:100) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:170) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:15) ~[tooling-support-3.7.0.jar:?]
Caused by: org.mule.api.lifecycle.LifecycleException: Failed to start inbound endpoint "endpoint.polling.1912630717"
    at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:118) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:325) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:353) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.Flow.doStart(Flow.java:90) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:136) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:132) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:138) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:92) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:131) ~[mule-core-3.7.0.jar:3.7.0]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:237) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:91) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:67) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:140) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:111) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:88) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:141) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:91) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:87) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:69) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:61) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:294) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:134) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    ... 14 more
Caused by: org.mule.api.lifecycle.InitialisationException: Scripting engine 'jython' not found.  Available engines are: [org.python.jsr223.PyScriptEngineFactory@26f46fa6, jdk.nashorn.api.scripting.NashornScriptEngineFactory@2f236de0, com.sun.script.juel.JuelScriptEngineFactory@12fcc71f, org.jruby.embed.jsr223.JRubyEngineFactory@a66e580, com.sun.phobos.script.javascript.RhinoScriptEngineFactory@1e7ab390, com.sun.script.jruby.JRubyScriptEngineFactory@3e33d73e, org.codehaus.groovy.jsr223.GroovyScriptEngineFactory@65b97f47, com.sun.phobos.script.javascript.EmbeddedRhinoScriptEngineFactory@277b8fa4]
    at org.mule.module.scripting.component.Scriptable.initialise(Scriptable.java:103) ~[mule-module-scripting-3.7.0.jar:3.7.0]
    at org.mule.api.lifecycle.LifecycleUtils.initialiseIfNeeded(LifecycleUtils.java:39) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.module.scripting.transformer.ScriptTransformer.initialise(ScriptTransformer.java:30) ~[mule-module-scripting-3.7.0.jar:3.7.0]
    at org.mule.endpoint.DefaultInboundEndpoint.createMessageProcessorChain(DefaultInboundEndpoint.java:172) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.endpoint.AbstractEndpoint.getMessageProcessorChain(AbstractEndpoint.java:521) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:100) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:325) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:353) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.Flow.doStart(Flow.java:90) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:136) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:132) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:138) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:92) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:131) ~[mule-core-3.7.0.jar:3.7.0]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:237) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:91) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:67) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:140) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:111) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:88) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:141) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:91) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:87) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:69) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:61) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:294) ~[mule-core-3.7.0.jar:3.7.0]
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:134) ~[mule-module-launcher-3.7.0.jar:3.7.0]
    ... 14 more

我已经尝试在C:\Users\MyUser\.p2\pool\plugins\org.mule.tooling.server.3.7.0_5.2.0.201508051354\mule\lib\user中添加jython-2.7.0.jar

C:\Users\MyUser\.p2\pool\plugins\org.mule.tooling.server.3.7.0_5.2.0.201508051354\mule\lib\opt

但没有结果。

我还尝试将 jython.jar 作为库添加到项目属性的 java build project 部分中。

我使用的是 Windows 10 和 jdk 1.8.0_66。

你能帮帮我吗?

谢谢

【问题讨论】:

  • 我解决了删除带有扩展的eclipse并使用mule esb 3.8安装anypoint studio

标签: java python mule jython mule-studio


【解决方案1】:

Jython 应该是 Anypoint Studio 中运行时服务器的一部分。在 Package Explorer 和 Mule Server 3.7.0 库图标(书籍)中检查它。企业运行时应该有它,但如果你使用的是社区版,它就没有。

例如版本 3.7.2 EE 包含 jython-standalone-2.7.0 但它可能不像将这个 JAR 添加到库中那么容易。

第一个答案:社区版不支持您的需求。

第二个答案:尝试将 jython-standalone-2.7.0 添加到您的服务器库(运行时 ESB)而不是项目依赖项。

【讨论】:

  • 嗨,大卫,感谢您的回答。服务器库的路径是什么?我已经在 C:\Users\MyUser\.p2\pool\plugins\org.mule.tooling.server.3.7.0_5.2.0.201508051354\mule\lib\user 和 C:\Users\ 中添加了 jython.jar MyUser\.p2\pool\plugins\org.mule.tooling.server.3.7.0_5.2.0.201508051354\mule\lib\opt 但它不起作用。
  • 对于我的应用程序,它是 .classpath 文件中的 MULE_RUNTIME。这意味着它由 Anypoint Studio 设置和指定(路径)。尝试直接在 Eclipse 的 Java Build 区域中添加 JAR。让事情发挥作用,进行研究,然后将其移至真正应该去的地方。我不知道通过定制将社区版更新为企业版的最佳做法是什么。这是我书中的一个高级主题,我不相信您会在网上找到很多关于此的信息。尝试直接添加它,如果可行,请告诉我们。
猜你喜欢
  • 1970-01-01
  • 2013-05-23
  • 2011-08-24
  • 1970-01-01
  • 1970-01-01
  • 2010-10-01
  • 1970-01-01
  • 2011-02-09
  • 1970-01-01
相关资源
最近更新 更多