alibaba/arthas · info · UnsupportedOperationException
groovy command is not supported yet!
Error message
groovy command is not supported yet!
What it means
Thrown as UnsupportedOperationException by GroovyScriptCommand.getClassNameMatcher. The GroovyScriptCommand class is a stub/placeholder: it declares the command surface (script filepath, regex flag, accessors) but every monitoring hook that would actually drive a groovy script throws 'not supported yet'. getClassNameMatcher is the matcher resolver overridden from the monitor base class; invoking it indicates the command was reached.
Source
Thrown at core/src/main/java/com/taobao/arthas/core/command/monitor200/GroovyScriptCommand.java:79
public String getClassPattern() {
return classPattern;
}
public String getMethodPattern() {
return methodPattern;
}
public String getScriptFilepath() {
return scriptFilepath;
}
public boolean isRegEx() {
return isRegEx;
}
@Override
protected Matcher getClassNameMatcher() {
throw new UnsupportedOperationException("groovy command is not supported yet!");
}
@Override
protected Matcher getClassNameExcludeMatcher() {
throw new UnsupportedOperationException("groovy command is not supported yet!");
}
@Override
protected Matcher getMethodNameMatcher() {
throw new UnsupportedOperationException("groovy command is not supported yet!");
}
@Override
protected AdviceListener getAdviceListener(CommandProcess process) {
throw new UnsupportedOperationException("groovy command is not supported yet!");
}
}
View on GitHub (pinned to 21cf2e9ba5)
Solutions
- Do not use the groovy command — it is not implemented; use a supported monitor/watch/trace command instead.
- If you need scripting, run scripts via an external mechanism against the target, not through this command.
- Remove references to GroovyScriptCommand from any command registry/wiring if it should not be exposed.
Example fix
// before GroovyScriptCommand cmd = ...; Matcher m = cmd.getClassNameMatcher(); // after // use the implemented watch/trace/monitor command instead of the stub
Defensive patterns
Strategy: fallback
Validate before calling
if (cmd instanceof GroovyScriptCommand) { // do not invoke getClassNameMatcher; route to watch/trace/monitor } Type guard
static boolean isImplementedCommand(Command c) { return !(c instanceof GroovyScriptCommand); } Try / catch
try { Matcher m = cmd.getClassNameMatcher(); } catch (UnsupportedOperationException e) { // use watch/trace/monitor instead } Prevention
- Treat the groovy command as unavailable.
- Filter GroovyScriptCommand out of any command menus/exposure.
- Document that scripting is not supported via this command.
When it happens
Trigger: Run a 'groovy' (monitor-style) command that triggers matcher resolution — e.g. the command lifecycle calls getClassNameMatcher() to compile the class-name pattern. The feature is unimplemented, so any real invocation fails.
Common situations: User or scripting layer invokes the groovy command expecting it to work; copy of a monitor command pattern adapted to groovy; leftover references to an experimental feature.
Related errors
AI-assisted analysis of alibaba/arthas@21cf2e9ba5 (2026-08-14).
Data as JSON: /api/errors/0ff6f68e96840b9b.
Report an issue: GitHub.