Claus Ibsen created CAMEL-27260:
-----------------------------------

             Summary: camel-salesforce - NoClassDefFoundError 
com/google/protobuf/RuntimeVersion$RuntimeDomain outside the Camel build 
(protobuf-java 3.x from grpc)
                 Key: CAMEL-27260
                 URL: https://issues.apache.org/jira/browse/CAMEL-27260
             Project: Camel
          Issue Type: Bug
          Components: camel-salesforce
            Reporter: Claus Ibsen


The Pub/Sub API classes of camel-salesforce are generated with protoc 
{{$\{protobuf-version\}}} (4.35.1) and need protobuf-java 4.x at runtime. 
camel-salesforce-component does not declare protobuf-java itself: it comes 
through {{grpc-protobuf}} 1.85.1, which depends on protobuf-java 3.25.9. Inside 
the Camel build the parent POM manages it to 4.35.1, but a user's build does 
not get that management for a transitive dependency, so the user gets 3.25.9.

With {{camel run}} (4.24.0-SNAPSHOT) any salesforce endpoint, even 
{{salesforce:createSObject}}, fails at startup:
{noformat}
java.lang.NoClassDefFoundError: com/google/protobuf/RuntimeVersion$RuntimeDomain
        at 
com.salesforce.eventbus.protobuf.ReplayPreset.<clinit>(ReplayPreset.java:48)
{noformat}
A Maven project that imports only {{camel-bom}} gets the same. The workaround 
is adding {{com.google.protobuf:protobuf-java:4.35.1}}.

Expected: camel-salesforce-component declares {{protobuf-java}} with 
{{$\{protobuf-version\}}}, so its users get the version its generated classes 
need. camel-kserve and camel-tensorflow-serving already do this; camel-qdrant 
and camel-grpc do not need it (no classes generated with protobuf 4).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to