camel PGP dataformat not using bouncycastle dependencies( bcpprov-jdk18) issue 4.8.0

Solution Verified - Updated -

Issue

In 4.4.0, camel crypto dependency uses the below chain, and it works fine. But in 4.8.0 it is not using bouncycastle dependencies, and even if we add manually, it throws the below error.

4.4.0

[INFO] +- org.apache.camel.springboot:camel-crypto-starter:jar:4.4.0.redhat-00033:compile
[INFO] |  \- org.apache.camel:camel-crypto:jar:4.4.0.redhat-00041:compile
[INFO] |     +- commons-codec:commons-codec:jar:1.16.1:compile
[INFO] |     +- org.bouncycastle:bcpg-jdk18on:jar:1.78:compile
[INFO] |     +- org.bouncycastle:bcprov-jdk18on:jar:1.78:compile
[INFO] |     \- org.bouncycastle:bcutil-jdk18on:jar:1.78:compile

4.8.0

[INFO] +- org.apache.camel.springboot:camel-crypto-starter:jar:4.8.0.redhat-00022:compile
[INFO] |  \- org.apache.camel:camel-crypto:jar:4.8.0.redhat-00017:compile
[INFO] |     \- commons-codec:commons-codec:jar:1.16.1:compile


org.apache.camel.RuntimeCamelException: java.lang.IllegalArgumentException: Data format 'pgp' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath
        at org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:53)
        at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:123)
        at ndb.ipaas.services.batch.feed.BatchFeedTestSupport.initialsetUp(BatchFeedTestSupport.java:76)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.lang.IllegalArgumentException: Data format 'pgp' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath
        at org.apache.camel.reifier.dataformat.DataFormatReifier.createDataFormat(DataFormatReifier.java:283)
        at org.apache.camel.impl.DefaultModelReifierFactory.createDataFormat(DefaultModelReifierFactory.java:54)
        at org.apache.camel.impl.DefaultCamelContext.bindDataFormats(DefaultCamelContext.java:547)
        at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2401)
        at org.apache.camel.support.service.BaseService.init(BaseService.java:85)
        at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2064)
        at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
        at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2083)
        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:211)
        at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121)

Environment

  • Red Hat build of Apache Camel for Spring Boot 4.8.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content