LDSTechForumProjects

Community Services Starting the Simulator

Starting the Simulator and Accessing the Console

The simulator runtime environment and all dependencies are available by downloading the executable jar file from SSO Simulator Downloads].

To start the simulator you will need Java Development Kit 1.5 or above.

The Simulator requires that you specify a configuration file by passing a single parameter which is the path to the configuration file that should be used. This has two formats. It can be a path on the machine like myApp.xml which would be a file assumed to be in the current directory. Alternatively, it can be fully qualified.

Typical command line to start the SSO Simulator:

java -server -Xmx128m -jar SSOSim-4.8.jar myApp.xml

Included in the simulator’s jar are a number of example configuration files to help demonstrate its functionality. To start the simulator in its most simple configuration to show the console pages that are available to assist with troubleshooting issues execute the command shown in Listing 1.

The entry point for the simulator is the org.lds.sso.appwrap.Service class and that our command line parameter is passed in to that class upon startup. This class takes a single command line argument which is the path to an XML configuration file. As already noted, if this path is prefixed with “classpath:” then the file is looked for on the classpath. Otherwise, it is looked for on the file system. Therefore, Listing 1 is specifying a path that will be looked for on the classpath and indeed is one of several sample configuration files included with the simulator to illustrate its various features.

Listing 1: Running the Simulator

java -server -Xmx128m -jar SSOSim-4.8.jar classpath:config-samples/console-only.xml

Note that if you specify a path that is not found on the classpath you’ll get the error shown in Listing 2 clearly indicating the problem which was a leading ‘/’ character in this case.

Listing 2:Unable to find resource Error

IllegalArgumentException: Unable to find resource '/config-samples/console-only.xml' on classpath.

Additionally, when running the simulator and accessing its console for the first time you will likely incur the error in Listing 3. This is due to the classpath in sim.bat not containing the correct path to the tools.jar file in your local java development kit. Correct sim.bat for your local environment and try again.

Listing 3: Unable to compile JSP Error

org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP

Assuming that you started it correctly you’ll see console output similar to that show in Listing 4. Point your browser to http://localhost:1776/ and hit enter. You are presented with the simulator’s console with the User’s & Sessions tab selected as shown in Figure 3. The contents of the configuration file specified in Listing 1 are shown in Listing 5. Note that no users are defined in our configuration file nor did we declare any SSO traffic. Therefore, both the User & Sessions tab and SSO Traffic tab will appear empty for now. Lets discuss the elements found within this configuration file.

Listing 4: Successful startup console output

Using configuration file classpath:config-samples/console-only.xml
2010-01-11 21:44:14.781::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
admin-rest port: 1776
http proxy port: 80
2010-01-11 21:44:14.843::INFO:  jetty-6.1.7
2010-01-11 21:44:14.890::INFO:  Extract jar:file:/D:/saw/lib/appwrap-4.0.jar!/webapp to
  C:\DOCUME~1\BOYDMR\LOCALS~1\Temp\Jetty_0_0_0_0_1776_webapp__admin__-usxbqe\webapp
2010-01-11 21:44:15.359::INFO:  Started SocketConnector@0.0.0.0:1776
Started r-proxy on port 80
Figure 3: SSO Simulator Console User Tab

End of SSO Simulator documentation


Previous Page: Configuration Files

This page was last modified on 3 June 2010, at 14:15.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.