1

我已将编年史记录器级别设置为跟踪如下

rootLogger.level=trace
rootLogger.appenderRefs=chronicle
rootLogger.appenderRef.stdout.ref=CHRONICLE1

导致以下错误

Exception in thread "main" java.lang.AbstractMethodError: Method net/openhft/chronicle/bytes/MappedBytesStore.tryReserve()Z is abstract
    at net.openhft.chronicle.bytes.MappedBytesStore.tryReserve(MappedBytesStore.java)
    at net.openhft.chronicle.bytes.MappedFile.acquireByteStore(MappedFile.java:273)
    at net.openhft.chronicle.bytes.MappedFile.acquireByteStore(MappedFile.java:254)
    at net.openhft.chronicle.bytes.MappedBytes.acquireNextByteStore0(MappedBytes.java:399)
    at net.openhft.chronicle.bytes.MappedBytes.acquireNextByteStore(MappedBytes.java:391)
    at net.openhft.chronicle.bytes.MappedBytes.readVolatileInt(MappedBytes.java:698)
    at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.writeHeader(SingleChronicleQueueExcerpts.java:392)
    at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.openContext(SingleChronicleQueueExcerpts.java:402)
    at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.writingDocument(SingleChronicleQueueExcerpts.java:366)
    at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.writingDocument(SingleChronicleQueueExcerpts.java:346)
    at net.openhft.chronicle.logger.DefaultChronicleLogWriter.write(DefaultChronicleLogWriter.java:85)
    at net.openhft.chronicle.logger.log4j2.ChronicleAppender.doAppend(ChronicleAppender.java:74)
    at net.openhft.chronicle.logger.log4j2.AbstractChronicleAppender.append(AbstractChronicleAppender.java:138)
    at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
    at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
    at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
    at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
    at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:448)
    at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:433)
    at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:417)
    at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:403)
    at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
    at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146)
    at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2170)
    at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2125)
    at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2108)
    at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2002)
    at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1974)
    at org.apache.logging.log4j.spi.AbstractLogger.trace(AbstractLogger.java:2302)
    at 
<my_class>.main(PropertyReaderTest.java:34)

但是当日志级别设置为 info 或 error 时该错误不可用

任何可能的原因

4

1 回答 1

1

这表明您有不兼容的库组合。

我建议您使用为 Chronicle-bom 2.17.173 发布的 Chronicle-Logger 4.17.2,您可以使用它来确保您导入了它所依赖的正确版本的库,或者您可以使用那里提到的版本

https://search.maven.org/artifact/net.openhft/chronicle-bom/2.17.173/pom

于 2019-04-02T21:11:34.320 回答