Websphere liberty Can';t在调试模式下启动Liberty server-“;代理库无法初始化:jdwp";

Websphere liberty Can';t在调试模式下启动Liberty server-“;代理库无法初始化:jdwp";,websphere-liberty,Websphere Liberty,当我尝试通过以下方式以调试模式启动WebSphere Liberty server(以连接Eclipse Java调试器)时: $。/wlp/bin/server调试MyServer 我得到以下错误: Error occurred during initialization of VM agent library failed to init: jdwp ERROR: Cannot load this JVM TI agent twice, check your java command lin

当我尝试通过以下方式以调试模式启动WebSphere Liberty server(以连接Eclipse Java调试器)时:

$。/wlp/bin/server调试MyServer

我得到以下错误:

Error occurred during initialization of VM
agent library failed to init: jdwp
ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.
而且服务器没有启动

options内容可能与“debug”子命令冲突 如果jvm.options文件已经包含启用调试器的选项,则使用

liberty start

子命令而不是:

liberty调试

例如,在我的情况下,我的服务器有文件../usr/servers/MyServer/jvm。选项和内容:

#Generated by liberty-maven-plugin
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=7777
因此,这些选项与debug子命令触发的选项冲突

或 您可以删除jvm.options内容或文件,并改用debug子命令


注意:阅读此解释后,错误信息变得清晰,但如果没有人想到这就是解决方案,此问答有望有所帮助。

在jvm.options中,请放置以下条目:

-Dwas.debug.mode=true
-Dcom.ibm.websphere.ras.inject.at.transform=true
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=7777