- This topic has 7 replies, 4 voices, and was last updated 19 years, 9 months ago by
dlliucz.
-
AuthorPosts
-
tsmithMemberHello
I’ve read article about remote debugging in MyEclipse (http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/remotedebugging/index.html). Tried it with Tomcat 5.5 and works good. But now i have a problem with Websphere 6. Steps:
– I edited /bin/startServer.bat file in WebSphere directory and enabled debug options, it looks like:
set WAS_DEBUG=-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777
– run startServer.bat in command line, suspend=y so server waits for debugger
– I start debugging with MyEclipse, looks good, debugger connected, some threads spawned
– now worse – batch file (serverStart.bar) finished his works, and returns control to command line, it looks like server is running, but debugger is terminated and can’t connect to server anymore (message ‘Failed connect to remote VM. Connection refused”)When I run Tomcat batch file (catalina.bat) new window is spawned and while server is running its never closed.
Scott AndersonParticipantThis is because of the startup sequence of WebSphere, IIRC. The first script launches a WebSphere Java Launcher and that is apparently being launched with the debug options. However, that launcher is responsible for configuring and starting the *actual* WebSphere server, and it doesn’t look like those debug options are being propogated through to the server itself. So, you’re actually connecting to the startup process, not the server itself, which is why the debug session terminates when the startup process does. The question then becomes how do you configure WebSphere’s startup process so that the *server* will be configured for remote debugging when it’s launched?
First, to see how the server is started, you can specify that you’d like the startup process to generate a startup script that you can use directly. Here’s the gist of it:
1. Launch the server with the -script option to generate a startup script that you can use directly: WEBSPHERE_HOME/bin/startserver -script This command should write a script called start_<server name> in the WEBSPHERE_HOME/bin directory. 2. Edit the launch script and add the following remote debug parameters to the java command line: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=7777,suspend=y 3. Launch the server using the script.
Use the new script to start the server and then connect to it using the remote debugging tools as you did before.
tsmithMemberI found solution ;-). I enabled debug options using WebSphere Administrative Console. Now debugger can connect to running server. Of course now I have another problem (life isn’t easy…):
I deploy my app in “c:\test_app” using MyEclipse. Now – how I can make this app visible to WebSphere? I can’t deploy it now with Administrative Console (it require WAR or EAR format anyway). I just need to tell WebSphere – “Hey, there is an application in ‘c:\test_app’, check it and make it accessible from web browser”. Is it possible?
BTW: thx for Tapestry support in 4.0 M1 🙂
Riyad KallaMemberI deploy my app in “c:\test_app” using MyEclipse. Now – how I can make this app visible to WebSphere? I can’t deploy it now with Administrative Console (it require WAR or EAR format anyway). I just need to tell WebSphere – “Hey, there is an application in ‘c:\test_app’, check it and make it accessible from web browser”. Is it possible?
You’d have to check with the Webspehere folk, they have their own way of doing things 🙂
Scott AndersonParticipantThere’s a good thread on WAS deployment and debugging here:
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-7011-highlight-websphere+exploded+deployment.html
tsmithMemberOk, i figured it out… to some degree. WebSphere is so weird :|. Thx for help 😉
Scott AndersonParticipantWebSphere is so weird
That really sums it up. 🙂
dlliuczMemberI support you! websphere is so weird! and ibm’s products is unuseful!
-
AuthorPosts