You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTTP Api return Sever Error for stack command, InaccessibleObjectException: accessible: module java.base does not "opens java.lang" to unnamed module
#2151
Closed
1 task done
ayoubeddafali opened this issue
Apr 15, 2022
· 3 comments
I have searched the issues of this repository and believe that this is not a duplicate.
Environment
Arthas version: 3.6.0
Operating System version: Ubuntu 18.04
Java version of target JVM: openjdk version 17
Java version of JVM used to attach: openjdk version 17
Steps to reproduce this issue
attach arthas to a running jvm , and export 8563 port .
http api async_exec action with the following command "stack -n 1 *JsonSanitizer sanitizeString"
Expected Result
I expect to get the stack trace, like this one when running interactively :
Affect(class count: 1 , method count: 1) cost in 240 ms, listenerId: 21
Condition express: null , result: true
ts=2022-04-15 10:54:09;thread_name=http-nio-8080-exec-5;id=18;is_daemon=true;priority=5;TCCL=org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader@180da663
@com.google.json.JsonSanitizer.sanitizeString()
at com.google.json.JsonSanitizer.sanitize(JsonSanitizer.java:237)
at com.google.json.JsonSanitizer.sanitize(JsonSanitizer.java:122)
at com.google.json.JsonSanitizer.sanitize(JsonSanitizer.java:109)
Actual Result
Server Error
If there is an exception, please attach the exception trace:
In arthas.log there is this exception
http request error: /api
com.alibaba.arthas.deps.com.alibaba.fastjson.JSONException: write javaBean error, fastjson version 1.2.75, class com.taobao.arthas.core.shell.term.impl.http.api.ApiResponse, write javaBean error, fastjson version 1.2.75, class com.taobao.arthas.core.command.model.StackModel, fieldName : 0, Unable to make field private java.lang.String java.lang.StackTraceElement.fileName accessible: module java.base does not "opens java.lang" to unnamed module @6145930e
at com.alibaba.arthas.deps.com.alibaba.fastjson.serializer.JavaBeanSerializer.write(JavaBeanSerializer.java:539)
at com.alibaba.arthas.deps.com.alibaba.fastjson.serializer.JavaBeanSerializer.write(JavaBeanSerializer.java:149)
at com.alibaba.arthas.deps.com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:312)
at com.alibaba.arthas.deps.com.alibaba.fastjson.JSON.writeJSONString(JSON.java:1002)
at com.alibaba.arthas.deps.com.alibaba.fastjson.JSON.writeJSONString(JSON.java:954)
at com.alibaba.arthas.deps.com.alibaba.fastjson.JSON.writeJSONString(JSON.java:944)
at com.taobao.arthas.core.shell.term.impl.http.api.HttpApiHandler.writeResult(HttpApiHandler.java:177)
at com.taobao.arthas.core.shell.term.impl.http.api.HttpApiHandler.handle(HttpApiHandler.java:137)
at com.taobao.arthas.core.shell.term.impl.http.HttpRequestHandler.channelRead0(HttpRequestHandler.java:80)
at com.taobao.arthas.core.shell.term.impl.http.HttpRequestHandler.channelRead0(HttpRequestHandler.java:39)
at com.alibaba.arthas.deps.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
The text was updated successfully, but these errors were encountered:
When using jdk 17, this JVM option --add-opens java.base/java.lang=ALL-UNNAMED is required in many scenarios.
The next version will try to fix the fastjson problem.
hengyunabc
changed the title
HTTP Api return Sever Error for stack command
HTTP Api return Sever Error for stack command, InaccessibleObjectException: accessible: module java.base does not "opens java.lang" to unnamed module
Apr 18, 2022
Environment
Steps to reproduce this issue
Expected Result
I expect to get the stack trace, like this one when running interactively :
Actual Result
Server Error
If there is an exception, please attach the exception trace:
In arthas.log there is this exception
The text was updated successfully, but these errors were encountered: