If you have followed the previous setup steps, you are now ready to debug the platform. We are assuming that you have the necessary projects and a configured JBoss server to run as we outline here. Here's the steps we are going to perform:
- We will configure a tomcat server in the Eclipse IDE. We will use this to run the Tomcat application server with the platform deployed as a web application.
- Last, we will place a breakpoint in the platform Java code, run the 'Hello World' sample solution, and step through the code from that breakpoint.
If you intend to follow the "Debugging with Tomcat in the Eclipse IDE" exercise, you will want to 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 port that the server looks to use, you do not want to unnecessarily complicate your life at this point. If port 8080 is in use, we recommend temporarily shutting down the application that is using port 8080 while you are running the application server.
Configuring the Tomcat Server
Now that you have the pentaho web application copied into the pentaho-tomcatpreconfiguredinstallproject, it's time to start up the Tomcat application server and make sure everything works. The Eclipse IDE is a pretty sweet tool. It's easy to configure, and once that's done, all you have to do is start the server through the IDE and you can debug Java code.
Configuring a Tomcat Server in Eclipse IDE
These instructions work for anyone running the recommended environment as described in Setting Up Your Environment doc.
To configure a new server in the Eclispe IDE:
- In the Eclispse IDE in the Server view, right click and select "New->Server".
- In the "New Server" dialog, open the tree to "Apache" and select "Tomcat v5.5 Server".
- Click the "Installed Runtimes..." button.
- Click "Add".
- Open the "Apache" node in the tree control.
- Select "Apache Tomcat v5.5"
- Click "Next".
- Give it a name.
- In the Tomcat installation Directory text box, enter the path to your target-tomcatpreconfiguredinstall. (i.e. C:\projects\pentaho1.6\target-tomcatpreconfiguredinstall)
- Click the "Installed JREs" button, and select an appropriate JDK.
- Click Ok
- Click Finish
- Click Ok
- Click Next, click Finish.
- In the Server view, double click on your new server.
- In the resulting "Overview" dialog, in the "Server Locations" section, click the "Use Tomcat installation" radio button.
- In the "General Information" section, set the "Configuration path" to /target-tomcatpreconfiguredinstall/conf.
- Save All.
- Select your new server in the Servers view.
- Click the "debug" button, and your server should come up.