WebSphere 8.5 Debug mode
Answered
Hello,
I have been trying, unsuccessfully, to run my local instance of WebSphere in debug mode from IntelliJ.
I have the same setup in Eclipse and I have no problems with it.
Starting the server (w/o debug mode) works just fine, but the debug mode gives me the following error:

This is the content of the startServer.log:
************ Start Display Current Environment ************
Host Operating System is Windows 7, version 6.1
Java version = 1.8.0, Java Runtime Version = pwa6480sr3fp20ifx-20161110_01 (SR3 FP20+IV90630+IV90578), Java Compiler = j9jit28, Java VM name = IBM J9 VM
was.install.root = C:\IBM\WebSphere\AppServer
user.install.root = C:\IBM\WebSphere\AppServer\profiles\AppSrv03
Java Home = C:\IBM\WebSphere\AppServer\java\jre
ws.ext.dirs = C:\\IBM\\WebSphere\\AppServer\\java\\lib;C:\\IBM\\WebSphere\\AppServer\\classes;C:\\IBM\\WebSphere\\AppServer\\lib;C:\\IBM\\WebSphere\\AppServer\\installedChannels;C:\\IBM\\WebSphere\\AppServer\\lib\\ext;C:\\IBM\\WebSphere\\AppServer\\web\\help;C:\\IBM\\WebSphere\\AppServer\\deploytool\\itp\\plugins\\com.ibm.etools.ejbdeploy\\runtime
Classpath = C:\IBM\WebSphere\AppServer\profiles\AppSrv03\properties;C:\IBM\WebSphere\AppServer\properties;C:\IBM\WebSphere\AppServer\lib\startup.jar;C:\IBM\WebSphere\AppServer\lib\bootstrap.jar;C:\IBM\WebSphere\AppServer\java\lib\tools.jar;C:\IBM\WebSphere\AppServer/lib/lmproxy.jar;C:\IBM\WebSphere\AppServer/lib/urlprotocols.jar
Java Library path = C:\IBM\WebSphere\AppServer\java\jre\bin\compressedrefs;C:\IBM\WebSphere\AppServer\java\jre\bin;C:\Windows\system32;C:\Windows;C:\IBM\WebSphere\AppServer\lib\native\win\x86_64;C:\IBM\WebSphere\AppServer\bin;C:\IBM\WebSphere\AppServer\java\bin;C:\IBM\WebSphere\AppServer\java\jre\bin;C:\Program Files (x86)\Serena\Dimensions 12.2\CM\prog64\;C:\Program Files (x86)\Serena\Dimensions 12.2\CM\prog64;C:\Program Files (x86)\Serena\Dimensions 12.2\CM\prog;C:\ProgramData\Oracle\Java\javapath;C:\AWDWin\Custom\ros;C:\AWDWin\Custom\iwserver;C:\AWDWin\Custom\iw;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\PROGRA~2\IBM\SQLLIB\BIN;C:\PROGRA~2\IBM\SQLLIB\FUNCTION;C:\Program Files (x86)\MQSeries\bin;C:\Program Files (x86)\MQSeries\tools\c\samples\bin;C:\Program Files (x86)\MQSeries\Java\lib;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\nodejs\;C:\Gradle\bin;C:\PROGRA~2\Groovy\GROOVY~1.15\bin;C:\Users\A2F\Apache\maven\bin;C:\Users\A2F\AppData\Local\Programs\Git\cmd;C:\Ruby24-x64\bin;C:\Users\A2F\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\A2F\AppData\Local\Programs\Python\Python36\;C:\Users\A2F\AppData\Local\Programs\Python\Launcher\;C:\Users\A2F\scoop\shims;C:\Users\A2F\AppData\Local\Programs\Git\cmd;C:\Users\A2F\AppData\Roaming\npm;.
Orb Version = IBM Java ORB build orb80-20161012.00
Current trace specification = *=info:com.ibm.*=all
************* End Display Current Environment *************
[6/15/18 9:28:32:221 EDT] 00000001 ManagerAdmin I TRAS0017I: The startup trace state is *=info:com.ibm.*=all.
[6/15/18 9:28:32:232 EDT] 00000001 WsServerContr 1 Executing executeUtilityOnWindows with args: C:\IBM\WebSphere\AppServer\profiles\AppSrv03\config V-INFSY-989Node02Cell V-INFSY-989Node02 server1
[6/15/18 9:28:32:233 EDT] 00000001 WsServerContr 1 Getting WindowsService obj with: server1 and C:\IBM\WebSphere\AppServer\profiles\AppSrv03\config V-INFSY-989Node02Cell V-INFSY-989Node02 server1
[6/15/18 9:28:32:237 EDT] 00000001 WindowsServic > WindowsService for server server1 Entry
<null>
[6/15/18 9:28:32:237 EDT] 00000001 WindowsServic > getWindowsServiceNameForServer server1 Entry
<null>
[6/15/18 9:28:32:237 EDT] 00000001 WindowsServic > getWASServiceCmdPath Entry
<null>
[6/15/18 9:28:32:237 EDT] 00000001 WindowsServic 1 In executeCommand, args are: C:\IBM\WebSphere\AppServer\bin\WASService.exe -getServiceName server1 -profilePath C:\IBM\WebSphere\AppServer\profiles\AppSrv03
[6/15/18 9:28:32:246 EDT] 00000001 WindowsServic 1 Runtime.exec() returned process java.lang.ProcessImpl@ddadeec1
[6/15/18 9:28:32:281 EDT] 00000001 WindowsServic 1 retCode from childProcess.waitFor() is 0
[6/15/18 9:28:32:282 EDT] 00000001 WindowsServic I ADMU7714I: WASService command for server server1 completed successfully.
[6/15/18 9:28:32:282 EDT] 00000001 WindowsServic 3 exitCode = 0
[6/15/18 9:28:33:282 EDT] 00000001 WindowsServic < getWindowsServiceNameForServer Exit
[6/15/18 9:28:33:282 EDT] 00000001 WindowsServic 1 Trying to new up WindowsService using serverName=server1, winServiceName=null
[6/15/18 9:28:33:282 EDT] 00000001 ManagerAdmin I TRAS0018I: The trace state has changed. The new trace state is *=info.
[6/15/18 9:28:33:363 EDT] 00000001 AdminTool A ADMU0128I: Starting tool with the AppSrv03 profile
[6/15/18 9:28:33:365 EDT] 00000001 AdminTool A ADMU3100I: Reading configuration for server: server1
[6/15/18 9:28:33:385 EDT] 00000001 ImplFactory W WSVR0072W: Ignoring undeclared override of interface, com.ibm.websphere.cluster.topography.DescriptionManager, with implementation, com.ibm.ws.cluster.propagation.bulletinboard.BBDescriptionManager
[6/15/18 9:28:33:596 EDT] 00000001 ModelMgr I WSVR0801I: Initializing all server configuration models
[6/15/18 9:28:36:670 EDT] 00000001 WorkSpaceMana A WKSP0500I: Workspace configuration consistency check is disabled.
[6/15/18 9:28:39:961 EDT] 00000001 AdminTool A ADMU3200I: Server launched. Waiting for initialization status.
[6/15/18 9:28:40:496 EDT] 00000001 AdminTool A ADMU3011E: Server launched but failed initialization. Server logs, startServer.log, and other log files under C:\IBM\WebSphere\AppServer\profiles\AppSrv03\logs\server1 should contain failure information.
This is my current setup in IntelliJ for the debug mode:

And this is the debug service setup in WebSphere console:

I have read many posts and tried different things, I am honestly getting a bit frustrated since in Eclipse this is a breeze.
Hopefully, somebody can shed some light on this.
Thank you,
Andrea
Please sign in to leave a comment.
Does it work with the default startup/shutdown scripts?
Hey Serge,
I just tried and I get the following error:
Try to disable the debugger in the WebSphere configuration, IntelliJ IDEA supplies debug options via the command line.
Thank you, Serge!
That worked! I should've tried that in the first place, however, I thought it was necessary to have the debugger running.
It might be useful to put it in one of the guides as a side note.
Thanks again,
Andrea
Can you please explain the above solution works for you or not ? After updating IBM web sphere configuration DEBUG flag as off and RUN Intellij Idea in debug mode it is not working. Giving same error show in above screenshot (Error ; JDWP agent alread ...)
Kindly guide me steps it I am missing anything, if possible please share screenshots .
Here is the complete solution:
https://stackoverflow.com/questions/25244474/websphere-works-when-run-but-fails-when-debug
I have been able to get my server up and running in debug mode however it seems that breakpoints are not being hit. Any suggestions on how to fix this?
How do the breakpoints look like in the editor when debugger is connected to the server? Do they have the checkmarks? If not, it means that there is no executable code found in this JVM on the specified lines. It can happen if you are no deploying the same code as you have in the editor to the server.
They do not have checks, but I'm not sure what code would be being deployed if its not the same as what is in the editor.
If not sure, please contact support via https://intellij-support.jetbrains.com/hc/requests/new and attach a small sample project to reproduce the issue.
I would check the artifact output directory and ensure that it contains the up to date classes that you want to debug: https://www.jetbrains.com/help/idea/artifacts.html.
Unfortunately I am not able to provide any code samples as it is privately owned.
I have added artifacts in the form of JAR files, however I am getting a warning that says no artifacts are configured.
You need WAR or EAR artifacts from the Java module with the Web facet to deploy them on the app servers: https://mkyong.com/intellij/intellij-idea-run-debug-web-application-on-tomcat/ .