[
https://issues.apache.org/jira/browse/CAMEL-8570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14392559#comment-14392559
]
Jakob Thun commented on CAMEL-8570:
-----------------------------------
Tried it again with 2.15-SNAPSHOT. Error is still there.
I forced gradle to download the dependencies again to make sure I was not using
some locally cached version.
This is the version it downloaded with 2.15-SNAPSHOT:
{noformat}
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-core/2.15-SNAPSHOT/camel-core-2.15-20150307.023702-161.jar
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-spring-boot/2.15-SNAPSHOT/camel-spring-boot-2.15-20150307.024139-100.jar
{noformat}
Then I tried 2.15.1-SNAPSHOT. Error is there. Deps with timestamp:
{noformat}
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-core/2.15.1-SNAPSHOT/camel-core-2.15.1-20150328.025219-17.jar
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-spring-boot/2.15.1-SNAPSHOT/camel-spring-boot-2.15.1-20150328.025553-15.jar
{noformat}
Then I tried 2.15.2-SNAPSHOT: Error is there. Deps. with timestamp:
{noformat}
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-core/2.15.2-SNAPSHOT/camel-core-2.15.2-20150402.024619-5.jar
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-spring-boot/2.15.2-SNAPSHOT/camel-spring-boot-2.15.2-20150401.025036-4.jar
{noformat}
For full verification I tried 2.16-SNAPSHOT again. Success.
{noformat}
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-core/2.16-SNAPSHOT/camel-core-2.16-20150402.024543-26-sources.jar
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-spring-boot/2.16-SNAPSHOT/camel-spring-boot-2.16-20150402.025258-24-sources.jar
{noformat}
I also noticed that 2.16 might use a different version of spring (I saw these
spring-jars being downloaded in the last test). Not sure if this means anything
in relation to this issue:
{noformat}
https://repo1.maven.org/maven2/org/springframework/spring-context/4.1.6.RELEASE/spring-context-4.1.6.RELEASE.jar
https://repo1.maven.org/maven2/org/springframework/spring-tx/4.1.6.RELEASE/spring-tx-4.1.6.RELEASE.jar
https://repo1.maven.org/maven2/org/springframework/spring-core/4.1.6.RELEASE/spring-core-4.1.6.RELEASE.jar
{noformat}
> NullPointerException when using CXF-component in a spring-boot application
> with loglevel >= INFO
> ------------------------------------------------------------------------------------------------
>
> Key: CAMEL-8570
> URL: https://issues.apache.org/jira/browse/CAMEL-8570
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-cxf, camel-spring-boot
> Affects Versions: 2.15.0, 2.15.1
> Reporter: Jakob Thun
> Priority: Minor
> Fix For: 2.16.0
>
>
> I get a NullPointerException when using log-level INFO or finer in a
> spring-boot application with CXF.
> The exception is thrown from DefaultCamelContext.java:2449, where it tries to
> log how many routes have been started.
> I have made an example project to reproduce it, it's available here:
> https://github.com/jakobthun/spring-boot-camel-cxf-logging-bug
> I have tried with camel version: 2.15.0 & 2.15-SNAPSHOT. Both have the same
> behaviour.
> +Andrew Block started som analysis:+
> It is running into issues in this code block which is executed at logging
> level >= INFO
> if (log.isInfoEnabled()) {
> // count how many routes are actually started
> int started = 0;
> for (Route route : getRoutes()) {
> if (getRouteStatus(route.getId()).isStarted()) {
> started++;
> }
> }
> log.info("Total " + getRoutes().size() + " routes, of which " +
> started + " is started.");
> log.info("Apache Camel " + getVersion() + " (CamelContext: " +
> getName() + ") started in " + TimeUtils.printDuration(stopWatch.taken()));
> }
> The exception occurs when the status for the route is pulled from the route
> service. It is null and the exception is thrown. The route is initially spun
> up but then refreshes when the CXF consumer is initialized.
> Swapping it to test with a direct consumer does not result in a similar
> situation and startup succeeds at all logging level.
> It appears the route is not being registered with the route service
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)