java - 使用 Java 15 启用持久性的 Apache Ignite 服务器节点(2.9.1)抛出异常
问题描述
例外:
[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;
}
尽管与 Java 8 和 11 相同的配置运行良好。
Java 15 中的PersistenceEnabled(false)也没有问题
解决方案
Ignite 仅在 Java 的 LTS 版本(即 Java 8 和 11)上进行了真正的测试。我会坚持使用这些版本。
推荐阅读
- reactjs - 在 React 应用程序中关闭选项卡后用户注销
- c# - dotnet 4.5 上的 Microsoft MVC 4 中是否有控制 JSON 消息复杂性的设置
- python - 使用 python 将数据从 SharePoint 导出到 Tableau
- python - Python Sympy 解决返回列表与字典
- git - 即使使用 Git restore 在 Git 中恢复文件后,Git Restore 文件也会被删除的问题
- laravel - 如何使用 Laravel MiddleWare 处理 Route 中的域和子域
- discord.py - discord.py 加入服务器(重写)
- javascript - 在 getmdl-select 中查找已选择的行
- python - xlwings - 获取现有图表的数据范围
- sql - 我想我需要一个 SQL 循环来计算