IDEA使用插件JRebel热部署失败的问题排查

概述

关于 IDEA 如何使用JRebel进行热部署的问题,可以参考我的另外一篇博客多个 tomcat 应用热部署调试环境搭建
此处直接抛出使用中遇到的问题:
这里写图片描述
Mac/Windows笔记本受不了,嗡嗡嗡地叫着,如上图所示。点击查看详情:
这里写图片描述
原来是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
不明所以。
问题还没有得到根本的解决。
暂时的解决方法是重启应用。

2019年5月9日 23:19:58更新:
升级版本可以解决很多工具的问题,经试用:IDEA 2018.3.6 + JR v2019.1.1,没有这个问题。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

johnny233

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值