terrymanu commented on issue #24044:
URL: 
https://github.com/apache/shardingsphere/issues/24044#issuecomment-3632976915

   ##  Understanding
   
     - Issue 24044 reports that ShardingSphere-JDBC throws 
ClassNotFoundException at startup when logback is not on the classpath, 
effectively forcing a logback binding and violating the usual practice where 
JDBC depends only on SLF4J API and the application picks the logging 
implementation.
   
   ##  Root Cause
   
     - The MetaDataContexts class in mode/core directly used logback APIs 
(ch.qos.logback.classic.LoggerContext, etc.) to refresh the root log level. 
This class is loaded in JDBC as well, so without logback on the classpath the 
class load fails.
   
   ##  Analysis
   
     - The choice of logging implementation should be left to the application; 
Proxy bundles logback, but JDBC should not hard-require it.
     - Putting logback-specific log-level refresh logic in a shared core module 
crossed module boundaries and forced JDBC to require logback-classic at runtime.
     - The current master rewrote MetaDataContexts as a pure metadata context 
wrapper with no logback references, indicating the hard dependency has been 
removed.
   
   ##  Conclusion
   
     - This was a real bug caused by a core module referencing logback-specific 
APIs.
     - The current master has removed that hard dependency; based on the latest 
code, the issue is already fixed.


-- 
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]

Reply via email to