camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Hicks (Poggs)" <peter.hi...@poggs.co.uk>
Subject NPE in org.apache.camel.test.junit4.CamelTestSupport.logCoverageSummary
Date Sun, 21 May 2017 14:14:17 GMT
Hello

I’m unsure whether this is down to my inexperience with Camel or an actual bug, but I wanted
to bring it up here regardless.

I have a Camel component which processes an Exchange and sends multiple messages in response.
 It’s part of a larger piece of code which translates ‘commands’ from one system in
to ‘operations’ to carry out on another system.

One of the unit tests extends CamelTestSupport and has a RouteBuilder which returns the following:

return new RouteBuilder() {
    public void configure() {
        from("direct:start").process(testBean);
        from("direct:start.processed").to("mock:result.processed");
    }
};

When running this unit test, the correct data is output but I have the following NPE:

java.lang.NullPointerException
	at org.apache.camel.test.junit4.CamelTestSupport.logCoverageSummary(CamelTestSupport.java:463)
	at org.apache.camel.test.junit4.CamelTestSupport.tearDown(CamelTestSupport.java:402)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
...

If I simply add ".to("mock:result”)” to the end of the first route, the NPE disappears.

Is this a problem in my implementation?


Peter


Mime
View raw message