ApacheIgnite服务器节点(2.9.1),使用Java15引发异常启用持久性

az31mfrm  于 2021-07-15  发布在  Java
关注(0)|答案(1)|浏览(411)

例外情况:

[15:30:27,658][SEVERE][main][IgniteKernal] Exception during start processors, node will be stopped and close connections
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:450)
    at org.apache.ignite.internal.processors.cache.persistence.wal.filehandle.FileWriteHandleImpl.fsync(FileWriteHandleImpl.java:419)
    at org.apache.ignite.internal.processors.cache.persistence.wal.filehandle.FileHandleManagerImpl.flush(FileHandleManagerImpl.java:270)
    at org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.flush(FileWriteAheadLogManager.java:905)
    at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.tailPointer(GridCacheDatabaseSharedManager.java:2159)
    at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.startMemoryRestore(GridCacheDatabaseSharedManager.java:2087)
    at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1257)
    at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2052)
    at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1698)
    at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1114)
    at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:634)
    at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:560)
    at org.apache.ignite.Ignition.start(Ignition.java:328)

点火配置:

public static IgniteConfiguration createConfiguration() {

    IgniteConfiguration cfg = new IgniteConfiguration();

    // Enabling peer-class loading feature.
    cfg.setPeerClassLoadingEnabled(true);

    DataStorageConfiguration dataStorageCfg = new DataStorageConfiguration();
    // Setting Persistence Enabled true
    dataStorageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true);
    cfg.setDataStorageConfiguration(dataStorageCfg);

    return cfg;

  }

尽管Java8和Java11的相同配置运行良好。
在Java15中,persistenceenabled(false)也没有问题

4uqofj5v

4uqofj5v1#

ignite只在lts版本的java中测试过,即Java8和Java11。我会坚持那些版本。

相关问题