IDEA使用插件JRebel热部署失败的问题排查
程序员文章站
2022-04-23 11:19:45
...
关于 IDEA 如何使用JRebel进行热部署的问题,可以参考我的另外一篇博客多个 tomcat 应用热部署调试环境搭建。
此处直接抛出使用中遇到的问题:
Mac 笔记本受不了,嗡嗡嗡地叫着,如上图所示。点击查看详情:
原来是JRebel热部署插件失效。
为什么失败?点击 IDEA 右下角的感叹号:
查看失败的具体原因。
详细的错误堆栈信息:
com.sun.jdi.IncompatibleThreadStateException
java.lang.RuntimeException: com.sun.jdi.IncompatibleThreadStateException
at com.zeroturnaround.jdi.util.DebuggerIntegration.classForName(DebuggerIntegration.java:806)
at com.zeroturnaround.jdi.util.DebuggerIntegration.createArray(DebuggerIntegration.java:771)
at com.zeroturnaround.jdi.util.DebuggerIntegration._boxArguments(DebuggerIntegration.java:522)
at com.zeroturnaround.jdi.util.DebuggerIntegration.invokeMethod(DebuggerIntegration.java:512)
at com.zeroturnaround.jdi.JRObjectReference$1.invoke(JRObjectReference.java:169)
at com.zeroturnaround.jdi.util.JRWrappedCall.invoke(JRWrappedCall.java:52)
at com.zeroturnaround.jdi.JRObjectReference.invokeMethod(JRObjectReference.java:175)
at com.sun.tools.jdi.ObjectReferenceImpl$$$jr.invokeMethod(<generated>:60000)
at com.intellij.debugger.engine.DebugProcessImpl$3.invokeMethod(DebugProcessImpl.java:1162)
at com.intellij.debugger.engine.DebugProcessImpl$InvokeCommand.a(DebugProcessImpl.java:1091)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.startLongProcessAndFork(DebuggerManagerThreadImpl.java:187)
at com.intellij.debugger.engine.DebugProcessImpl$InvokeCommand.a(DebugProcessImpl.java:1023)
at com.intellij.debugger.engine.DebugProcessImpl$InvokeCommand.startInternal(DebugProcessImpl.java:989)
at com.intellij.debugger.engine.DebugProcessImpl$InvokeCommand.start(DebugProcessImpl.java:930)
at com.intellij.debugger.engine.DebugProcessImpl.invokeInstanceMethod(DebugProcessImpl.java:1164)
at com.intellij.debugger.engine.DebuggerUtils.getValueAsString(DebuggerUtils.java:123)
at com.intellij.debugger.ui.tree.render.ToStringCommand.action(ToStringCommand.java:39)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl$3.contextAction(DebuggerManagerThreadImpl.java:218)
at com.intellij.debugger.engine.events.SuspendContextCommandImpl.contextAction(SuspendContextCommandImpl.java:48)
at com.intellij.debugger.engine.events.SuspendContextCommandImpl.action(SuspendContextCommandImpl.java:73)
at com.intellij.debugger.engine.events.DebuggerCommandImpl.run(DebuggerCommandImpl.java:47)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:147)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:43)
at com.intellij.debugger.impl.InvokeThread.a(InvokeThread.java:155)
at com.intellij.debugger.impl.InvokeThread.access$100(InvokeThread.java:32)
at com.intellij.debugger.impl.InvokeThread$WorkerThreadRequest.run(InvokeThread.java:61)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:330)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
Caused by: com.sun.jdi.IncompatibleThreadStateException
at com.sun.tools.jdi.InvokableTypeImpl.invokeMethod(InvokableTypeImpl.java:116)
at com.zeroturnaround.jdi.util.DebuggerIntegration.classForName(DebuggerIntegration.java:802)
... 31 more
热部署失败的一个极大的问题,就是不能断点调试;需要频繁重启应用;
网上查到的唯一一篇资料来自官网的论坛:
zeroturnaround-forums
不明所以。
问题还没有得到根本的解决。
暂时的解决方法是重启应用。
上一篇: Idea插件Jrebel热部署