Difference between revisions of "Debugging remote JBoss server"
From OpenKM Documentation
m |
|||
Line 1: | Line 1: | ||
− | If you got problems on production | + | If you got problems on production environment this configuration is specially useful. |
+ | |||
+ | '''OpenKM 6.x - Tomcat''' | ||
+ | |||
+ | Add the following options when the JVM is started: | ||
+ | |||
+ | <source lang="bash"> | ||
+ | -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n | ||
+ | </source> | ||
+ | |||
+ | If you are using shell scripts to start Tomcat, start it with the following command: | ||
+ | |||
+ | $ catalina jpda start | ||
+ | |||
+ | It will start Tomcat so that a remote debugger can be connected to port 8000. | ||
+ | |||
+ | For more info read [http://wiki.apache.org/tomcat/FAQ/Developing#Q1 Tomcat developing: How do I configure Tomcat to support remote debugging?]. | ||
+ | |||
+ | '''OpenKM 5.1 - JBoss''' | ||
+ | |||
+ | Add this line at the top of ''$JBOSS_HOME/bin/run.sh'' script: | ||
<source lang="bash"> | <source lang="bash"> | ||
− | JAVA_OPTS="-Xmx2000m -Djava.awt.headless=true -Xdebug -Xnoagent | + | JAVA_OPTS="-Xmx2000m -Djava.awt.headless=true -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" |
− | -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" | ||
</source> | </source> | ||
Revision as of 08:05, 11 September 2012
If you got problems on production environment this configuration is specially useful.
OpenKM 6.x - Tomcat
Add the following options when the JVM is started:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
If you are using shell scripts to start Tomcat, start it with the following command:
$ catalina jpda start
It will start Tomcat so that a remote debugger can be connected to port 8000.
For more info read Tomcat developing: How do I configure Tomcat to support remote debugging?.
OpenKM 5.1 - JBoss
Add this line at the top of $JBOSS_HOME/bin/run.sh script:
JAVA_OPTS="-Xmx2000m -Djava.awt.headless=true -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
Configure eclipse
Select the project and the host. Include in source your OpenKM java project. You can debug normally, setting breakpoints etc...