//arthas trace 时命令行报错 [arthas@24580]$ trace com.mysql.jdbc.PreparedStatement execute Affect(class count: 1 , method count: 5) cost in 480 ms, listenerId: 8 Enhance error! exception: java.lang.UnsupportedOperationException: class redefinition failed: attempted to change superclass or interfaces error happens when enhancing class: class redefinition failed: attempted to change superclass or interfaces, check arthas log: /home/www/logs/arthas/arthas.log
//arthas 日志报错 2020-09-10 17:05:24 [arthas-command-execute] INFO c.t.arthas.core.advisor.Enhancer -enhance matched classes: [class com.mysql.jdbc.PreparedStatement, class com.mysql.jdbc.JDBC4PreparedStatement, class com.mysql.jdbc.CallableStatement, class com.mysql.jdbc.ServerPreparedStatement] 2020-09-10 17:05:24 [arthas-command-execute] ERROR c.t.arthas.core.advisor.Enhancer -Enhancer error, matchingClasses: [class com.mysql.jdbc.PreparedStatement, class com.mysql.jdbc.JDBC4PreparedStatement, class com.mysql.jdbc.CallableStatement, class com.mysql.jdbc.ServerPreparedStatement] java.lang.UnsupportedOperationException: class redefinition failed: attempted to change superclass or interfaces at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method) at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144) at com.taobao.arthas.core.advisor.Enhancer.enhance(Enhancer.java:368) at com.taobao.arthas.core.command.monitor200.EnhancerCommand.enhance(EnhancerCommand.java:149) at com.taobao.arthas.core.command.monitor200.EnhancerCommand.process(EnhancerCommand.java:96) at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82) at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18) at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111) at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108) at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:385) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)