Claus Ibsen created CAMEL-26221:
-----------------------------------
Summary: camel-ibm-watsonx-data - getAllColumns always fails with
NoClassDefFoundError for Gson $Gson$Types, and updateTable accepts only a Map
body
Key: CAMEL-26221
URL: https://issues.apache.org/jira/browse/CAMEL-26221
Project: Camel
Issue Type: Bug
Components: camel-ai
Reporter: Claus Ibsen
Fix For: 4.24.0
Found while adding the catalog body types of ibm-watsonx-data (CAMEL-24961, PR
#28402).
h4. 1. getAllColumns fails with NoClassDefFoundError
com/google/gson/internal/$Gson$Types
Same dependency alignment issue as camel-ibm-watson-discovery: camel-parent
manages {{gson}} at 2.14.0 ({{parent/pom.xml}}, main 2a465aa4814c, line 224)
while {{watson-x-data}} 0.9.0 brings {{com.ibm.cloud:sdk-core}} 9.18.4, whose
{{DynamicModelTypeAdapterFactory}} still uses the removed {{$Gson$Types}}.
{{WatsonxDataProducer.handleGetAllColumns}} (line 322) fails to parse the
response; other operations whose models use dynamic properties may fail too.
Checked on 4.24.0-SNAPSHOT with a JDK HttpServer stub as the service.
Proposed: manage {{com.ibm.cloud:sdk-core}} at 9.24.3 or later (or upgrade the
watsonx.data SDK), and add a test that parses a getAllColumns response.
h4. 2. updateTable accepts only a java.util.Map body
{{handleUpdateTable}} (line 275) reads the body with {{getBody(Map.class)}}; a
JSON String body (from HTTP or a file) gives null and fails with "Request body
with table patch data is required for updateTable operation". Checked on
4.24.0-SNAPSHOT with a JDK HttpServer stub.
Proposed: parse a JSON String / bytes body into a Map, and mention the accepted
types in the error.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)