jbonofre opened a new pull request, #716:
URL: https://github.com/apache/camel-karaf/pull/716

   ## Summary
   
   Fixes #713. The `camel-tika` feature was missing several transitive runtime 
dependencies of the Tika parser modules it installs, so `tika:detect` / 
`tika:parse` fail at runtime with `NoClassDefFoundError`.
   
   Dependency tree of `camel-tika` (Tika 3.2.3):
   
   | Module | Transitive dep | Was in feature? | OSGi bundle? | Fix |
   |---|---|---|---|---|
   | tika-parser-html-module | `org.jsoup:jsoup` | ❌ | ✅ | plain `mvn:` |
   | tika-parser-html-module | `commons-codec:commons-codec` | ❌ | ✅ | plain 
`mvn:` |
   | tika-parser-text-module | `org.apache.commons:commons-csv` | ❌ | ✅ | plain 
`mvn:` |
   | tika-parser-text-module | `com.github.albfernandez:juniversalchardet` | ❌ 
| ❌ (no manifest) | `wrap:` |
   
   `org.apache.tika.parser.txt.UniversalEncodingListener` needs 
`org.mozilla.universalchardet.*` from juniversalchardet, which is why charset 
detection/text parsing broke.
   
   ## Changes
   
   - **`features/src/main/feature/camel-features.xml`** — add `jsoup`, 
`commons-codec`, `commons-csv` (plain bundles) and `juniversalchardet` (via 
`wrap:`, as it ships no OSGi metadata) to the `camel-tika` feature.
   - **`pom.xml`** — bump the stale, previously-unused 
`juniversalchardet-version` from `1.0.3` (the old 
`com.googlecode.juniversalchardet` groupId) to `2.5.0`, matching what Tika 
3.2.3 pulls in (`com.github.albfernandez`).
   - **`tests/features/camel-tika`** — new Pax Exam integration test (`direct → 
tika:parse?tikaParseOutputFormat=text → mock`) exercising the text parser and 
its juniversalchardet dependency at runtime, plus the `<module>` entry.
   
   ## Verification
   
   `mvn -pl features process-resources` (karaf `verify` goal) resolves the 
feature cleanly:
   
   ```
   [INFO] Verification of feature camel-tika/4.18.2.SNAPSHOT succeeded
   ```
   
   (The unrelated `camel-chatscript` / `camel-docling` / `camel-jacksonxml` / 
`camel-langchain4j-chat` / `camel-torchserve` failures in a full local run are 
a pre-existing `jackson-annotation` 2.21 vs 2.20.1 mismatch in the local repo, 
not affected by this change.)
   
   ---
   _Claude Code on behalf of JB Onofré_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to