【问题标题】:JRebel: Attaching the agent at runtime?JRebel:在运行时附加代理?
【发布时间】:2021-09-21 00:50:13
【问题描述】:

我可以在运行时使用 ByteBuddyAgent (byte-buddy-agent) 成功附加许多其他代理,但由于某种原因 JRebel 失败了。

Caused by: com.sun.tools.attach.AgentLoadException: Failed to load agent library: _Agent_OnAttach@12 is not available in C:\JRebel\lib\jrebel64.dll
    at jdk.attach/sun.tools.attach.VirtualMachineImpl.execute(VirtualMachineImpl.java:126)
Caused by: com.sun.tools.attach.AgentLoadException: Failed to load agent library: _Agent_OnAttach@12 is not available in C:\JRebel\lib\jrebel64.dll

    at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:94)
    at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgentPath(HotSpotVirtualMachine.java:128)
    ... 11 more

有什么办法可以解决这个问题吗?因为我只想在我的程序中发生某些初始化步骤之后附加 JRebel。

【问题讨论】:

    标签: java byte-buddy javaagents jrebel


    【解决方案1】:

    我假设 Byte Buddy 加载了 JRebel 期望卸载的类。这可能是不可能的。与 JRebel 联系,看看他们是否可以提取更有用的错误消息来解决此问题。

    【讨论】:

      【解决方案2】:

      JRebel 代理无法在运行时附加,因为工具本身必须完成许多初始化过程。

      我能问一下为什么需要在某些初始化步骤之后附加 JRebel 代理吗?

      【讨论】:

      • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
      猜你喜欢
      • 2020-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-29
      • 1970-01-01
      • 2022-12-08
      • 2020-09-12
      • 2020-10-15
      相关资源
      最近更新 更多