If you misspelled a java type in an ESB interface you only know until runtime, and it is very difficult to diagnose.
For a reproducer of a problem do: Create a FileBinding with an ESB interface with input of "java:java.lang.Stirng" (check mispelling in String). When executed this file binding you get following error:
13:04:55,840 ERROR [org.apache.camel.processor.DefaultErrorHandler] (Camel (camel-5) thread #4 - file:///input) Failed delivery for (MessageId: ID-b698851c14b7-37497-1412683364884-4-1 on ExchangeId: ID-b698851c14b7-37497-1412683364884-4-2). Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: java.lang.NullPointerException at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:61) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061] at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:47) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
This can be easily avoided if we can check at least for basic Java types.
|