Failed to transform Message when switch header-enricher from 1.3 to 2.x in Spring Cloud DataflowGetting...

Do I have a twin with permutated remainders?

strToHex ( string to its hex representation as string)

The use of multiple foreign keys on same column in SQL Server

Prove that NP is closed under karp reduction?

"You are your self first supporter", a more proper way to say it

Can I make popcorn with any corn?

LaTeX closing $ signs makes cursor jump

Smoothness of finite-dimensional functional calculus

Risk of getting Chronic Wasting Disease (CWD) in the United States?

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

Why was the small council so happy for Tyrion to become the Master of Coin?

Email Account under attack (really) - anything I can do?

How does strength of boric acid solution increase in presence of salicylic acid?

Minkowski space

What typically incentivizes a professor to change jobs to a lower ranking university?

A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?

Why don't electron-positron collisions release infinite energy?

Is it possible to do 50 km distance without any previous training?

To string or not to string

Modeling an IPv4 Address

Mathematical cryptic clues

Do VLANs within a subnet need to have their own subnet for router on a stick?

What defenses are there against being summoned by the Gate spell?

How can I make my BBEG immortal short of making them a Lich or Vampire?



Failed to transform Message when switch header-enricher from 1.3 to 2.x in Spring Cloud Dataflow


Getting Oracle 11.2 Unsupported Error when using Spring Cloud Data Flow 2.0.1When setting spring cloud data flow (scdf) 2.x as maven dependency of a regular spring boot app, the dataflow local server is not starting






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I create the Spring Cloud Data Flow stream with header-enricher 1.3 and deploy it, it works fine. But when I switch to header-enricher 2.x in same SCDF environment, it throw "Failed to transform Message exception".



I'm wondering what's the difference between 1.3 and 2.x that cause the issue?



Here is 1.3 stream definition:



app register --name header-enricher_1_3 --type processor --uri http://repo.spring.io/release/org/springframework/cloud/stream/app/header-enricher-processor-rabbit/1.3.1.RELEASE/header-enricher-processor-rabbit-1.3.1.RELEASE.jar 

stream create Header_TEST --definition "trigger --time-unit=MINUTES --initialDelay=0 --fixed-delay=500 --payload={'testWords':'Hello World!'} | header-enricher_1_3 --headers='testWords_header=payload.testWords' --outputType=application/json | log --expression=headers.testWords_header" --deploy


It works fine, we can get " Hello World!" in log:



2019-04-04T17:15:08.833-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:15:08.831 INFO 17 --- [ main] o.s.c.s.a.l.s.r.LogSinkRabbitApplication : Started LogSinkRabbitApplication in 12.406 seconds (JVM running for 14.73)
2019-04-04T17:15:10.312-04:00 [CELL/0] [OUT] Container became healthy
2019-04-04T17:15:13.112-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:15:13.111 INFO 17 --- [w.Header_TEST-9] dataflow-server-stg-Header_TEST-log : Hello World!


Here is the 2.x Stream definition:



app register --name header-enricher_2_1 --type processor --uri  http://repo.spring.io/release/org/springframework/cloud/stream/app/header-enricher-processor-rabbit/2.1.0.RELEASE/header-enricher-processor-rabbit-2.1.0.RELEASE.jar 

stream create Header_TEST --definition "trigger --time-unit=MINUTES --initialDelay=0 --fixed-delay=500 --payload={'testWords':'Hello World!'} | header-enricher_2_1 --headers='testWords_header=payload.testWords' --outputType=application/json | log --expression=headers.testWords_header" --deploy


I got an exception says:
org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]'



Here is the completed log:



019-04-04T17:19:38.425-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:38.423 INFO 16 --- [ main] HeaderEnricherProcessorRabbitApplication : Started HeaderEnricherProcessorRabbitApplication in 12.71 seconds (JVM running for 13.979)
2019-04-04T17:19:38.802-04:00 [CELL/0] [OUT] Container became healthy
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 31 more
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:128)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:371)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:116)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:89)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:407)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 28 more
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:122)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor.processMessage(ExpressionEvaluatingHeaderValueMessageProcessor.java:71)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor.processMessage(ExpressionEvaluatingMessageProcessor.java:105)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:136)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 27 more
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.MessageTransformingHandler.handleRequestMessage(MessageTransformingHandler.java:89)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:131)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessagingException: failed to transform message headers; nested exception is org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at java.lang.Thread.run(Thread.java:748)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1042)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$700(SimpleMessageListenerContainer.java:77)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:801)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:817)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1303)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1324)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1337)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1414)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.onMessage(AmqpInboundChannelAdapter.java:211)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.lambda$onMessage$0(AmqpInboundChannelAdapter.java:214)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$1100(AmqpInboundChannelAdapter.java:60)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:203)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:108)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:160)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:181)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:394)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:445)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:73)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:105)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:132)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:158)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.MessageTransformingHandler.handleRequestMessage(MessageTransformingHandler.java:95)
2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:43.337 ERROR 16 --- [r.Header_TEST-9] o.s.integration.handler.LoggingHandler : org.springframework.integration.transformer.MessageTransformationException: Failed to transform Message; nested exception is org.springframework.messaging.MessagingException: failed to transform message headers; nested exception is org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
2019-04-04T17:19:43.345-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:43.345 WARN 16 --- [r.Header_TEST-9] o.s.a.r.r.RejectAndDontRequeueRecoverer : Retries exhausted for message (Body:'{"testWords":"Hello World!"}' MessageProperties [headers={contentType=application/json}, contentType=application/json, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, redelivered=false, receivedExchange=Header_TEST.trigger, receivedRoutingKey=Header_TEST.trigger, deliveryTag=1, consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, consumerQueue=Header_TEST.trigger.Header_TEST])
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 31 common frames omitted
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:128) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:371) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:116) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:89) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:407) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 28 common frames omitted
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:122) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor.processMessage(ExpressionEvaluatingHeaderValueMessageProcessor.java:71) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor.processMessage(ExpressionEvaluatingMessageProcessor.java:105) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:136) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 27 common frames omitted




In Environment Variables, we also tried several configurations, but none of them is working:



  spring.cloud.stream.bindings.output.destination=Header_TEST.trigger
spring.cloud.stream.rabbit.bindings.output.producer.routing-key-expression=headers.type


The issue is opened in GitHub also: https://github.com/spring-cloud-stream-app-starters/header-enricher/issues/23










share|improve this question









New contributor




WileyWu12555 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    1















    I create the Spring Cloud Data Flow stream with header-enricher 1.3 and deploy it, it works fine. But when I switch to header-enricher 2.x in same SCDF environment, it throw "Failed to transform Message exception".



    I'm wondering what's the difference between 1.3 and 2.x that cause the issue?



    Here is 1.3 stream definition:



    app register --name header-enricher_1_3 --type processor --uri http://repo.spring.io/release/org/springframework/cloud/stream/app/header-enricher-processor-rabbit/1.3.1.RELEASE/header-enricher-processor-rabbit-1.3.1.RELEASE.jar 

    stream create Header_TEST --definition "trigger --time-unit=MINUTES --initialDelay=0 --fixed-delay=500 --payload={'testWords':'Hello World!'} | header-enricher_1_3 --headers='testWords_header=payload.testWords' --outputType=application/json | log --expression=headers.testWords_header" --deploy


    It works fine, we can get " Hello World!" in log:



    2019-04-04T17:15:08.833-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:15:08.831 INFO 17 --- [ main] o.s.c.s.a.l.s.r.LogSinkRabbitApplication : Started LogSinkRabbitApplication in 12.406 seconds (JVM running for 14.73)
    2019-04-04T17:15:10.312-04:00 [CELL/0] [OUT] Container became healthy
    2019-04-04T17:15:13.112-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:15:13.111 INFO 17 --- [w.Header_TEST-9] dataflow-server-stg-Header_TEST-log : Hello World!


    Here is the 2.x Stream definition:



    app register --name header-enricher_2_1 --type processor --uri  http://repo.spring.io/release/org/springframework/cloud/stream/app/header-enricher-processor-rabbit/2.1.0.RELEASE/header-enricher-processor-rabbit-2.1.0.RELEASE.jar 

    stream create Header_TEST --definition "trigger --time-unit=MINUTES --initialDelay=0 --fixed-delay=500 --payload={'testWords':'Hello World!'} | header-enricher_2_1 --headers='testWords_header=payload.testWords' --outputType=application/json | log --expression=headers.testWords_header" --deploy


    I got an exception says:
    org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]'



    Here is the completed log:



    019-04-04T17:19:38.425-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:38.423 INFO 16 --- [ main] HeaderEnricherProcessorRabbitApplication : Started HeaderEnricherProcessorRabbitApplication in 12.71 seconds (JVM running for 13.979)
    2019-04-04T17:19:38.802-04:00 [CELL/0] [OUT] Container became healthy
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 31 more
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:128)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:371)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:116)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:89)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:407)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 28 more
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:122)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor.processMessage(ExpressionEvaluatingHeaderValueMessageProcessor.java:71)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor.processMessage(ExpressionEvaluatingMessageProcessor.java:105)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:136)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 27 more
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.MessageTransformingHandler.handleRequestMessage(MessageTransformingHandler.java:89)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:131)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessagingException: failed to transform message headers; nested exception is org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at java.lang.Thread.run(Thread.java:748)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1042)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$700(SimpleMessageListenerContainer.java:77)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:801)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:817)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1303)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1324)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1337)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1414)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.onMessage(AmqpInboundChannelAdapter.java:211)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.lambda$onMessage$0(AmqpInboundChannelAdapter.java:214)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$1100(AmqpInboundChannelAdapter.java:60)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:203)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:108)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:160)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:181)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:394)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:445)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:73)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:105)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:132)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:158)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.MessageTransformingHandler.handleRequestMessage(MessageTransformingHandler.java:95)
    2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:43.337 ERROR 16 --- [r.Header_TEST-9] o.s.integration.handler.LoggingHandler : org.springframework.integration.transformer.MessageTransformationException: Failed to transform Message; nested exception is org.springframework.messaging.MessagingException: failed to transform message headers; nested exception is org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
    2019-04-04T17:19:43.345-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:43.345 WARN 16 --- [r.Header_TEST-9] o.s.a.r.r.RejectAndDontRequeueRecoverer : Retries exhausted for message (Body:'{"testWords":"Hello World!"}' MessageProperties [headers={contentType=application/json}, contentType=application/json, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, redelivered=false, receivedExchange=Header_TEST.trigger, receivedRoutingKey=Header_TEST.trigger, deliveryTag=1, consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, consumerQueue=Header_TEST.trigger.Header_TEST])
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 31 common frames omitted
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:128) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:371) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:116) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:89) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:407) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 28 common frames omitted
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:122) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor.processMessage(ExpressionEvaluatingHeaderValueMessageProcessor.java:71) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor.processMessage(ExpressionEvaluatingMessageProcessor.java:105) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:136) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
    2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 27 common frames omitted




    In Environment Variables, we also tried several configurations, but none of them is working:



      spring.cloud.stream.bindings.output.destination=Header_TEST.trigger
    spring.cloud.stream.rabbit.bindings.output.producer.routing-key-expression=headers.type


    The issue is opened in GitHub also: https://github.com/spring-cloud-stream-app-starters/header-enricher/issues/23










    share|improve this question









    New contributor




    WileyWu12555 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1








      I create the Spring Cloud Data Flow stream with header-enricher 1.3 and deploy it, it works fine. But when I switch to header-enricher 2.x in same SCDF environment, it throw "Failed to transform Message exception".



      I'm wondering what's the difference between 1.3 and 2.x that cause the issue?



      Here is 1.3 stream definition:



      app register --name header-enricher_1_3 --type processor --uri http://repo.spring.io/release/org/springframework/cloud/stream/app/header-enricher-processor-rabbit/1.3.1.RELEASE/header-enricher-processor-rabbit-1.3.1.RELEASE.jar 

      stream create Header_TEST --definition "trigger --time-unit=MINUTES --initialDelay=0 --fixed-delay=500 --payload={'testWords':'Hello World!'} | header-enricher_1_3 --headers='testWords_header=payload.testWords' --outputType=application/json | log --expression=headers.testWords_header" --deploy


      It works fine, we can get " Hello World!" in log:



      2019-04-04T17:15:08.833-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:15:08.831 INFO 17 --- [ main] o.s.c.s.a.l.s.r.LogSinkRabbitApplication : Started LogSinkRabbitApplication in 12.406 seconds (JVM running for 14.73)
      2019-04-04T17:15:10.312-04:00 [CELL/0] [OUT] Container became healthy
      2019-04-04T17:15:13.112-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:15:13.111 INFO 17 --- [w.Header_TEST-9] dataflow-server-stg-Header_TEST-log : Hello World!


      Here is the 2.x Stream definition:



      app register --name header-enricher_2_1 --type processor --uri  http://repo.spring.io/release/org/springframework/cloud/stream/app/header-enricher-processor-rabbit/2.1.0.RELEASE/header-enricher-processor-rabbit-2.1.0.RELEASE.jar 

      stream create Header_TEST --definition "trigger --time-unit=MINUTES --initialDelay=0 --fixed-delay=500 --payload={'testWords':'Hello World!'} | header-enricher_2_1 --headers='testWords_header=payload.testWords' --outputType=application/json | log --expression=headers.testWords_header" --deploy


      I got an exception says:
      org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]'



      Here is the completed log:



      019-04-04T17:19:38.425-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:38.423 INFO 16 --- [ main] HeaderEnricherProcessorRabbitApplication : Started HeaderEnricherProcessorRabbitApplication in 12.71 seconds (JVM running for 13.979)
      2019-04-04T17:19:38.802-04:00 [CELL/0] [OUT] Container became healthy
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 31 more
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:128)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:371)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:116)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:89)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:407)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 28 more
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:122)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor.processMessage(ExpressionEvaluatingHeaderValueMessageProcessor.java:71)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor.processMessage(ExpressionEvaluatingMessageProcessor.java:105)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:136)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 27 more
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.MessageTransformingHandler.handleRequestMessage(MessageTransformingHandler.java:89)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:131)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessagingException: failed to transform message headers; nested exception is org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at java.lang.Thread.run(Thread.java:748)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1042)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$700(SimpleMessageListenerContainer.java:77)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:801)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:817)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1303)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1324)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1337)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1414)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.onMessage(AmqpInboundChannelAdapter.java:211)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.lambda$onMessage$0(AmqpInboundChannelAdapter.java:214)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$1100(AmqpInboundChannelAdapter.java:60)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:203)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:108)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:160)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:181)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:394)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:445)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:73)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:105)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:132)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:158)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.MessageTransformingHandler.handleRequestMessage(MessageTransformingHandler.java:95)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:43.337 ERROR 16 --- [r.Header_TEST-9] o.s.integration.handler.LoggingHandler : org.springframework.integration.transformer.MessageTransformationException: Failed to transform Message; nested exception is org.springframework.messaging.MessagingException: failed to transform message headers; nested exception is org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
      2019-04-04T17:19:43.345-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:43.345 WARN 16 --- [r.Header_TEST-9] o.s.a.r.r.RejectAndDontRequeueRecoverer : Retries exhausted for message (Body:'{"testWords":"Hello World!"}' MessageProperties [headers={contentType=application/json}, contentType=application/json, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, redelivered=false, receivedExchange=Header_TEST.trigger, receivedRoutingKey=Header_TEST.trigger, deliveryTag=1, consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, consumerQueue=Header_TEST.trigger.Header_TEST])
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 31 common frames omitted
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:128) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:371) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:116) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:89) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:407) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 28 common frames omitted
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:122) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor.processMessage(ExpressionEvaluatingHeaderValueMessageProcessor.java:71) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor.processMessage(ExpressionEvaluatingMessageProcessor.java:105) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:136) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 27 common frames omitted




      In Environment Variables, we also tried several configurations, but none of them is working:



        spring.cloud.stream.bindings.output.destination=Header_TEST.trigger
      spring.cloud.stream.rabbit.bindings.output.producer.routing-key-expression=headers.type


      The issue is opened in GitHub also: https://github.com/spring-cloud-stream-app-starters/header-enricher/issues/23










      share|improve this question









      New contributor




      WileyWu12555 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I create the Spring Cloud Data Flow stream with header-enricher 1.3 and deploy it, it works fine. But when I switch to header-enricher 2.x in same SCDF environment, it throw "Failed to transform Message exception".



      I'm wondering what's the difference between 1.3 and 2.x that cause the issue?



      Here is 1.3 stream definition:



      app register --name header-enricher_1_3 --type processor --uri http://repo.spring.io/release/org/springframework/cloud/stream/app/header-enricher-processor-rabbit/1.3.1.RELEASE/header-enricher-processor-rabbit-1.3.1.RELEASE.jar 

      stream create Header_TEST --definition "trigger --time-unit=MINUTES --initialDelay=0 --fixed-delay=500 --payload={'testWords':'Hello World!'} | header-enricher_1_3 --headers='testWords_header=payload.testWords' --outputType=application/json | log --expression=headers.testWords_header" --deploy


      It works fine, we can get " Hello World!" in log:



      2019-04-04T17:15:08.833-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:15:08.831 INFO 17 --- [ main] o.s.c.s.a.l.s.r.LogSinkRabbitApplication : Started LogSinkRabbitApplication in 12.406 seconds (JVM running for 14.73)
      2019-04-04T17:15:10.312-04:00 [CELL/0] [OUT] Container became healthy
      2019-04-04T17:15:13.112-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:15:13.111 INFO 17 --- [w.Header_TEST-9] dataflow-server-stg-Header_TEST-log : Hello World!


      Here is the 2.x Stream definition:



      app register --name header-enricher_2_1 --type processor --uri  http://repo.spring.io/release/org/springframework/cloud/stream/app/header-enricher-processor-rabbit/2.1.0.RELEASE/header-enricher-processor-rabbit-2.1.0.RELEASE.jar 

      stream create Header_TEST --definition "trigger --time-unit=MINUTES --initialDelay=0 --fixed-delay=500 --payload={'testWords':'Hello World!'} | header-enricher_2_1 --headers='testWords_header=payload.testWords' --outputType=application/json | log --expression=headers.testWords_header" --deploy


      I got an exception says:
      org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]'



      Here is the completed log:



      019-04-04T17:19:38.425-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:38.423 INFO 16 --- [ main] HeaderEnricherProcessorRabbitApplication : Started HeaderEnricherProcessorRabbitApplication in 12.71 seconds (JVM running for 13.979)
      2019-04-04T17:19:38.802-04:00 [CELL/0] [OUT] Container became healthy
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 31 more
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:128)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:371)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:116)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:89)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:407)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 28 more
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:122)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor.processMessage(ExpressionEvaluatingHeaderValueMessageProcessor.java:71)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor.processMessage(ExpressionEvaluatingMessageProcessor.java:105)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:136)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] ... 27 more
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.MessageTransformingHandler.handleRequestMessage(MessageTransformingHandler.java:89)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:131)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessagingException: failed to transform message headers; nested exception is org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at java.lang.Thread.run(Thread.java:748)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1042)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$700(SimpleMessageListenerContainer.java:77)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:801)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:817)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1303)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1324)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1337)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1414)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.onMessage(AmqpInboundChannelAdapter.java:211)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.lambda$onMessage$0(AmqpInboundChannelAdapter.java:214)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$1100(AmqpInboundChannelAdapter.java:60)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:203)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:108)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:160)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:181)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:394)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:445)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:73)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:105)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:132)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:158)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.MessageTransformingHandler.handleRequestMessage(MessageTransformingHandler.java:95)
      2019-04-04T17:19:43.338-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:43.337 ERROR 16 --- [r.Header_TEST-9] o.s.integration.handler.LoggingHandler : org.springframework.integration.transformer.MessageTransformationException: Failed to transform Message; nested exception is org.springframework.messaging.MessagingException: failed to transform message headers; nested exception is org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?, failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}], failedMessage=GenericMessage [payload=byte[28], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=Header_TEST.trigger, amqp_receivedExchange=Header_TEST.trigger, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=Header_TEST.trigger.Header_TEST, amqp_redelivered=false, id=66e0aa1c-1188-5c0b-ed94-cdfea662e096, amqp_consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, contentType=application/json, timestamp=1554412780307}]
      2019-04-04T17:19:43.345-04:00 [APP/PROC/WEB/0] [OUT] 2019-04-04 21:19:43.345 WARN 16 --- [r.Header_TEST-9] o.s.a.r.r.RejectAndDontRequeueRecoverer : Retries exhausted for message (Body:'{"testWords":"Hello World!"}' MessageProperties [headers={contentType=application/json}, contentType=application/json, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, redelivered=false, receivedExchange=Header_TEST.trigger, receivedRoutingKey=Header_TEST.trigger, deliveryTag=1, consumerTag=amq.ctag-I7THOoYQhfPXXp5pivECXg, consumerQueue=Header_TEST.trigger.Header_TEST])
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 31 common frames omitted
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:128) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:371) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:116) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:89) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:407) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217) ~[spring-expression-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 28 common frames omitted
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.HeaderEnricher.transform(HeaderEnricher.java:122) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor.processMessage(ExpressionEvaluatingHeaderValueMessageProcessor.java:71) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor.processMessage(ExpressionEvaluatingMessageProcessor.java:105) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:136) ~[spring-integration-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.messaging.MessageHandlingException: Expression evaluation failed: payload.testWords; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'testWords' cannot be found on object of type 'byte[]' - maybe not public or not valid?
      2019-04-04T17:19:43.346-04:00 [APP/PROC/WEB/0] [OUT] ... 27 common frames omitted




      In Environment Variables, we also tried several configurations, but none of them is working:



        spring.cloud.stream.bindings.output.destination=Header_TEST.trigger
      spring.cloud.stream.rabbit.bindings.output.producer.routing-key-expression=headers.type


      The issue is opened in GitHub also: https://github.com/spring-cloud-stream-app-starters/header-enricher/issues/23







      java headers






      share|improve this question









      New contributor




      WileyWu12555 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      WileyWu12555 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited yesterday









      Hastur

      13.6k53268




      13.6k53268






      New contributor




      WileyWu12555 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      WileyWu12555WileyWu12555

      61




      61




      New contributor




      WileyWu12555 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      WileyWu12555 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      WileyWu12555 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          WileyWu12555 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1421901%2ffailed-to-transform-message-when-switch-header-enricher-from-1-3-to-2-x-in-sprin%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          WileyWu12555 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          WileyWu12555 is a new contributor. Be nice, and check out our Code of Conduct.













          WileyWu12555 is a new contributor. Be nice, and check out our Code of Conduct.












          WileyWu12555 is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1421901%2ffailed-to-transform-message-when-switch-header-enricher-from-1-3-to-2-x-in-sprin%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...