Hitachi Vantara Pentaho Community Wiki
Skip to end of metadata
Go to start of metadata

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:

  1. We will configure a server in the JBoss IDE. We will use this to run the JBoss application server with the platform deployed as a web application.
  2. 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 in the JBoss Application Server" 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 JBoss 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 JBoss IDE Server

Now that you have the pentaho web application copied into the pentaho-preconfiguredinstall project, it's time to start up the JBoss application server and make sure everything works. The JBoss 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 Server in JBoss IDE 2.x.x

These instructions work for anyone running the recommended environment as described in Setting Up Your Environment doc.

To configure a new server in the JBoss IDE:

First, we need to setup a server runtime in the Eclipse Preferences.

    1.   Open the Preferences dialog from the Window menu.
    2.   Find the 'Server | Installed Runtimes' entry in the tree on the left. 


     3.   In the pane on the right, click the 'Add' button.
     4.   For runtime type, select 'JBoss Server Adapter Runtime' under 'JBoss Inc'. (If there are multiple choices such as JBoss 4.0 Server Adapeter Runtime, select                the 4.0 version)
     5.   Choose next. On the next pane, set the following parameters:* Name your runtime 'PCI Demo'.

  • This part is IMPORTANT! For the Home directory, navigate the the target server directory that is specified in your dev_build (or override) properties file! That is the server you want to debug against, as that is where the webapp is deployed to. (NOTE: you can make sure you get the correct property value by looking at the pentaho/ file and finding the value of the property named target.server.dir)
  • Switch your JRE to the 1.5 JRE. If you don't have a 1.5 JRE configured with Eclipse, do that now.  (use the 1.4 version of the JRE for platform version 1.2.x)

      6. Click OK to close the dialog.

Now we can configure a new server:

  1. Switch to the Eclipse Debug Perspective.
  2. From the Window menu, choose the 'Show View' option, then the 'Other...' option.
  3. You will be prompted with a dialog populated with named views. Choose the 'Server' option, then the 'JBoss Server View' view.
  4. Choose the OK button to finish. You should see the JBoss Server View appear in the bottom of the Eclipse Debug Perspective.
  5. Right-click in the JBoss Server View window pane. Choose the 'New...| Server' option.
  6. You are now in the Server setup wizard. Set the parameters for the wizard as follows:
  1. #* Server's host name: localhost
    • Server type: Under 'JBoss Inc', select JBoss AS 4.0
    • Server runtime: Select the 'PCI Demo' runtime that we set up earlier.
    • Choose next, and give your server a unique name, anything you like.
    • Choose finish.

And last, we will tailor our server configuration:

  1. In the JBoss Server View, you should see your new server, and two panes stacked vertically. Right click on the name of your server in the bottom pane. Select the menu item 'Edit Launch Configuration'.
  2. In the new dialog, switch to the 'Start Args' tab. Add the following arguments to the VM arguments section:
    -Xms512m -Xmx1028m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
  3. On the Source tab, click the add button and select the pentaho project. This will automagically identify all source in the pentaho project as source for this server config.
  4. On the JRE tab, specify the 1.5 JRE, if it is not selected already.  (1.4 for platform version 1.2.x)

You should now see the name of your new server listed in your JBoss Server View. You can start and stop the pentaho server by right-clicking on the entry in the JBoss Server View. NOTE!!! Before you start the server, you must first start the databases for the demo to run properly. Proceed to #hello_world for instructions on starting the databases.

Configuring a Server in JBoss IDE 1.x.x

These instructions are included for anyone who is setup with an older version of the JBoss IDE than what is recommended in the Setting Up Your Environment doc.

To configure a new server in the JBoss IDE:

  1. Switch to the Eclipse Debug Perspective.
  2. From the Window menu, choose the 'Show View' option, then the 'Other...' option.
  3. You will be prompted with a dialog populated with named views. Choose the 'JBoss IDE' option, then the 'Server Navigator' view.
  4. Choose the OK button to finish. You should see the Server Navigator view appear in the bottom of the Eclipse Debug Perspective.# Right-click in the Server Navigator window pane. Choose the 'Configuration...' option.
  5. You will be prompted with a Configuration dialog. In the left pane, choose the 'JBoss 4.0.x' option, then choose the New button under the left pane. You should see a dialog box similar to the one shown here.# Enter 'pentaho-server' as the name of your new configuration.
  6. Choose the 'Browse...' button and navigate to the pentaho-reconfiguredinstall folder. Set this folder as the JBoss 4.0.x Home Directory.
  7. Select 'default' as the Server Configuration.
  8. Choose the 'Apply' button to save this configuration.
  9. Switch to the 'Source' tab in the dialog.
  10. Choose the 'Add' button, then 'Java Project' from the next dialog, then 'pentaho' from the last dialog. Choose OK.
  11. Choose the 'Apply' button to save this configuration.
  12. Select the 'Close' button to close the dialog. You should now see the 'pentaho-server' listed in your Server Navigator view. You can start and stop the pentaho-server by right-clicking on the pentaho-server entry in the Server Navigator view. NOTE!!! Before you start the pentaho-server, you must first start the databases for the demo to run properly. Proceed to the next section for instructions on starting the databases.

Stepping Through 'Hello World'

All that's left to do is start up the platform, set our breakpoint, and watch it all work! Before you attempt to start the pentaho-server in Eclipse, you must first start the demo databases.

To start the databases:

  1. Either via command line or using your favorite file explorer tool - outside of Eclipse - navigate to the pentaho-data folder.
  2. Under the pentaho-data folder there are startup and shutdown scripts for both Windows OS and *nix platforms. Execute the start-up script that is appropriate for your computer (.bat files are for Windows, .sh files are for *nix).

Start the pentaho-server now:

  1. From the Eclipse Debug Perspective, Server Navigator view (or the JBoss Server View), right-click on the pentaho-server entry.
  2. Choose the 'Debug' option. You will see many start-up messages and warnings scroll by in the Console view. As long as the last message on startup is "Pentaho BI Platform server is ready.", then you know the platform is up and running successfully.

Now let's set a breakpoint and execute our 'Hello World' demo solution, so that you can see the development process in action.

  1. Start by switching to the Eclipse Debug Perspective, if you are not already there.
  2. From one of Eclipse's many file exploring views ( I use Navigator), navigate in the pentaho project to server/pentaho/src/org/pentaho/core/runtime/, and open that file.
  3. Place a breakpoint (from the right-click menu) on line 1092 in the file (Note: as code changes this line number could and most likely will change. The line of code that we are breaking on is the line that contains the executeComponent() code).
  4. Next, open a web browser window. Navigate to http://localhost:8080/pentaho/ViewAction?&solution=samples&path=getting-started&action=HelloWorld.xaction.
  5. Your breakpoint in Eclipse should be hit before the result of the component execution is sent from the server back to the browser. From here, you can step into, step over or continue execution in Eclipse. Watch the Console view for additional debug messages.

Quick Links For This Document

  • No labels


  1. I tried URL "http://localhost:8080/pentaho/ViewAction?&solution=samples&path=getting-started&action=HelloWorld.xaction^",^ But it took me into login page ..After login, it thrown  Error message as given below..


    HTTP Status 500 -

    type Exception report


    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception javax.servlet.ServletException: Filter execution threw an exception

    root cause java.lang.NoClassDefFoundError
    It doesn't get into the break point at all....
    Pls. help me how to fix the error....

  2. Anonymous

    Hi! I have the same error then the last post.

    I installed de sdk version, but when i try http://localhost:8080/pentaho/ViewAction?&solution=samples&path=getting-started&action=HelloWorld.xaction i had an error in console:ERROR [LocaleUtils] Locale name null or empty, ignoring

    23:25:09,520 WARN [RepositoryImpl] Existing lock file at C:\Users\toshiba\Desktop\eclipse3.1\workspace\preconfigured-install\server\default\data\portal\cms\conf\.lock deteteced. Repository was not shutdown properly.

    23:25:14,487 WARN [Configurator] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Users/toshiba/Desktop/eclipse3.1/workspace/preconfigured-install/server/default/tmp/deploy/tmp49551ehcache.jar\!/ehcache-failsafe.xml

    Do Somebody can help me?