【问题标题】:jrebel with debug mode can't update class带调试模式的 jrebel 无法更新类
【发布时间】:2020-02-14 02:10:03
【问题描述】:

我用 jrebel 的调试模式启动了这个项目。当我更新类时,jrebel 抛出以下日志异常。尽管我没有对类进行任何更改,但我只是添加了一个空格。在启动模式下启动是正常的。

15:01:45,667 ERROR [STDERR] 2019-10-17 15:01:45 JRebel: ERROR Failed to transform class com/whir/rd/entryinvoice/actionsupport/InvoiceAction: java.lang.NoSuchMethodError: a
    at com.zeroturnaround.javarebel.flw.a(SourceFile:106)
    at com.zeroturnaround.javarebel.flw.doTransform(SourceFile:70)
    at com.zeroturnaround.javarebel.flw.transform(SourceFile:57)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.applyTransformation(SourceFile:78)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.transform(SourceFile:70)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClassesImpl(Native Method)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClasses(SourceFile:149)
    at com.zeroturnaround.javarebel.flv.a(SourceFile:106)
    at com.zeroturnaround.javarebel.fkr.a(SourceFile:704)
    at com.zeroturnaround.reload.al.d(SourceFile:588)
    at com.zeroturnaround.reload.al.b(SourceFile:532)
    at com.zeroturnaround.reload.al.a(SourceFile:74)
    at com.zeroturnaround.reload.ao.a(SourceFile:833)
    at com.zeroturnaround.reload.ao.a(SourceFile:749)
    at com.zeroturnaround.reload.al.a(SourceFile:475)
    at com.zeroturnaround.reload.b.m(SourceFile:513)
    at com.zeroturnaround.reload.b.l(SourceFile:286)
    at com.zeroturnaround.reload.b.k(SourceFile:57)
    at com.zeroturnaround.reload.c.run(SourceFile:124)
15:01:45,738 ERROR [STDERR] 2019-10-17 15:01:45 JRebel: ERROR com.whir.rd.entryinvoice.actionsupport.InvoiceAction: java.lang.UnsupportedOperationException: JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClassesImpl(Native Method)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClasses(SourceFile:149)
    at com.zeroturnaround.javarebel.flv.a(SourceFile:106)
    at com.zeroturnaround.javarebel.fkr.a(SourceFile:703)
    at com.zeroturnaround.reload.al.d(SourceFile:588)
    at com.zeroturnaround.reload.al.b(SourceFile:530)
    at com.zeroturnaround.reload.al.a(SourceFile:74)
    at com.zeroturnaround.reload.ao.a(SourceFile:833)
    at com.zeroturnaround.reload.ao.a(SourceFile:749)
    at com.zeroturnaround.reload.al.a(SourceFile:474)
    at com.zeroturnaround.reload.b.m(SourceFile:513)
    at com.zeroturnaround.reload.b.l(SourceFile:284)
    at com.zeroturnaround.reload.b.k(SourceFile:57)
    at com.zeroturnaround.reload.c.run(SourceFile:123)
15:01:45,740 ERROR [STDERR] 2019-10-17 15:01:45 JRebel: ERROR Failed to transform class com/opensymphony/xwork2/ActionSupport: java.lang.NoSuchMethodError: a
    at com.zeroturnaround.javarebel.flw.a(SourceFile:106)
    at com.zeroturnaround.javarebel.flw.doTransform(SourceFile:70)
    at com.zeroturnaround.javarebel.flw.transform(SourceFile:57)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.applyTransformation(SourceFile:78)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.transform(SourceFile:70)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClassesImpl(Native Method)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClasses(SourceFile:149)
    at com.zeroturnaround.javarebel.flv.a(SourceFile:106)
    at com.zeroturnaround.javarebel.fkr.a(SourceFile:704)
    at com.zeroturnaround.reload.al.d(SourceFile:588)
    at com.zeroturnaround.reload.al.b(SourceFile:532)
    at com.zeroturnaround.reload.al.a(SourceFile:74)
    at com.zeroturnaround.reload.ao.a(SourceFile:833)
    at com.zeroturnaround.reload.ao.a(SourceFile:749)
    at com.zeroturnaround.reload.al.a(SourceFile:475)
    at com.zeroturnaround.reload.b.m(SourceFile:513)
    at com.zeroturnaround.reload.b.l(SourceFile:286)
    at com.zeroturnaround.reload.b.k(SourceFile:57)
    at com.zeroturnaround.reload.c.run(SourceFile:124)
15:01:45,777 ERROR [STDERR] 2019-10-17 15:01:45 JRebel: ERROR com.opensymphony.xwork2.ActionSupport: java.lang.UnsupportedOperationException: JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClassesImpl(Native Method)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClasses(SourceFile:149)
    at com.zeroturnaround.javarebel.flv.a(SourceFile:106)
    at com.zeroturnaround.javarebel.fkr.a(SourceFile:703)
    at com.zeroturnaround.reload.al.d(SourceFile:588)
    at com.zeroturnaround.reload.al.b(SourceFile:530)
    at com.zeroturnaround.reload.al.a(SourceFile:74)
    at com.zeroturnaround.reload.ao.a(SourceFile:833)
    at com.zeroturnaround.reload.ao.a(SourceFile:749)
    at com.zeroturnaround.reload.al.a(SourceFile:474)
    at com.zeroturnaround.reload.b.m(SourceFile:513)
    at com.zeroturnaround.reload.b.l(SourceFile:284)
    at com.zeroturnaround.reload.b.k(SourceFile:57)
    at com.zeroturnaround.reload.c.run(SourceFile:123)
15:01:45,779 ERROR [STDERR] 2019-10-17 15:01:45 JRebel: ERROR Failed to transform class com/whir/component/actionsupport/BaseActionSupport: java.lang.NoSuchMethodError: a
    at com.zeroturnaround.javarebel.flw.a(SourceFile:106)
    at com.zeroturnaround.javarebel.flw.doTransform(SourceFile:70)
    at com.zeroturnaround.javarebel.flw.transform(SourceFile:57)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.applyTransformation(SourceFile:78)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.transform(SourceFile:70)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClassesImpl(Native Method)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClasses(SourceFile:149)
    at com.zeroturnaround.javarebel.flv.a(SourceFile:106)
    at com.zeroturnaround.javarebel.fkr.a(SourceFile:704)
    at com.zeroturnaround.reload.al.d(SourceFile:588)
    at com.zeroturnaround.reload.al.b(SourceFile:532)
    at com.zeroturnaround.reload.al.a(SourceFile:74)
    at com.zeroturnaround.reload.ao.a(SourceFile:833)
    at com.zeroturnaround.reload.ao.a(SourceFile:749)
    at com.zeroturnaround.reload.al.a(SourceFile:475)
    at com.zeroturnaround.reload.b.m(SourceFile:513)
    at com.zeroturnaround.reload.b.l(SourceFile:286)
    at com.zeroturnaround.reload.b.k(SourceFile:57)
    at com.zeroturnaround.reload.c.run(SourceFile:124)
15:01:45,788 ERROR [STDERR] 2019-10-17 15:01:45 JRebel: ERROR com.whir.component.actionsupport.BaseActionSupport: java.lang.UnsupportedOperationException: JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClassesImpl(Native Method)
    at com.zeroturnaround.reload.jvmti.MinimalInstrumentation.retransformClasses(SourceFile:149)
    at com.zeroturnaround.javarebel.flv.a(SourceFile:106)
    at com.zeroturnaround.javarebel.fkr.a(SourceFile:703)
    at com.zeroturnaround.reload.al.d(SourceFile:588)
    at com.zeroturnaround.reload.al.b(SourceFile:530)
    at com.zeroturnaround.reload.al.a(SourceFile:74)
    at com.zeroturnaround.reload.ao.a(SourceFile:833)
    at com.zeroturnaround.reload.ao.a(SourceFile:749)
    at com.zeroturnaround.reload.al.a(SourceFile:474)
    at com.zeroturnaround.reload.b.m(SourceFile:513)
    at com.zeroturnaround.reload.b.l(SourceFile:284)
    at com.zeroturnaround.reload.b.k(SourceFile:57)
    at com.zeroturnaround.reload.c.run(SourceFile:123)
15:01:45,847 INFO  [STDOUT] 2019-10-17 15:01:45 JRebel: Reloading class 'com.whir.rd.entryinvoice.actionsupport.InvoiceAction'.

这让我很困惑。 jrebel和debug模式有冲突吗?我用的是最新版的jrebel,虚拟机oracle jrockit 1.6

【问题讨论】:

    标签: java intellij-idea jrebel hot-reload


    【解决方案1】:

    是的,JRebel 应该使用这些调试选项。我不确定您为什么会收到这些错误。我需要查看这些日志以了解正在发生的事情。

    如果您想解决它,请将您的日志发送至 support@jrebel.com,我将非常乐意为您提供进一步帮助。

    【讨论】:

      【解决方案2】:

      我叫 Curtis Johnson,是 Perforce 的 JRebel 团队的一名工程师。这似乎是您的应用程序中的某种错误,可能与 JRebel 直接相关,也可能不相关。您最好与我们的支持团队合作解决此问题。如果您可以将 JRebel 日志 (instructions here) 发送到 support@jrebel.com,我们可以帮助您解决此问题。

      【讨论】:

      • 你好柯蒂斯,我检查了问题的原因。当我从命令行运行jrebel时,当我添加调试参数时,就会出现这个问题。如果调试参数去掉,就会恢复正常。参数如下:-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5007
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-12-05
      • 1970-01-01
      • 2023-03-29
      • 2023-03-21
      • 1970-01-01
      • 1970-01-01
      • 2018-05-14
      相关资源
      最近更新 更多