alibaba / alibaba/arthas

我已经指定了类加载器,还是报错java.lang.ClassNotFoundException

Open
#2,829 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
37.5k
Forks
7.6k
Avg merge
1d 22h
Merged PRs (30d)
4

Description

[arthas@369]$ sc -d com.alibaba.fastjson.JSONObject
class-info com.alibaba.fastjson.JSONObject
code-source /acs/code/BOOT-INF/lib/fastjson-1.2.83.jar
name com.alibaba.fastjson.JSONObject
isInterface false
isAnnotation false
isEnum false
isAnonymousClass false
isArray false
isLocalClass false
isMemberClass false
isPrimitive false
isSynthetic false
simple-name JSONObject
modifier public
annotation
interfaces java.util.Map,java.lang.Cloneable,java.io.Serializable,java.lang.reflect.InvocationHandler
super-class +-com.alibaba.fastjson.JSON
+-java.lang.Object
class-loader +-org.springframework.boot.loader.LaunchedURLClassLoader@21b8d17c
+-sun.misc.Launcher$AppClassLoader@18b4aac2
+-sun.misc.Launcher$ExtClassLoader@2908e0d8
classLoaderHash 21b8d17c

Affect(row-cnt:1) cost in 32 ms.
[arthas@369]$ vmtool -x 3 -c 21b8d17c --action getInstances --className com.raycloud.zdmarketing.urge.reactor.impl.AbstractProcessor --express 'instances[1].dispose(@com.alibaba.fastjson.JSONObject@parseObject("{\"type\":\"WAIT_BUYER_PAY\",\"appId\":100005224,\"tid\":\"240508-041780582041760\",\"userNick\":\"4532586208\",\"putTime\":1715139035536,\"content\":null}"))'
Failed to execute ognl, exception message: ognl.MethodFailedException: Method "parseObject" failed for object com.alibaba.fastjson.JSONObject [java.lang.ClassNotFoundException: Unable to resolve class: com.alibaba.fastjson.JSONObject], please check $HOME/logs/arthas/arthas.log for more details.
[arthas@369]$

Contributor guide

Open the contributing guide

Research direction

Start with the reported vmtool getInstances command and its OGNL expression, then inspect the class-loader resolution path and the referenced $HOME/logs/arthas/arthas.log. Reproduce the ClassNotFoundException using the shown classLoaderHash; done means explaining whether that loader is applied to OGNL resolution and documenting or fixing the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.