This article describes some measures that can be taken in case of problems with the CKFinder for Java application.
Debugging CKFinder
CKFinder for Java contains a special debugging mode that makes it easier to troubleshoot the application. This mode can be turned on in the WEB-INF/web.xml
file, by setting a new <init-param>debug</init-param>
node to true
.
<servlet> <servlet-name>ConnectorServlet</servlet-name> <servlet-class>com.ckfinder.connector.ConnectorServlet</servlet-class> <init-param> <param-name>XMLConfig</param-name> <param-value>/WEB-INF/config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>
For more information on the web.xml
file refer to the Integration article.
With the debugging mode on, CKFinder returns detailed exception information when an error occurs.
Empty Error Messages
Under some circumstances right after installing CKFinder you may get errors about incorrect configuration of the application. In rare cases (usually because of your custom web application settings) it may happen that you will not see any message text either in the dialog window or in your log files.
Here is what you can do to fix it:
- Clear Tomcat log files. This step is not obligatory, but if you do not want to go through hundreds of log files that you probably have in your Tomcat, you can clear them. In this way it will be easier for you to find an exception you are interested in.
- Deploy the
CKFinderJava-x.y.war
file (x.y
is the version number) on your Apache Tomcat server. - Turn on debugging mode in the
CKFinderJava
application. In order to achieve this, go to theWEB-INF/web.xml
file and set the<init-param>debug</init-param>
node totrue
. See the section above for a more detailed description of the debugging mode. - Start and stop your Apache Tomcat server. This will create a
CKFinderJava
context file which represents a web application that is run within a particular virtual host. You can find more information about application context here: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html. - If you are using a default Apache Tomcat configuration, your virtual host is
localhost
and your application context should be placed under{CATALINA_HOME}/conf/Catalina/localhost
. The context file has the same name as your application and has an.xml
extension. In our default case it will beCKFinderJava-x.y.xml
. - Open the context file, find the
Context
node and add theswallowOutput
attribute with its value set totrue
. The node should look like this:<Context antiJARLocking="true" path="/CKFinderJava" swallowOutput="true" />.
This attribute will redirect all errors to the web application logger. - Now start your application again and repeat the steps to return an error. A detailed stacktrace should be visible in the CKFinder dialog window as well as in Tomcat log files.
Support and Help
If you encounter other issues with CKFinder for Java, you can find support on the community forum. Use the contact form from our website to send your questions and comments.