Possible bug with Glassfish local debug

I am using Glassfish v2 beta 2 from the J2EE5 SDK bundle (Update 3 Preview 2) and IDEA 7.0M1b bld 6833 on Windows XP Pro + SP 2, with the fire wall disabled.

When attempt to debug using a local glassfish configuration I get the following output:

cmd /c "c:\Sun\SDK\bin\asadmin.bat start-domain --debug=true domain1"
Starting Domain domain1, please wait.
Log redirected to C:\Sun\SDK\domains\domain1\logs\server.log.
ASLauncher Building command ..
LOGFILE = C:/Sun/SDK/domains/domain1/logs/server.log
Logfile set to C:/Sun/SDK/domains/domain1/logs/server.log
addJvmOptions: OUT Property -XX:MaxPermSize=192m
addJvmOptions: OUT Property -client
addJvmOptions: OUT Property -Djava.endorsed.dirs=C:/Sun/SDK/lib/endorsed
addJvmOptions: OUT Property -Djava.security.policy=C:/Sun/SDK/domains/domain1/config/server.policy
addJvmOptions: OUT Property -Djava.security.auth.login.config=C:/Sun/SDK/domains/domain1/config/login.conf
addJvmOptions: OUT Property -Dsun.rmi.dgc.server.gcInterval=3600000
addJvmOptions: OUT Property -Dsun.rmi.dgc.client.gcInterval=3600000
addJvmOptions: OUT Property -Xmx512m
addJvmOptions: OUT Property -Djavax.net.ssl.keyStore=C:/Sun/SDK/domains/domain1/config/keystore.jks
addJvmOptions: OUT Property -Djavax.net.ssl.trustStore=C:/Sun/SDK/domains/domain1/config/cacerts.jks
addJvmOptions: OUT Property -Djava.ext.dirs=C:/Sun/SDK/jdk/lib/ext;C:/Sun/SDK/jdk/jre/lib/ext;C:/Sun/SDK/domains/domain1/lib/ext;C:/Sun/SDK/javadb/lib
addJvmOptions: OUT Property -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
addJvmOptions: OUT Property -Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
addJvmOptions: OUT Property -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
addJvmOptions: OUT Property -Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
addJvmOptions: OUT Property -Dcom.sun.enterprise.taglisteners=jsf-impl.jar
addJvmOptions: OUT Property -XX:NewRatio=2
Final classpath=;C:/Sun/SDK/lib/appserv-launch.jar
Current java.library.path=C:\Sun\SDK\bin;C:\Sun\SDK\bin

Final java.library.path=C:\Sun\SDK\lib;C:\Sun\SDK\lib;C:\Sun\SDK\bin;C:\Sun\SDK\bin

ASLauncher Executing command ..
InputLine ->null<-
InputLine ->null<-
InputLine ->changeit<-
Redirecting output to C:/Sun/SDK/domains/domain1/logs/server.log
Listening for transport dt_socket at address: 9009
Application server is listening at address 9009 for debugger to attach using transport dt_socket
Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain is running with its configuration and logs at: .
Admin Console is available at .
Use the same port for "asadmin" commands.
User web applications are available at these URLs:
.
Following web-contexts are available:
.
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
for domain management purposes.
Domain listens on at least following ports for connections:
.
Domain does not support application server clusters and other standalone instances.
Domain is started in debug mode.
A debugger can be attached using:
.
Disconnected from server

And there is a popup saying:

"Error running myProject: Unable to open debugger port: java.net.SocketException "socket closed"

My debug preferences has the default JAVA_OPTS set and Port 3473. I changed the start up script to use C:\Sun\SDK\bin\asadmin.bat start-domain --debug=true domain1 since it didn't send the debug option to the sever under the default settings.

I am able to connect to 9009 using telnet.

The only way I have been able to successfully connect the debugger is to create a 'remote' glassfish configuration.

If this sounds like a bug I'll be happy to file a tracker ticket. Thnx.

5 comments
Comment actions Permalink

It's a known problem, but please file a bug report anyway here: http://www.jetbrains.net/jira/browse/JEEAS

0
Comment actions Permalink

Has anyone else been able to get GF working via IJ in debug mode?

0
Comment actions Permalink

Norris,
Currently you have to configure debug mode manually in domain.xml:

<java-config ... debug-enabled="true" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=9009" ...

The port number specified (9009) must match the one in the run configuration under Startup/Connection -> Debug

0
Comment actions Permalink

Thank you so much. I missed the server and the suspend changes.

0

Please sign in to leave a comment.