apache / apache/ignite

Apache Ignite 2.17.0 Fails to Start with OPTION_LIBS=ignite-rest-http Due to Missing Jackson Dependency

Open
#11,886 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.1k
Forks
1.9k
Avg merge
3d 2h
Merged PRs (30d)
46

Description

### Description:
When starting Apache Ignite 2.17.0 with OPTION_LIBS=ignite-rest-http, the process fails with a `java.lang.NoClassDefFoundError` for `com.fasterxml.jackson.core.JsonProcessingException`. The problem does not occur in version 2.16.0.

### Error Message:
```
[11:17:48,997][SEVERE][main][IgniteKernal] Exception during start processors, node will be stopped and close connections
java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException
at org.apache.ignite.internal.processors.rest.protocols.http.jetty.GridJettyRestProtocol.start(GridJettyRestProtocol.java:104)
at org.apache.ignite.internal.processors.rest.GridRestProcessor.startProtocol(GridRestProcessor.java:1037)
at org.apache.ignite.internal.processors.rest.GridRestProcessor.startHttpProtocol(GridRestProcessor.java:1008)
at org.apache.ignite.internal.processors.rest.GridRestProcessor.start(GridRestProcessor.java:558)
at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1823)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1105)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1720)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1642)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1084)
at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:978)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:884)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:803)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:673)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:642)
at org.apache.ignite.Ignition.start(Ignition.java:325)
at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:365)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonProcessingException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
```

### Environment Details:
- **Operating System**: Tested on Kubernetes and Docker (AMD architecture)
- **Docker Image**: `apacheignite/ignite:2.17.0`
- **Java Version**: OpenJDK Runtime Environment 11.0.26+4 Eclipse Adoptium OpenJDK 64-Bit Server VM 11.0.26+4

### Reproduction Steps:
Simpler reproduction steps with docker-compose is available in the following ticket: https://github.com/apache/ignite/issues/11877#issue-2853851199
1. Create a Dockerfile with the following content:
```dockerfile
FROM apacheignite/ignite:2.17.0

ENV OPTION_LIBS=ignite-rest-http
```
2. Build the Docker image:
```sh
docker build -t testignite .
```

3. Run the Docker container:
```sh
docker run -it testignite
```

4. Observe the error message and container crash:
```
java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException
```

### Expected Behavior:
Apache Ignite should start without any errors and the stack trace should not appear.

### Additional Information:
- The issue does not occur with `apacheignite/ignite:2.16.0` using the same configuration and Dockerfile.

### Possible Cause:
At the end of the logs, it also complains about USER_LIBS not being defined, maybe that's a clue ?
The issue might be due to a missing dependency for the Jackson library in the `apacheignite/ignite:2.17.0` Docker image.

### Suggested Fix:
Investigate the Docker image `apacheignite/ignite:2.17.0` to ensure that all necessary dependencies, including the Jackson library, are included. Alternatively, update the Dockerfile to include the missing dependency.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the provided Dockerfile and OPTION_LIBS=ignite-rest-http, then inspect GridJettyRestProtocol.java at line 104 and the apacheignite/ignite:2.17.0 image dependencies. Compare with 2.16.0 and verify that the container starts successfully without the Jackson NoClassDefFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
backend, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.