You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by orpheusx December 14, 2024 @ceki I used the online generator to convert my logback.xml file to a TylerConfigurator class. It did not declare the class public and thus, it seems, didn't work. The stack trace looks like this:
Exception in thread "main" java.util.ServiceConfigurationError: ch.qos.logback.classic.spi.Configurator: com.enoughisasgoodasafeast.TylerConfigurator Unable to get public no-arg constructor
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582)
at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:675)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1236)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1269)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1305)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1387)
at ch.qos.logback.classic.util.ClassicEnvUtil.loadFromServiceLoader(ClassicEnvUtil.java:50)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:84)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:66)
at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:52)
at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:41)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:199)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:186)
at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:496)
at org.slf4j.MDC.<clinit>(MDC.java:92)
at com.enoughisasgoodasafeast.WebService.<clinit>(WebService.java:13)
Caused by: java.lang.NoSuchMethodException: com.enoughisasgoodasafeast.TylerConfigurator.<init>()
at java.base/java.lang.Class.getConstructor0(Class.java:3833)
at java.base/java.lang.Class.getConstructor(Class.java:2501)
at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:662)
at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:659)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:670)
... 14 more
I tried a few things to get past this before editing the generated com.enoughisasgoodasafeast.TylerConfigurator to make it a public class. This resolved the problem. The README only mentions setting up a provider-configuration for the service-provider mechanism. Is there any other configuration or library that needs to be done to enable the XML-less logging setup?
The text was updated successfully, but these errors were encountered:
Discussed in #5
Originally posted by orpheusx December 14, 2024
@ceki I used the online generator to convert my logback.xml file to a TylerConfigurator class. It did not declare the class public and thus, it seems, didn't work. The stack trace looks like this:
I tried a few things to get past this before editing the generated com.enoughisasgoodasafeast.TylerConfigurator to make it a public class. This resolved the problem. The README only mentions setting up a provider-configuration for the service-provider mechanism. Is there any other configuration or library that needs to be done to enable the XML-less logging setup?
The text was updated successfully, but these errors were encountered: