We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我在使用JavaAgent形式的时候,出现这个异常
Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401) Caused by: java.lang.IllegalStateException: TTL logger implementation type is already set! type = 0 at com.alibaba.ttl.threadpool.agent.internal.logging.Logger.setLoggerImplType(Logger.java:22) at com.alibaba.ttl.threadpool.agent.TtlAgent.premain(TtlAgent.java:129)
JVM配置如下: -Xmx3g -XX:+UseG1GC -XX:MaxGCPauseMillis=300 -javaagent:/opt/service/zhaopin_scf_zpjob/config/lib/transmittable-thread-local-2.14.0.jar
-Xmx3g -XX:+UseG1GC -XX:MaxGCPauseMillis=300 -javaagent:/opt/service/zhaopin_scf_zpjob/config/lib/transmittable-thread-local-2.14.0.jar
Maven依赖包:
<dependency> <groupId>com.alibaba</groupId> <artifactId>transmittable-thread-local</artifactId> <version>2.14.0</version> </dependency>
The text was updated successfully, but these errors were encountered:
...... Caused by: java.lang.IllegalStateException: TTL logger implementation type is already set! type = 0 ......
这是防御式检查所抛出的异常(IllegalStateException); 可能和你具体使用/配置方式相关。 @BenettChen
IllegalStateException
请提供一个 极简、可运行、复现问题的 代码Demo工程。
推荐提供成一个单独的工程(Github repo)。这样可以:
Sorry, something went wrong.
刚我也和中间件团队一起排查了这个问题,发现是:
就当一个问题记录吧,后面有人遇到这个异常,先考虑下自己的环境问题,多一个排查方向。
oldratlee
No branches or pull requests
我在使用JavaAgent形式的时候,出现这个异常
JVM配置如下:
-Xmx3g -XX:+UseG1GC -XX:MaxGCPauseMillis=300 -javaagent:/opt/service/zhaopin_scf_zpjob/config/lib/transmittable-thread-local-2.14.0.jar
Maven依赖包:
The text was updated successfully, but these errors were encountered: