jiangML opened a new issue, #29743:
URL: https://github.com/apache/shardingsphere/issues/29743

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   master
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Agent + JDBC + Spring Boot(Fatjar)
    
   ### Expected behavior
   Can start
   ### Actual behavior
   Unable to start
   
   ```shell
   SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
   SLF4J: Defaulting to no-operation (NOP) logger implementation
   SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further 
details.
   Exception in thread "main" java.lang.reflect.InvocationTargetException
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at 
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
        at 
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
   Caused by: java.lang.NoClassDefFoundError: 
org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey
        at 
org.apache.shardingsphere.agent.core.ShardingSphereAgent.premain(ShardingSphereAgent.java:57)
        ... 6 more
   Caused by: java.lang.ClassNotFoundException: 
org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey
        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
        ... 7 more
   *** java.lang.instrument ASSERTION FAILED ***: "result" with message agent 
load/premain call failed at 
open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
   FATAL ERROR in native method: processing of -javaagent failed, 
processJavaStart failed
   [1]    76954 abort      java  -jar spring-boot-shardingsphere-jdbc-test.jar
   ```
   
   ```shell
   Exception in thread "main" java.lang.reflect.InvocationTargetException
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at 
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
        at 
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
   Caused by: java.lang.NoClassDefFoundError: 
org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey
        at 
org.apache.shardingsphere.agent.core.ShardingSphereAgent.premain(ShardingSphereAgent.java:57)
        ... 6 more
   Caused by: java.lang.ClassNotFoundException: 
org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey
        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
        ... 7 more
   *** java.lang.instrument ASSERTION FAILED ***: "result" with message agent 
load/premain call failed at 
open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
   FATAL ERROR in native method: processing of -javaagent failed, 
processJavaStart failed
   [1]    81619 abort      java  -jar spring-boot-shardingsphere-jdbc-test.jar
   ```
   
   ### Reason analyze (If you can)
   
   After Spring Boot is packaged, a custom class loader will load the class and 
start it. The corresponding dependencies cannot be relied on in the Agent.
   
   #### Task
   - [ ] Agent Core uses jdk native log output instead of slf4j and logback.
   - [ ] Remove the dependency on shardingsphere in Agent Core, and move the 
judgment of whether to enable the plugin to each advice.
   
   
   ### 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]

Reply via email to