Hi Willem,

If you look again at the source code I attached (it will run as a very
simple JUnit test) - you'll see that the code gets the exception
information, but that information is a useless NullPointerException. This
exception gives no clue to the fact that the actual exception is a
type-conversion problem within the HTTP4 Camel component, caused by my code
attempting to pass a String as the message body instead of an InputStream
(so the fix was simply to wrap my String in an InputStream).

My post was just to highlight the poor error-reporting from the Camel code -
the underlying exception that describes the actual problem (a type
conversion problem) is being swallowed and our code just receives a
meaningless NPE exception instead (meaning we had to trace down into the
guts of the Camel implementation to actually discover the real problem).

Cheers,

Pat.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Http4-component-throws-useless-NPE-if-request-body-is-String-instead-of-InputStream-tp5717268p5717307.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to