nddipiazza opened a new pull request, #2790:
URL: https://github.com/apache/tika/pull/2790

   ## Summary
   
   The `tika-grpc` Docker image was failing to start with:
   
   ```
   Error: Unable to initialize main class 
org.apache.tika.pipes.grpc.TikaGrpcServer
   Caused by: java.lang.NoClassDefFoundError: io/grpc/BindableService
   ```
   
   ## Root Cause
   
   The Docker build context only copied the thin jar (`tika-grpc-X.jar`) but 
not the `lib/` directory containing runtime dependencies. The jar's 
`MANIFEST.MF` has `Class-Path: lib/grpc-stub-X.jar lib/grpc-netty-shaded-X.jar 
...` (set by `classpathPrefix=lib/` in `maven-jar-plugin`), so Java looks for 
deps at `/tika/libs/lib/` — which did not exist in the image.
   
   ## Fix
   
   Instead of copying just the bare jar, unzip the Maven assembly zip (which 
bundles the jar + `lib/` with all runtime deps) and include both in the Docker 
build context:
   
   ```
   /tika/libs/tika-grpc-X.jar     ← main jar
   /tika/libs/lib/*.jar            ← runtime deps (matches MANIFEST Class-Path)
   ```
   
   ## Critical Files
   
   - `.github/workflows/docker-snapshot.yml`
   - `.github/workflows/docker-release.yml`


-- 
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