[
https://issues.apache.org/jira/browse/IGNITE-14453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17331156#comment-17331156
]
Aaron Anderson commented on IGNITE-14453:
-----------------------------------------
I dug into this and it appears that as of JDK 15 some memory methods were moved
from java.nio.MappedByteBuffer to
[java.nio.MappedMemoryUtils|https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/nio/MappedMemoryUtils.java]
I started to make a pull request but then I had issues with running some of
the tests and I wasn't sure the best way to handle dual JDK version support.
Attached is a patch of some changes that I made to the Ignite 2.10.0 tag
complied with JDK 11. With this update in place I am able to start up Ignite
and store entries in a cache back by persistence.
> Issue with persistence when using JDK15
> ---------------------------------------
>
> Key: IGNITE-14453
> URL: https://issues.apache.org/jira/browse/IGNITE-14453
> Project: Ignite
> Issue Type: Bug
> Components: persistence
> Affects Versions: 2.10
> Environment: Apache Ignite with openJDK-15 (java version 15.0.1)
> Reporter: Emmanuel Wiesenfeld
> Priority: Major
> Attachments: ignite-jdk16.sh
>
>
> When using the following code:
>
> {code:java}
> IgniteConfiguration cfg = new IgniteConfiguration();
> //data storage configuration
> DataStorageConfiguration storageCfg = new DataStorageConfiguration();
> storageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true);
> cfg.setDataStorageConfiguration(storageCfg);
> Ignite ignite = Ignition.start(cfg);{code}
>
> I get this upon startup:
> {code:java}
> SEVERE: Got exception while starting (will rollback startup routine).
> java.lang.NullPointerException: Cannot invoke
> "java.lang.reflect.Method.invoke(Object, Object[])" because
> "org.apache.ignite.internal.processors.cache.persistence.wal.filehandle.FileWriteHandleImpl.mappingOffset"
> is null
> at
> org.apache.ignite.internal.processors.cache.persistence.wal.filehandle.FileWriteHandleImpl.fsync(FileWriteHandleImpl.java:449)
> at
> org.apache.ignite.internal.processors.cache.persistence.wal.filehandle.FileWriteHandleImpl.fsync(FileWriteHandleImpl.java:418)
> at
> org.apache.ignite.internal.processors.cache.persistence.wal.filehandle.FileHandleManagerImpl.flush(FileHandleManagerImpl.java:269)
> at
> org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.flush(FileWriteAheadLogManager.java:934)
> at
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.tailPointer(GridCacheDatabaseSharedManager.java:1968)
> at
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.startMemoryRestore(GridCacheDatabaseSharedManager.java:1908)
> at
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1299)
> at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2112)
> at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1758)
> at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1143)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:663)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:589)
> at org.apache.ignite.Ignition.start(Ignition.java:328){code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)