Log level set to "TRACE" for chronicle-logger causes AbstractMethodError

161 views Asked by At

I have set chronicle logger level to trace as below

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

Which causes below error

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)

But the error is not available when log level set to info or error

Any possible reason

1

There are 1 answers

1
Peter Lawrey On BEST ANSWER

This indicates you have an incompatible combination of libraries.

I suggest you use Chronicle-Logger 4.17.2 which was released for chronicle-bom 2.17.173 which you can use to ensure you have imported the right versions of libraries it depends on or you can use the versions mentioned there

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