如何在调试模式下启动JBOSS 7?

问题描述 投票:0回答:3

当我在 JBOSS 7 中部署应用程序时,出现错误(JBAS014750)。因此我需要在调试模式下运行它以找到确切的问题。任何帮助将不胜感激。

jboss7.x
3个回答
39
投票

如果你看一下

bin/standalone.sh
你会发现

# Use --debug to activate debug mode with an optional argument to specify the port.
# Usage : standalone.bat --debug
#         standalone.bat --debug 9797

因此,接下来,只需使用

--debug <port>
参数运行脚本即可。


22
投票

像这样编辑文件

<jboss-root>/bin/standalone.conf

取消注释该行

JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=4242,server=y,suspend=n"

然后使用standalone.sh启动服务器。

现在您可以将调试器与您最喜欢的 IDE 分离。 如果您使用的是 Eclipse,您可以切换到“调试配置”并添加新的远程 Java 应用程序。

如果服务器使用上面设置的

JAVA_OPTS
启动,您就可以使用 IDE 进行调试。


3
投票

如果您使用命令行,请按照此处的指南进行操作。

如何在调试中启动As7

如果使用 eclipse,右键单击服务器并选择调试以在调试配置文件中启动服务器。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.