Websphere在运行时工作但在调试时失败

时间:2014-08-11 13:29:42

标签: java intellij-idea websphere

我正在使用Intellij和WebSphere 8.当我在IDE中运行时,服务器正常工作。但是,当我尝试在调试模式下运行它时,它失败并出现以下错误:

C:\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\generated_websphere_server_start_script.cmd
C:\IBM\WebSphere\AppServer\java\bin\java -Dfile.encoding=windows-1252 -classpath "C:\IBM\WebSphere\AppServer\runtimes\com.ibm.ws.admin.client_8.5.0.jar;C:\IBM\WebSphere\AppServer\plugins\com.ibm.ws.security.crypto.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1.3\plugins\webSphereIntegration\lib\webSphereIntegration.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1.3\plugins\JavaEE\lib\javaee-impl.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1.3\lib\openapi.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1.3\plugins\webSphereIntegration\lib\specifics\webSphereClientImpl.jar" com.intellij.javaee.oss.process.JavaeeProcess 62847 com.intellij.j2ee.webSphere.agent.WebSphereAgent
Error: JDWP agent already loaded - please check java command line options
[2014-08-11 01:58:59,248] Artifact x.ear: Server is not connected. Deploy is not available.
JVMJ9TI064E Agent initialization function Agent_OnLoad failed for library jdwp, return code -1
Detected server admin port: 8880
JVMJ9VM015W Initialization error for library j9jvmti26(-3): JVMJ9VM009E J9VMDllMain failed
Detected server http port: 9080
Disconnected from server

我几乎尝试了所有我不知道问题是什么。我确实谷歌几个小时没有运气。

有谁知道这一切是什么以及如何解决?

这是我的服务器配置: first second

3 个答案:

答案 0 :(得分:12)

解决方案1 取消选中Pass环境变量复选框,然后以调试模式重新启动服务器。它应该正常工作。

运行 - >编辑配置 - > websphere服务器 - >启动/连接选项卡 选择debug,您将看到Pass环境变量复选框。它需要取消选中才能使调试工作。

解决方案2 如果websphere的调试模式在eclipse中工作而不在intellij中工作,我发现调试serverice在websphere已经启动并且intellij再次尝试启动debggin服务。所以从websphere控制台(服务器>服务器类型> WebSphere应用程序服务器> [serverName]>调试服务)停止服务,并且intellij中的所有默认配置都应该有效。

答案 1 :(得分:0)

相当古老,但我也能体验到!

他们现在会尝试解决此问题:https://youtrack.jetbrains.com/issue/IDEA-193580

答案 2 :(得分:0)

我有同样的问题。终于我明白了。希望此解决方案有帮助。我正在使用Intellij idea 2019.1.3 ..和WebSphere 8.5.5.13

  • 检查WebSphere启动服务器脚本,找到调试环境变量名称(在我的脚本中(WebSphere \ AppServer \ bin \ startServer.bat)) WAS_DEBUG
  • 将相同的调试选项名称添加到智能IDEA
  • 运行调试配置环境选项卡。

default debug env name env passed args

由于默认的环境变量是调试变量,因此无法覆盖

  • 检查传递环境变量

  • 像我一样添加WAS_DEBUG选项

  • ,或者您可以在服务器startup.bat脚本中将WAS_DEBUG更新为DEBUG(与IntelliJ中的默认值相同)。

    两者都应该起作用。

enter image description here