Eclipse tips
Debug tomcat
You can debug your OpenKM installation using the Tomcat logging facility. This is a useful thing when you have problems with your configuration. Default OpenKM installation tries to log important events like errors and warnings. Is possible to change this configuration editing the file $TOMCAT_HOME/conf/logging.properties.
Default Tomcat log configuration can generate a lot of messages. These files are stored at $TOMCAT_HOME/logs.
Debug remote tomcat server
When you have problems in the production environment this configuration is especially useful.
Add the following options when the JVM is started:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
Or if you are using shell scripts to start Tomcat, start it with the following command (recommended):
$ $TOMCAT_HOME/bin/catalina.sh jpda start
It will start Tomcat so that a remote debugger can be connected to port 8000.
More information at:
Eclipse configuration
Open eclipse "Debug configurations", then choose "Remote Java Application", right click on mouse and choose "new".
Set the "host" and "port" of the remote server:
Include in source tab your OpenKM java project:
You can debug normally, setting breakpoints, etc.