-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
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
Spring web war 包 classloader -t 命令打印输出不符合预期 #2926
Comments
这个应该是 tomcat 的 classloader#toString() 输出有多行,可能被截断了。试下把窗口变大点。 |
研究发现,Arthas 对 +-BootstrapClassLoader
+-sun.misc.Launcher$ExtClassLoader@91161c7
+-com.taobao.arthas.agent.ArthasClassloader@67690ffd
+-sun.misc.Launcher$AppClassLoader@18b4aac2
+-java.net.URLClassLoader@53d8d10a
+-ParallelWebappClassLoader
context: spring-boot-deployment-0.0.1-SNAPSHOT
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@53d8d10a
但是在 @Override
public String apply(String data) {
term.write(data);
return data;
} ParallelWebappClassLoader 刚好有 @Override
public String toString() {
StringBuilder sb = new StringBuilder(this.getClass().getSimpleName());
sb.append("\r\n context: ");
sb.append(getContextName());
sb.append("\r\n delegate: ");
sb.append(delegate);
sb.append("\r\n");
if (this.parent != null) {
sb.append("----------> Parent Classloader:\r\n");
sb.append(this.parent.toString());
sb.append("\r\n");
}
if (this.transformers.size() > 0) {
sb.append("----------> Class file transformers:\r\n");
for (ClassFileTransformer transformer : this.transformers) {
sb.append(transformer).append("\r\n");
}
}
return sb.toString();
} 现在考虑两种解决方式:1. classloader.toString() 的结果去除 |
RaymondLam1
pushed a commit
to RaymondLam1/arthas
that referenced
this issue
Oct 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
环境信息
arthas 4.0.0
重现问题的步骤
在 tomcat 运行 spring boot war 应用
https://github.com/RaymondLam1/spring-boot-war
期望的结果
正常输出 classloer tree
实际运行的结果
classloader -t 的树型输出可能有问题,缺少了 ParallelWebappClassLoader
The text was updated successfully, but these errors were encountered: