Ignite 2.16 is incompatible with recent h2database, h2 must be shaded
- Dominant language
- Java
- Stars
- 5.1k
- Forks
- 1.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
With `com.h2database:h2:2.2.224` I receive:
```
java.lang.NoClassDefFoundError: org/h2/value/ValueByte
at org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2ValueMessageFactory.registerAll(GridH2ValueMessageFactory.java:40)
at org.apache.ignite.internal.managers.communication.IgniteMessageFactoryImpl.(IgniteMessageFactoryImpl.java:72)
at org.apache.ignite.internal.managers.communication.GridIoManager.start(GridIoManager.java:482)
at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1774)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1008)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1725)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1647)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1089)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:625)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:547)
at org.apache.ignite.Ignition.start(Ignition.java:300)
at ignite.ExpireTest.expireListener(ExpireTest.java:32)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.lang.ClassNotFoundException: org.h2.value.ValueByte
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
... 15 more
```
The last compatible version of h2 is 1.4.197 → Mar 18, **2018**
with a lot of vulnerabilities!
The h2 database must be either:
- upgraded (better)
- or shaded
I use Gradle and don't know Maven, but it should probably look close to this:
https://github.com/magicprinc/ignite/commit/a185f1eba68eee548f42e8b1198d8fff572b0c2d
(see also https://github.com/apache/ignite/pull/9336)
See also
https://github.com/gridgain/gridgain/tree/master/modules/h2
Contributor guide
Research direction
Start by reviewing the modules/h2 directory and the referenced commit and pull request for prior shading work. Determine whether upgrading or shading H2 resolves the reported NoClassDefFoundError with version 2.2.224, then verify that Ignite starts successfully with a recent H2 dependency and that the existing build remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100