ILOG JRules User Guide > Running and Debugging > Tasks > Debugging Remotely > Debugging Remotely on an Application Server

If you have deployed a Rule Execution Server application on an application server and want to debug the application from Rule Studio, the remote debugger can connect to the application server and debug the application and the ruleset.

For every engine associated with the ruleset, Rule Execution Server will try to connect it to the debugger when retrieving it from the connection pool, and close the connection to the debugger when it is returned to the pool.

Note

Without a debugger, error messages must be obtained from the application server error log.

You can look at the Execution Unit (XU) log from the Rule Execution Server Console.

To debug a ruleset on an application server:

  1. After you build your Rule Project for RuleApps in Rule Studio, install it to the target application server.
  2. This usually involves deploying the EAR file. For example, in JBoss you can copy the EAR file and paste it into: <JBOSS_HOME>/server/<jrulessamples>/deploy.
  3. Open the rule project that is associated with the Rule Project for RuleApps, and extract a RuleApp from it.
  4. Create a Rule Execution Server Configuration, if you have not done so already.
  5. Start the application server.
  6. Deploy the previously extracted RuleApp to the running application server.
  7. Enable debug mode of the deployed ruleset using the Rule Execution Server Console.
  8. Launch a browser and enter the address where the enterprise application has been deployed. For example:
    1. WebSphere: http://localhost:9080/Application_Name
    2. WebLogic: http://localhost:7001/Application_Name
    3. JBoss: http://localhost:8080/Application_Name
  9. Use the Rule Execution Server Console to test the ruleset execution:
    1. Enter ruleset parameter values.
    2. Execute the ruleset.
  10. View the ruleset execution statistics.
  11. The execution statistics can be reset at any time. This is useful if you want to measure a single ruleset execution.
  12. In Rule Studio click Run > Debug.
  13. In the Configurations area of the Debug dialog, under Remote Java Application with Rules, click the Configuration_Name you defined in the debugger launch configuration task.
  14. See Creating a Debugger Launch Configuration for a Remote Java Application with Rules or RuleApps for details on defining a debugger launch configuration task.
  15. Enable debug mode on the application server:
    1. WebSphere 6.1:
    2. WebLogic 9.2:
    3. JBoss 4:
  16. Click Debug.
  17. The launch configuration tries to connect to a VM at the specified address and port, and the result is displayed in the Debug view. If the launcher is unable to connect to a VM at the specified address, an error message appears. When an application is run on an application server like JBoss and the application generates an error, the application is suspended and the Rule Studio Debug perspective displays the line that has generated the error.

See http://java.sun.com/products/jpda/index.jsp for more details on debugging on Java platforms.

Related Concepts

Overview: Testing Rules and Ruleset Execution
Ruleset Debugging
Rule Engine
Rule Execution Server

Related Tasks

Creating a Debugger Launch Configuration
Debugging
Debugging Remotely

Related Samples and Tutorials

Tutorial: Debugging a Ruleset
Tutorial: Debugging a Remote Rule Execution Server Application