Hitachi Vantara Pentaho Community Wiki
Child pages
  • 05. Debugging with Tomcat in Eclipse IDE in 2.0 using Sysdeo Eclipse Tomcat Launcher
Skip to end of metadata
Go to start of metadata

Debugging with Tomcat in Eclipse in 2.0

This Step's Objective

This step instructs you on how to debug platform project code using Eclipse and Tomcat.

Now you will place a breakpoint in the platform Java code, run the 'Javascript Rule returns Central' sample solution, and step through the code from that breakpoint.

(warning) Warning: Make sure you do not have another application using port 8080 on your computer; this is the default port for the Tomcat application server. While you can change the default port to something else, you do not want to unnecessarily complicate your installation because it makes it harder to test with later. If port 8080 is in use, temporarily shut down the application that is using it while you are running Tomcat.

IDE Version

These steps are for Eclipse versions 3.5.2  - for other versions, the correct configuration may require different options.

Configuring a Tomcat Server in Eclipse using Sysdeo Eclipse Tomcat Launcher


  • Follow steps 1 through 4, which take you through setting up your development environment, checking out the projects from Subversion and resolving your dependencies for building.
  • Download XMLTask, a third-party Ant task. If building from the command line, download the JAR and copy into <user.home>/.ant/lib. If building from Eclipse, download the JAR and add it to the classpath of the Ant plugin  (Window > Preferences > Ant > Runtime > Classpath).

To configure a new Tomcat 6.x server in the Eclispe IDE:

     1. Create in the bi-platform-build directory.

     2. Add the property tomcat.dir and make the value the absolute path to your unzipped Tomcat installation. e.g.

         Don't include spaces in the directory name and be sure to use forward slashes in the path.

     3. Run ant -f dev_build.xml dev-rebuild in the bi-platform-build directory. This can also be done in Eclipse by opening
        dev_build.xml in the editor and in the outline pane, right click dev-rebuild and select Run As->Ant Build.

     4. Browse to and follow the instructions to download and install the Sysdeo
         Eclipse Tomcat Launcher.

     5. Start/Restart Eclipse and navigate to Window/Preferences/Tomcat

          -  Select Tomcat Version 6.x.  
          -  "Tomcat Home" is the location of the Tomcat installation under  the
[workspace]/tomcat-pci-test/biserver-ce/tomcat directory created in step 3. 

          -  The "Contexts directory"  is the \conf\Catalina\localhost directory under  "Tomcat Home".

     6. Add the VM arguments, -Xms512m -Xmx1028m -XX:MaxPermSize=256m, to the Tomcat JVM Settings.
         Note the "Don't  run Tomcat in debug mode" checkbox.

     7.  Ensure that the "Tomcat Source Path" includes all bi-platform java projects.

     8. Save and close the properties window.

     9. Make sure you have the proper database server configuredand started. (Out of the box, this configuration will work with
        the Hypersonic database which start script is located under tomcat-pci-test\biserver-ce\datain your Eclipse

     10. Start Tomcat using the Plugin's "Start Tomcat" toolbar button.  The server will start in debug as long as the
           "Don't run Tomcat in debug mode" check box in the Window/Preferences/Tomcat/JVM dialog is unckecked.

Verify Debug Mode Works

To verify that the server is running in debug mode:

  1. Open the source file org.pentaho.platform.plugin.action.javascript.JavaScriptRule in the bi-platform-plugin-actions project.
  2. Set a breakpoint on the first line of the executeAction() method.
  3. In a Web browser, login to the Pentaho PCI.
  4. In the Browse panel, navigate to and run the Javascript Rule returns Central action by clicking the Business Rules folder, then double-clicking the action in the Files panel.
  5. The Eclipse IDE should indicate a breakpoint has been hit.


  • If the following error and stack trace appear when the server is started:
13:32:36,259 ERROR [DiskStore] libloader-dataCache: Could not create disk store. Initial cause was Could not create cache directory "/tmp_pentaho".
java.lang.Exception: Could not create cache directory "/tmp_pentaho".

Then it indicates a system parameter's default value will not work for the installed operating system. To correct this problem, the following system property should be set in the launch configuration of the server (the Argument tab's VM arguments edit box). Note that the directory specified (/tmp/ in this example) should be a temporary directory that currently exists on the system.
  • No labels