gpt4 book ai didi

java - 打开 HFT Chronicle Map,Websphere 上未找到类异常

转载 作者:太空宇宙 更新时间:2023-11-04 12:34:07 24 4
gpt4 key购买 nike

我正在尝试使用 OpenHFT ChronicleMap ,代码在 Tomcat 中运行,但在 Websphere 中失败,并出现以下错误(如下)

注意:这种情况在 Tomcat 中不会发生,仅在 Websphere 中发生。

代码:

private ChronicleMap<String,RepositoryItem> repositoryMap;

repositoryMap=
ChronicleMapBuilder
.of(String.class, RepositoryItem.class).averageKeySize(KEY_SAMPLE.getBytes("UTF-8").length)
.entries((long) (MAX_ENTRIES))
.averageValueSize(1600)
.create();

public void removeAllModified() {
// This removes all the modified data from the repository
Iterator iter=repositoryMap.values().iterator();
// build a list of all the objects in the repository except the removed items
while (iter.hasNext()){
RepositoryItem repoItem=(RepositoryItem)iter.next();
DataObject d = repoItem.getModified();
if (d != null) {
removeModified(repoItem);
}
}
}

谁能帮我解决这个错误。

SystemErr     R     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
[5/30/16 12:45:03:236 IST] 0000007a SystemErr R Caused by: java.lang.ClassNotFoundException: java.lang.AbstractStringBuilder
[5/30/16 12:45:03:236 IST] 0000007a SystemErr R at java.lang.Class.forName(Class.java:182)
[5/30/16 12:45:03:236 IST] 0000007a SystemErr R at net.openhft.lang.io.StringBuilderUtils.<clinit>(StringBuilderUtils.java:36)
[5/30/16 12:45:03:236 IST] 0000007a SystemErr R ... 81 more
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R java.lang.NoClassDefFoundError: net.openhft.lang.io.StringBuilderUtils (initialization failure)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at java.lang.J9VMInternals.initialize(J9VMInternals.java:176)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at net.openhft.lang.io.NativeBytes.readUTF1(NativeBytes.java:173)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at net.openhft.lang.io.NativeBytes.readUTF0(NativeBytes.java:164)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at net.openhft.chronicle.hash.serialization.internal.CharSequenceReader.read(CharSequenceReader.java:67)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at net.openhft.chronicle.hash.serialization.internal.CharSequenceReader.read(CharSequenceReader.java:31)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at net.openhft.chronicle.map.VanillaChronicleMap$Segment.getEntry(VanillaChronicleMap.java:3042)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at net.openhft.chronicle.map.VanillaChronicleMap$EntryIterator.next(VanillaChronicleMap.java:3150)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at net.openhft.chronicle.map.VanillaChronicleMap$EntryIterator.next(VanillaChronicleMap.java:3097)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at java.util.AbstractMap$2$1.next(AbstractMap.java:396)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr R at com.csc.fs.om.ObjectRepositoryChronicleImpl.removeAllModified(ObjectRepositoryChronicleImpl.java:1335)

最佳答案

Chronicle Map 目前不支持运行 Websphere 的 IBM JVM。从您的消息中可以明显看出,Chronicle Map 2 在 IBM JVM 上失败,因为它偶尔会使用 OpenJDK/OracleJDK 中存在但 IBM JDK 中不存在的一些类。

Chronicle Map 3 可能不存在此问题,因此潜在的解决方案可能是升级到 Java 8 和 Chronicle Map 3。不过,这将是 Chronicle Map 3 的一个附带属性,并且它也可能在任何后续版本中停止与 IBM JVM 配合使用。

Chronicle 邮件列表中的相关讨论:https://groups.google.com/forum/#!topic/java-chronicle/cAHVQZLASaE

关于java - 打开 HFT Chronicle Map,Websphere 上未找到类异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37521408/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com