Я написал ниже выражение, которое вызвало ExpressionRuntimeException.
Что-то не так с этим фрагментом кода? Примечание. Этот код не был выполнен только один раз из многих запусков.
<expression-component doc:name="Expression"><![CDATA[
flowVars['flowType'] = "CacheServicePageData";
flowVars['recordKey']=com.xyz.connect.util.ConnectRedisUtil.buildAndReturnREDISCacheKey(sessionVars.cdmID, payload.pageNumber);
flowVars['pageNumber']=payload.pageNumber;
flowVars['pageSize']=payload.pageSize;]]>
</expression-component>
com.xyz.connect.util.ConnectRedisUtil.buildAndReturnREDISCacheKey ():
publi c stati c String buildAndReturnREDISCacheKey (StringactionID, Integer pageNumber) {вернуть новый StringBuilder (транзакцииID) .append (":"). append (Constant.REDIS_BATCH_PAGE_HASH_STRING) .append (pageNumber) .toString (); }
Я нашел следующие журналы:
********************************************************************************
Message : Execution of the expression "
flowVars['flowType'] = "CacheServicePageData";
flowVars['recordKey']=com.xyz.connect.util.ConnectRedisUtil.buildAndReturnREDISCacheKey(sessionVars.cdmID, payload.pageNumber);
flowVars['pageNumber']=payload.pageNumber;
flowVars['pageSize']=payload.pageSize;" failed. (org.mule.api.expression.ExpressionRuntimeException).
Element : /payroll-cdm-process-page/processors/1 @ connect-cdm-core-settlement-id:payroll-cdm-batch.xml:429 (Expression)
--------------------------------------------------------------------------------
Exception stack is:
Execution of the expression "
flowVars['flowType'] = "CacheServicePageData";
flowVars['recordKey']=com.xyz.connect.util.ConnectRedisUtil.buildAndReturnREDISCacheKey(sessionVars.cdmID, payload.pageNumber);
flowVars['pageNumber']=payload.pageNumber;
flowVars['pageSize']=payload.pageSize;" failed. (org.mule.api.expression.ExpressionRuntimeException). (org.mule.api.MessagingException)
org.mule.mvel2.ParserContext.getVariableScope(ParserContext.java:706)
org.mule.mvel2.ParserContext.initializeTables(ParserContext.java:445)
org.mule.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:124)
org.mule.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:63)
org.mule.mvel2.MVEL.analysisCompile(MVEL.java:681)
org.mule.mvel2.MVEL.analysisCompile(MVEL.java:685)
org.mule.mvel2.compiler.PropertyVerifier.getCollectionProperty(PropertyVerifier.java:443)
org.mule.mvel2.compiler.PropertyVerifier.analyze(PropertyVerifier.java:126)
org.mule.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeSetAccessor(ReflectiveAccessorOptimizer.java:278)
org.mule.mvel2.compiler.CompiledAccExpression.setValue(CompiledAccExpression.java:68)
org.mule.mvel2.ast.AssignmentNode.getReducedValueAccelerated(AssignmentNode.java:111)
org.mule.mvel2.MVELRuntime.execute(MVELRuntime.java:86)
org.mule.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
org.mule.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
org.mule.mvel2.MVEL.executeExpression(MVEL.java:953)
Caused by: javax.script.ScriptException: java.lang.Exception: org.mule.api.MessagingException: Execution of the expression "
flowVars['flowType'] = "CacheServicePageData";
flowVars['recordKey']=com.xyz.connect.util.ConnectRedisUtil.buildAndReturnREDISCacheKey(sessionVars.cdmID, payload.pageNumber);
flowVars['pageNumber']=payload.pageNumber;
flowVars['pageSize']=payload.pageSize;" failed. (org.mule.api.expression.ExpressionRuntimeException).
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:326) ~[groovy-all-2.4.4-indy.jar:2.4.4]
at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:44) ~[groovy-all-2.4.4-indy.jar:2.4.4]
at javax.script.CompiledScript.eval(CompiledScript.java:92) ~[?:1.8.0_101]
at org.mule.module.scripting.component.Scriptable.runScript(Scriptable.java:372) ~[mule-module-scripting-3.8.5.jar:3.8.5]
at org.mule.module.scripting.component.ScriptComponent.doInvoke(ScriptComponent.java:78) ~[mule-module-scripting-3.8.5.jar:3.8.5]
at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:120) ~[mule-core-3.8.5.jar:3.8.5]
... 69 more
Caused by: java.lang.Exception: org.mule.api.MessagingException: Execution of the expression "
flowVars['flowType'] = "CacheServicePageData";
flowVars['recordKey']=com.xyz.connect.util.ConnectRedisUtil.buildAndReturnREDISCacheKey(sessionVars.cdmID, payload.pageNumber);
flowVars['pageNumber']=payload.pageNumber;
flowVars['pageSize']=payload.pageSize;" failed. (org.mule.api.expression.ExpressionRuntimeException).
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_101]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_101]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_101]
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80) ~[groovy-all-2.4.4-indy.jar:2.4.4]
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105) ~[groovy-all-2.4.4-indy.jar:2.4.4]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60) ~[groovy-all-2.4.4-indy.jar:2.4.4]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235) ~[groovy-all-2.4.4-indy.jar:2.4.4]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247) ~[groovy-all-2.4.4-indy.jar:2.4.4]
at Script175.run(Script175.groovy:1) ~[?:?]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:323) ~[groovy-all-2.4.4-indy.jar:2.4.4]
at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:44) ~[groovy-all-2.4.4-indy.jar:2.4.4]
at javax.script.CompiledScript.eval(CompiledScript.java:92) ~[?:1.8.0_101]
at org.mule.module.scripting.component.Scriptable.runScript(Scriptable.java:372) ~[mule-module-scripting-3.8.5.jar:3.8.5]
at org.mule.module.scripting.component.ScriptComponent.doInvoke(ScriptComponent.java:78) ~[mule-module-scripting-3.8.5.jar:3.8.5]
at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:120) ~[mule-core-3.8.5.jar:3.8.5]
... 69 more
Caused by: org.mule.api.MessagingException: Execution of the expression "
flowVars['flowType'] = "CacheServicePageData";
flowVars['recordKey']=com.xyz.connect.util.ConnectRedisUtil.buildAndReturnREDISCacheKey(sessionVars.cdmID, payload.pageNumber);
flowVars['pageNumber']=payload.pageNumber;
flowVars['pageSize']=payload.pageSize;" failed. (org.mule.api.expression.ExpressionRuntimeException).
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:42) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:108) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.construct.Flow$2.process(Flow.java:138) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.construct.Flow$2.process(Flow.java:133) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.execution.ExecuteCallbackInterceptor.execute(ExecuteCallbackInterceptor.java:16) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.execution.CommitTransactionInterceptor.execute(CommitTransactionInterceptor.java:35) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.execution.CommitTransactionInterceptor.execute(CommitTransactionInterceptor.java:22) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:30) ~[mule-core-3.8.5.jar:3.8.5]
... 32 more
Caused by: org.mule.api.expression.ExpressionRuntimeException: Execution of the expression "
flowVars['flowType'] = "CacheServicePageData";
flowVars['recordKey']=com.xyz.connect.util.ConnectRedisUtil.buildAndReturnREDISCacheKey(sessionVars.cdmID, payload.pageNumber);
flowVars['pageNumber']=payload.pageNumber;
flowVars['pageSize']=payload.pageSize;" failed.
at org.mule.el.mvel.MVELExpressionLanguage.evaluateInternal(MVELExpressionLanguage.java:232) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.el.mvel.MVELExpressionLanguage.evaluate(MVELExpressionLanguage.java:163) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.el.mvel.MVELExpressionLanguage.evaluate(MVELExpressionLanguage.java:142) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.el.ExpressionLanguageComponent.process(ExpressionLanguageComponent.java:52) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:108) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) ~[mule-core-3.8.5.jar:3.8.5]
... 8 more
Caused by: java.lang.RuntimeException: no context
at org.mule.mvel2.ParserContext.getVariableScope(ParserContext.java:706) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.ParserContext.initializeTables(ParserContext.java:445) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:124) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:63) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.MVEL.analysisCompile(MVEL.java:681) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.MVEL.analysisCompile(MVEL.java:685) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.compiler.PropertyVerifier.getCollectionProperty(PropertyVerifier.java:443) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.compiler.PropertyVerifier.analyze(PropertyVerifier.java:126) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeSetAccessor(ReflectiveAccessorOptimizer.java:278) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.compiler.CompiledAccExpression.setValue(CompiledAccExpression.java:68) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.ast.AssignmentNode.getReducedValueAccelerated(AssignmentNode.java:111) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.MVELRuntime.execute(MVELRuntime.java:86) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.mvel2.MVEL.executeExpression(MVEL.java:953) ~[mule-mvel2-2.1.9-MULE-012.jar:?]
at org.mule.el.mvel.MVELExpressionExecutor.execute(MVELExpressionExecutor.java:87) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.el.mvel.MVELExpressionLanguage.evaluateInternal(MVELExpressionLanguage.java:228) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.el.mvel.MVELExpressionLanguage.evaluate(MVELExpressionLanguage.java:163) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.el.mvel.MVELExpressionLanguage.evaluate(MVELExpressionLanguage.java:142) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.el.ExpressionLanguageComponent.process(ExpressionLanguageComponent.java:52) ~[mule-core-3.8.5.jar:3.8.5]
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27) ~[mule-core-3.8.5.jar:3.8.5]