Search code examples
javaapache-camelopenjdk-11

Apache Camel 2.20.2 compatibility with JDK 11


I'm working on Oracle JDK 8 to AdoptOpenJDK 11 migration. We are also using Apache Camel 2.20.2. After JDK migration, I'm facing below issues in Camel Context XML file.

not able to recognize exchangePattern parameter

enum value not permissible

Even after having above issues, sometimes my application runs successfully and sometimes it gives error that it is not able to create spring bean. While creating below bean it says trustAllPackages is not a valid parameter which I know is not actually causing the issue.

bean creation

I think the issue is somewhat related to the errors in XML file. My question is:

  1. Is Camel 2.20.2 compatible with JDK 11? If not, are above errors result of this incompatibility?
  2. How to resolve these errors and why isn't this causing issue every time I run my application?

Currently we are using :

  • AdoptOpenJDK 11
  • Spring 4.3.11.RELEASE
  • Camel 2.20.2
  • ActiveMQ 5.15.0
  • Maven Build Tool

Thanks in advance.


Solution

  • You can see here what JDK version Camel supports https://camel.apache.org/manual/latest/what-are-the-dependencies.html

    Camel 2.x only supports Java 8. You need Camel 3.x for Java 11 support.