gammacomputer opened a new issue, #11886:
URL: https://github.com/apache/ignite/issues/11886
### Description:
When starting Apache Ignite 2.17.0 with a non-empty `CONFIG_URI`, the
process fails with a `java.lang.NoClassDefFoundError` for
`com.fasterxml.jackson.core.JsonProcessingException`. This issue occurs despite
the configuration file being a valid XML. 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
```
### Configuration Files:
Two example configuration files that reproduce the issue:
#### Example 1:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="discoverySpi">
<bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>ignite-0</value>
<value>ignite-1</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
<property name="binaryConfiguration">
<bean
class="org.apache.ignite.configuration.BinaryConfiguration">
<property name="compactFooter" value="false"/>
</bean>
</property>
</bean>
</beans>
```
#### Example 2:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="workDirectory" value="/path/to/work/directory"/>
<property name="cacheConfiguration">
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="myCache"/>
<property name="cacheMode" value="PARTITIONED"/>
</bean>
</property>
</bean>
</beans>
```
### 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:
1. Create a Dockerfile with the following content:
```dockerfile
FROM apacheignite/ignite:2.17.0
COPY node-configuration.xml /ignite/config/node-configuration.xml
ENV OPTION_LIBS=ignite-rest-http
ENV CONFIG_URI=/ignite/config/node-configuration.xml
ENV JVM_OPTS=-DIGNITE_WAL_MMAP=false -Djava.net.preferIPv4Stack=true
```
2. Build the Docker image after ensure you have a file named
`node-configuration.xml` in the same directory as the Dockerfile and with one
of the two example xml configuration:
```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.
- The configuration files seems valid and the second one is extracted from
the official Apache Ignite documentation
(https://ignite.apache.org/docs/latest/understanding-configuration#spring-xml-configuration).
### Possible Cause:
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.
--
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]