I compared with the working version 1.28.5 of https://repo1.maven.org/maven2/org/apache/tika/tika-parsers/1.28.5/.
That has: 1. An import-package towards org.apache.tika.parser 2. Embeds most parsers 3. Registers org.apache.tika.parser.DefaultParser as OSGi service which itself loads all found parsers via regular Java Service Loader from the bundle’s class path 4. All parser services from https://github.com/apache/tika/blob/1.28.5/tika-parsers/src/main/resources/META-INF/services/org.apache.tika.parser.Parser are then discovered and loaded within the DefaultParser OTOH tika-parsers-standard-package has 1. An import-package towards org.apache.tika.parser but none to org.apache.tika.parser.external (which contains the CompositeExternalParser) 2. Embeds no parser (in fact only contains a single class file: the Activator) 3. Registers org.apache.tika.parser.DefaultParser as OSGi service which itself loads all found parsers via regular Java Service Loader from the bundle’s class path 4. Only a single parser services registered at https://github.com/apache/tika/blob/main/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/main/resources/META-INF/services/org.apache.tika.parser.Parser is then failing to load due to bundle not seeing package org.apache.tika.parser.external So during the cleanup between those two versions something has been fundamentally broken… I hope this helps to clean up things. > On 25. Mar 2026, at 15:07, Konrad Windszus <[email protected]> wrote: > > Hi, > I am currently trying to upgrade Tika from ancient 1.x to most recent 3.3 in > Apache Oak (https://issues.apache.org/jira/browse/OAK-9752). > I studied > https://cwiki.apache.org/confluence/display/TIKA/Migrating+to+Tika+2.0.0 > however the usage in OSGi is unclear to me: > > First I tried to deploy both tika-core and tika-parsers-standard-package > (both have OSGi metadata in their manifests) in my OSGi container (Apache > Felix) and ran into https://issues.apache.org/jira/browse/TIKA-4698. > > Then I tried to deploy tika-standard-bundle and ran into > https://issues.apache.org/jira/browse/TIKA-4699. > > I checked both tika-standard-bundle and tika-parsers-standard-package more > thoroughly afterwards and they don’t really seem to be ready for OSGi. The > former lacks to embed/include any of the parsers from its Maven dependencies > (i.e. only contains a single source file, namely the Bundle Activator > (https://github.com/apache/tika/blob/a7e6ac73862d0d8d719ace8b9d0cb6d39efb926b/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/main/java/org/apache/tika/parser/internal/Activator.java). > The latter embeds lots of stuff but again misses the actual parsers. > > Am I missing something here or is OSGi support just broken in newer Tika > versions? Maven dependencies along have zero effect on the generated bundles > (they are by default a compile time only thing) so just having a dependency > without at least an according embed cannot really work... > I am more than happy to help once I get a better understanding how things are > supposed to work. > Can someone clarify the idea of tika-parsers-standard-package and > tika-standard-bundle in OSGi? > > Thanks in advance, > Konrad
