LetheTan opened a new issue, #28042:
URL: https://github.com/apache/shardingsphere/issues/28042
## Bug Report
### Which version of ShardingSphere did you use?
5.4.0
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Actual behavior
```java
09:53:07,543 |-INFO in
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.action.AppenderAction
- About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:53:07,546 |-ERROR in
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.action.AppenderAction
- Could not create an Appender of type [ch.qos.logback.core.ConsoleAppender].
org.apache.shardingsphere.shade.ch.qos.logback.core.util.IncompatibleClassException
at
org.apache.shardingsphere.shade.ch.qos.logback.core.util.IncompatibleClassException
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:57)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:44)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:33)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.action.AppenderAction.begin(AppenderAction.java:52)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
at at
org.apache.shardingsphere.shade.ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:64)
at at
org.apache.shardingsphere.shade.ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:134)
at at
org.apache.shardingsphere.shade.org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at at
org.apache.shardingsphere.shade.org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at at
org.apache.shardingsphere.shade.org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at at
org.apache.shardingsphere.shade.org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at at
org.apache.shardingsphere.shade.org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at at
org.apache.shardingsphere.shade.org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at at
org.apache.shardingsphere.agent.core.log.AgentLoggerFactory.lambda$getAgentLogger$0(AgentLoggerFactory.java:53)
at at
java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at at
org.apache.shardingsphere.agent.core.log.AgentLoggerFactory.getAgentLogger(AgentLoggerFactory.java:53)
at at
org.apache.shardingsphere.agent.core.log.AgentLoggerFactory.getAgentLogger(AgentLoggerFactory.java:43)
at at
org.apache.shardingsphere.agent.core.plugin.jar.PluginJarLoader.<clinit>(PluginJarLoader.java:43)
at at
org.apache.shardingsphere.agent.core.ShardingSphereAgent.premain(ShardingSphereAgent.java:55)
at at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at at
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
at at
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
09:53:07,546 |-ERROR in
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.Interpreter@19:74
- ActionException in Action for tag [appender]
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.ActionException:
org.apache.shardingsphere.shade.ch.qos.logback.core.util.IncompatibleClassException
at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.ActionException:
org.apache.shardingsphere.shade.ch.qos.logback.core.util.IncompatibleClassException
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.action.AppenderAction.begin(AppenderAction.java:76)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
at at
org.apache.shardingsphere.shade.ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:64)
at at
org.apache.shardingsphere.shade.ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:134)
at at
org.apache.shardingsphere.shade.org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at at
org.apache.shardingsphere.shade.org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at at
org.apache.shardingsphere.shade.org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at at
org.apache.shardingsphere.shade.org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at at
org.apache.shardingsphere.shade.org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at at
org.apache.shardingsphere.shade.org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at at
org.apache.shardingsphere.agent.core.log.AgentLoggerFactory.lambda$getAgentLogger$0(AgentLoggerFactory.java:53)
at at
java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at at
org.apache.shardingsphere.agent.core.log.AgentLoggerFactory.getAgentLogger(AgentLoggerFactory.java:53)
at at
org.apache.shardingsphere.agent.core.log.AgentLoggerFactory.getAgentLogger(AgentLoggerFactory.java:43)
at at
org.apache.shardingsphere.agent.core.plugin.jar.PluginJarLoader.<clinit>(PluginJarLoader.java:43)
at at
org.apache.shardingsphere.agent.core.ShardingSphereAgent.premain(ShardingSphereAgent.java:55)
at at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at at
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
at at
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
Caused by:
org.apache.shardingsphere.shade.ch.qos.logback.core.util.IncompatibleClassException
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:57)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:44)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:33)
at at
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.action.AppenderAction.begin(AppenderAction.java:52)
at ... 28 common frames omitted
09:53:07,550 |-INFO in
org.apache.shardingsphere.shade.ch.qos.logback.classic.joran.action.LoggerAction
- Setting level of logger [org.apache.shardingsphere] to INFO
09:53:07,550 |-INFO in
org.apache.shardingsphere.shade.ch.qos.logback.classic.joran.action.LoggerAction
- Setting additivity of logger [org.apache.shardingsphere] to false
09:53:07,550 |-ERROR in
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.action.AppenderRefAction
- Could not find an appender named [console]. Did you define it below instead
of above in the configuration file?
09:53:07,550 |-ERROR in
org.apache.shardingsphere.shade.ch.qos.logback.core.joran.action.AppenderRefAction
- See http://logback.qos.ch/codes.html#appender_order for more details.
```
### Reason analyze (If you can)
shardingsphere-agent-core model change the package ch.qos.logback to
org.apache.shardingsphere.shade.ch.qos.logback
when initialization a Appender,it will call the
ch.qos.logback.core.util.OptionHelper#instantiateByClassName method
className is org.apache.shardingsphere.shade.ch.qos.logback,superClass is
ch.qos.logback.core.Appender
```java
if (!superClass.isAssignableFrom(classObj)) {
throw new IncompatibleClassException(superClass, classObj);
}
```
ch.qos.logback.core.util.OptionHelper#instantiateByClassNameAndParameter
will throw the IncompatibleClassException



### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
### Example codes for reproduce this issue (such as a github link).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]