You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Camel Guy <ca...@devguy.com> on 2014/11/22 20:41:53 UTC
getRouteDefinition throws NullPointerException in CamelSpringTestSupport
before context is started
Camel 2.14.0
I am extending CamelSpringTestSupport with:
@Override
public boolean isUseAdviceWith() {
return true;
}
In a @Before method I call context.getRouteDefintion("some.id")
It throws an exception:
org.apache.camel.impl.DefaultCamelContext.getRouteDefinition(DefaultCamelContext.java:1464)
If I put context.start() at the top of the method, it works.
However, I don't want timers etc. to fire until all of the @Before
methods have executed, which I think is why isUseAdviceWith exists.
Thanks,
~cg