1
votes

After an upgrade to Apache Camel 2.21.1, my application is failing to start. Specifically, the upgrade to camel-aws causes the application to throw this error on startup:

Error creating bean with name 'incomingEndpoint': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/camel/component/extension/ComponentExtension

Here are my related dependencies:

<properties>
        <apache.camel.version>2.21.1</apache.camel.version>
</properties>
<dependencies>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-core</artifactId>
    <version>${apache.camel.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-aws</artifactId>
    <version>${apache.camel.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-test</artifactId>
    <version>${apache.camel.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-http4</artifactId>
    <version>${apache.camel.version}</version>
</dependency>
</dependencies>

Has anyone else experienced this recently? My application works when I switch the camel-aws dependency to version to 2.19.2.

1
Very strange, since this is a Class of camel-core. I would check for classpath issues with transitive dependencies. Do you use Maven Enforcer? That would help to find out about such issues.burki

1 Answers

0
votes

As @burki mentioned in the comments, it looked like a transitive dependency issue (classic problem in my experience with large maven projects).

I used mvn dependency:tree to determine which dependencies were clashing and upgraded the dependency that needed to match the latest version.