java.lang.AbstractMethodError: Receiver class org.apache.logging.slf4j.SLF4JServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequestedApiVersion()' of interface org.slf4j.spi.SLF4JServiceProvider.
at org.slf4j.LoggerFactory.versionSanityCheck(LoggerFactory.java:297)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:141)
at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:421)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:407)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:356)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:382)
at org.eclipse.jetty.util.component.AbstractLifeCycle.<clinit>(AbstractLifeCycle.java:35)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at MoquiStart.main(MoquiStart.java:227)
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
The cause of this warning message is not something we can do much about right now. Jetty 10 uses SLF4J 2… which is fine except that while Jetty 10 is considered production ready SLF4J 2.0.0 is still in beta, and was in alpha when Jetty chose it. To complicate matters, there is no Log4J adapter for SLF4J 2, but the log4j-slf4j18-impl package mostly supports SJF4J 2 (it is really the version for SLF4J 1.8). The mostly supports is the key here, and this warning message is part of what is not supported.
Unless we go back to Jetty 9 or get involved upstream somehow, we just have to wait.
I looked into this today and was hoping that maybe sufficient updates were out to resolve it. SLF2J 2 is now out of beta and up to version 2.0.2 (and with 2 quick releases recently, issues or something). That is now updated in moqui-framework. Log4J also had a new version out, but the log4j-slf4j18-impl has not yet been updated, and even with the others updated the warning message on init is still there.
So, that’s where it is now… what it still comes down to is: just ignore the warning, this is one of those warning lights that will turn off by itself eventually.
Thanks David,
As of release 2.19.0 the log4j-slf4j18-impl module targetting the unreleased SLF4J 1.8.x series has been removed.
Log4j released two adapter from 2.19.0, we can use log4j-slf4j2-impl
Due to a break in compatibility in the SLF4J binding, as of release 2.19.0 two SLF4J to Log4j Adapters are provided.
- log4j-slf4j-impl should be used with SLF4J 1.7.x releases or older.
- log4j-slf4j2-impl should be used with SLF4J 2.0.x releases or newer.