Debugging Alfresco Tomcat with Eclipse
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010 03:26 AM
Hi All,
I am trying to debug Alfresco with Eclipse and have tried all of the various solutions I have found on this forum to no avail thus far. I am hoping someone can advise me as to what else to try..
JPDA_TRANSPORT environment variable is set to dt_socket.
JPDA_ADDRESS environment variable is set to 8000.
In Tomcat's startup script (C:\Alfresco\tomcat\bin\startup.bat), changed the line that invokes Catalina to include jpda:
I start Tomcat and see these messages:
I set up Eclipse debug config as per: [img]http://imagefrog.net/out.php/i88306_alfrescoDebugConfig.JPG[/img]
I get this error from Eclipse: [img]http://imagefrog.net/out.php/i88307_alfrescoDebugFailed.JPG[/img]
Error detail:
I made sure Windows firewall was turned off.
I made sure Eclipse has no proxy information.
I did a "netstat -an | grep -i listen" to confirm port is being listened at. I guess it is:
Tried advice in this thread: http://forums.alfresco.com/en/viewtopic.php?f=10&t=16023#p53463
Tried advice in this thread: http://forums.alfresco.com/en/viewtopic.php?f=10&t=1914&p=78489&hilit=debug#p78489
How do I prove the server is really listening? Any other ideas would be more than welcome!
Rob
I am trying to debug Alfresco with Eclipse and have tried all of the various solutions I have found on this forum to no avail thus far. I am hoping someone can advise me as to what else to try..
JPDA_TRANSPORT environment variable is set to dt_socket.
JPDA_ADDRESS environment variable is set to 8000.
In Tomcat's startup script (C:\Alfresco\tomcat\bin\startup.bat), changed the line that invokes Catalina to include jpda:
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%
I start Tomcat and see these messages:
Listening for transport dt_socket at address: 800028/05/2010 1:44:42 PM org.apache.coyote.http11.Http11Protocol initINFO: Initializing Coyote HTTP/1.1 on http-8080
I set up Eclipse debug config as per: [img]http://imagefrog.net/out.php/i88306_alfrescoDebugConfig.JPG[/img]
I get this error from Eclipse: [img]http://imagefrog.net/out.php/i88307_alfrescoDebugFailed.JPG[/img]
Error detail:
eclipse.buildId=2.3.1.201003091003-RELEASE java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_AU Framework arguments: -product com.springsource.sts.ide Command-line arguments: -os win32 -ws win32 -arch x86 -product com.springsource.sts.ide -clean -data D:\work\projects\JadeLynx\Alfresco-3.3 Error Fri May 28 14:55:37 EST 2010 Failed to connect to remote VM. Connection refused. java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at java.net.Socket.<init>(Socket.java:375) at java.net.Socket.<init>(Socket.java:189) at org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:136) at java.lang.Thread.run(Thread.java:619)
I made sure Windows firewall was turned off.
I made sure Eclipse has no proxy information.
I did a "netstat -an | grep -i listen" to confirm port is being listened at. I guess it is:
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING
Tried advice in this thread: http://forums.alfresco.com/en/viewtopic.php?f=10&t=16023#p53463
1) Open Catalina.bat [C:\Alfresco\tomcat\bin], find “DEBUG_OPTS=” and add following line..
set DEBUG_OPTS= -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
Tried advice in this thread: http://forums.alfresco.com/en/viewtopic.php?f=10&t=1914&p=78489&hilit=debug#p78489
You may also add following line to your alfresco.sh and start the server
export JAVA_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y'
How do I prove the server is really listening? Any other ideas would be more than welcome!
Rob

Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2010 11:50 PM
Some further information:
When the server has started, I see this on the console (before I even try to connect):
When the server has started, I see this on the console (before I even try to connect):
31/05/2010 1:45:41 PM org.apache.coyote.http11.Http11Protocol startINFO: Starting Coyote HTTP/1.1 on http-808031/05/2010 1:45:41 PM org.apache.catalina.startup.Catalina startINFO: Server startup in 159453 msDebugger failed to attach: timeout during handshake
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2010 02:48 AM
Talk about egg on my face! The debugging was working perfectly all along.. each time I tried, Eclipse "did nothing", which I thought was weird - so I tried again and got the error message. What I didn't realise is that Eclipse had started debugging the first time: I just didn't realise it because I am used to Eclipse saying "Shall I enter debug mode?"
What a relief. *whew*
What a relief. *whew*

