Project: mule
Issue MULE-8521: Validators fail when used with a MEL expression inside a component
When you use a MEL expression Validator inside another component, the following error is thrown: {quote} ******************************************************************************** Message : Execution of the expression "validator.validateUrl('http://www.mulesoft.com')" failed. (org.mule.api.expression.ExpressionRuntimeException). Message payload is of type: NullPayload Code : MULE_ERROR--2 -------------------------------------------------------------------------------- Exception stack is: 1. [Error: unresolvable property or identifier: _muleEvent] [Near : {... tension.validation.internal.el.ValidatorElContext(_muleEvent) ....}] ^ [Line: 1, Column: 66] (org.mule.mvel2.PropertyAccessException) org.mule.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer:693 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/mvel2/PropertyAccessException.html) 2. Execution of the expression "validator.validateUrl('http://www.mulesoft.com')" failed. (org.mule.api.expression.ExpressionRuntimeException) org.mule.el.mvel.MVELExpressionLanguage:202 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/expression/ExpressionRuntimeException.html) 3. Execution of the expression "validator.validateUrl('http://www.mulesoft.com')" failed. (org.mule.api.expression.ExpressionRuntimeException). Message payload is of type: NullPayload (org.mule.api.MessagingException) org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) -------------------------------------------------------------------------------- Root Exception stack trace: [Error: unresolvable property or identifier: _muleEvent] [Near : {... tension.validation.internal.el.ValidatorElContext(_muleEvent) ....}] ^ [Line: 1, Column: 66] org.mule.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:693) org.mule.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:337) org.mule.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:140) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ******************************************************************************** {quote}
Story points: 5