BlueprintCamelContext swallows Exceptions after Fuse 6.3 Rollup 2

Solution Verified - Updated -

Issue

  • We are facing the same effects depicted at https://issues.jboss.org/browse/ENTESB-6729.

  • When an exception arises during the execution of _org.apache.camel.blueprint.BlueprintCamelContext#start_ it gets silently caught, so the context automagically goes from starting to shutdown state.

It is due to the following implementation

 @Override
    public void start() throws Exception {
        final ClassLoader original = Thread.currentThread().getContextClassLoader();
        try {
            // let's set a more suitable TCCL while starting the context
            Thread.currentThread().setContextClassLoader(getApplicationContextClassLoader());
            super.start();
        } catch (FailedToCreateRouteException e){
            routeDefinitionValid.set(false);
        }
        finally {
            Thread.currentThread().setContextClassLoader(original);
        }
    }

(see https://maven.repository.redhat.com/ga/org/apache/camel/camel-blueprint/2.17.0.redhat-630254/camel-blueprint-2.17.0.redhat-630254-sources.jar)

  • This prevents users to get details about failures cause. Exceptions (and related details) should not be completely silenced if their effects are still perceived from outside.
    Previous implementations up to rollup 1 simply missed the catch clause (i.e. 2.17.0.redhat-630224).

  • This happens on karaf based containers running on Fuse 6.3.0 only after rollup 2 has been applied.
    In fact the implementation of org.apache.camel.blueprint.BlueprintCamelContext#start has been slightly modified adding the catch statement.

  • To reproduce this, take a bundle with referring to a blueprint property not available at runtime. The exception is always silently caught, thought there's no way to get evidence of the cause other than debugging.

This issue makes the customer reluctant to deploy Rollup2 of Fuse 6.3.0.

Environment

  • Red Hat JBoss Fuse
    • 6.3.0
    • Rollup 2
  • Karaf/Blueprint

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In