|Home > Apache Geronimo v1.1 > Documentation > Apache Geronimo v1.1 - User's Guide > Sample applications > SPECjAppServer2004|
|Issues still exist that prevent SPECjAppServer2004 from running on Geronimo.
This article is not a success story, but a collection of notes on the progress that has been made in this direction.
Current issue that requires your help is: Running the benchmark
|Disclaimer: This article is created to write down the existing experience and to make it reproducible. It is not targeted to be a comprehensive guide on either product or on merging them together. It's not also a replacement to the products' documentation, but just a step-by-step guide on how to make things work in a simple configuration, as it worked for me. Make sure you at least look through the documentation on both products before you proceed.|
|SPECjAppServer is a trademark of the Standard Performance Evaluation Corp. (SPEC). The SPECjAppServer2004 results or findings in this publication have not been reviewed or accepted by SPEC, therefore no comparison nor performance inference can be made against any published SPEC result. The official web site for SPECjAppServer2004 is located at http://www.spec.org/jAppServer2004/.|
The described configuration uses as many Geronimo components as possible, including the built-in Derby database and the built-in Jetty or Tomcat servlet container. In fact, the configuration only uses Java, Geronimo, an external servlet container (e. g. Tomcat) and SPECjAppServer2004. To plug external components (most probably, a database), you have to change your configuration accordingly.
This configuration also assumes that all the components (except, possibly, the SPECjAppServer2004 Driver and the SPECjAppServer2004 Supplier Emulator and its servlet container) are run on the same machine. If you want to run the Distributed workload, your configuration will be different.
This configuration uses the Microsoft Windows XP Professional Service Pack 2 operating system, Cygwin shell, Sun Java SE 1.4.2 and Tomcat v5.0.30 to write this article. If you use another OS, Java or servlet container, some stages may be different.
This article uses forward slashes ( / ) for command lines, adjust to backslashes ( \ ) accordingly if you use Windows command prompt.
This article has the following structure:
Apache site: http://apache.org
Product site: http://geronimo.apache.org
Documentation page: http://geronimo.apache.org/documentation.html
The best document available is "Apache Geronimo Development and Deployment" book by Aaron Mulder: http://chariotsolutions.com/geronimo/geronimo-html-one-page.html
The second necessary doc is the Wiki page: http://wiki.apache.org/geronimo/
SPEC site: http://www.spec.org
Product site: http://www.spec.org/jAppServer2004/
User's Guide: http://www.spec.org/jAppServer2004/docs/UserGuide.html
Run and Reporting Rules: http://www.spec.org/jAppServer2004/docs/RunRules.html
The latest Geronimo version for now is 1.1.
General download page: http://geronimo.apache.org/downloads.html
Two builds of Geronimo exist, with Jetty or Tomcat servlet container enabled by default. You can download either one at http://geronimo.apache.org/downloads.html, they are slightly larger than 60 MB in size. This document was written primarily using Jetty version, but Tomcat version works fine also.
The latest version is 1.05 coming as the SPECjAppServer2004-Kit-v1.05-050425.jar file, 12 MB in size.
This section contains important notions that mark the important hosts and directories.
This article is written in terms of the following machines:
The emulator.host and the driver.host may be the same machine.
The geronimo.host and the driver.host may be the same machine, but you have to adjust the Geronimo configuration, as both Geronimo and the SPECjAppServer2004 Driver create RMI Registry on the default port (1099) and would conflict on that.
|Sharing geronimo.host with emulator.host or driver.host is contradicting with the SPECjAppServer2004 documentation and would impact the performance severely and invalidate the benchmark results. However technically this is possible.|
This section lists important directories that are futher addressed in this article. They can be chosen arbitrary, but should not overlap.
|It was reported that some components may work incorrectly if working paths are too long or contain spaces. So it's recommended that you avoid long paths and spaces in them.|
First, save the files attached to this article to a local directory. This will be your <KIT> directory.
You can easily install Geronimo using the .zip or .tar.gz archive.
Extract the downloaded archive to a local directory. The geronimo-1.1 directory is created, that is your <GERONIMO> directory.
Click Next, read and accept the license agreement, and type in the directory you want the SPECjAppServer2004 to be installed to. This directory will be your <SPEC> directory.
Wait until the installation completes, then click Ready.
Adjust the EJB configuration by adding the allowHosts attribute to the <GERONIMO>/var/config/config.xml file, as shown below.
If your geronimo.host and your driver.host are the same machine, you have to adjust the port number of the Geronimo RMI Registry (to e. g. 1199), otherwise it would conflict with the SPECjAppServer2004 Driver that uses the default port of 1099:
Go to your <GERONIMO> directory.
Start Geronimo by typing:
It will take some time to start. After that, you will see:
If you get another result, particularly, if network errors show up, then something has gone wrong.
|Sometimes, the startup fails because some local network addresses are inaccessible. This could happen, for example, if you have used a VPN interface that is disconnected now. By default, Geronimo uses the first local address it comes across to access its components, and may try to use a stale address, causing startup errors.
You may try disabling and then re-enabling the unused network interfaces to resolve such issues.
Open your web browser and connect to the Geronimo Console at http://geronimo.host:8080/console/
Log in using the user name and password you provided during the installation (system and manager by default).
Now you may investigate the console if you wish.
Go to the downmost link in the console, DB Manager.
Create the benchmark database by typing its name (SPECDB) in the Create DB field and clicking Create.
To create database tables, you can use the default SQL scripts provided in the <SPEC>/schema/sql directory. However, the directory includes five scripts, and they contain DROP TABLE commands that would fail if you try to execute them in the console when tables are not yet created.
Instead, it is recommended that you use the allTablesNoDrop.sql file, if you are creating the tables from scratch, or allTables.sql file if you want to drop and recreate the tables. Both files were created from the <SPEC>/schema/sql files by simple concatenation, allTablesNoDrop.sql also has DROP TABLE commands removed.
Make sure SPECDB is selected in Use DB field and then copy-paste the SQL code to SQL Command/s frame. Click Run SQL button above it.
After a short delay, the frame will clear and the Result field below it will say SQL command/s successful. If not – check what you did wrong and try again.
If you use multiple SQL scripts, repeat the operations above for each of them.
Go to the <SPEC>/src/deploy directory and copy the reference subdirectory with its contents with the name geronimo.
Go to the <SPEC>/config directory.
Put the attached geronimo.env template file there. Edit it, make sure you set the values for the following variables:
|Use forward slashes ( / ) as directory separators!|
You may leave the other variables intact.
Edit the <SPEC>/config/appsserver file – replace the word default there with the word geronimo.
Edit the <SPEC>/config/run.properties file. Note that it will be used on the driver.host and make sure the following variables have correct values:
Url = http://geronimo.host:8080/SPECjAppServer/app?
outDir = <OUTPUT>
dumpDir = <DUMP>
Edit the <SPEC>/bin/setenv.bat file, make sure you set the values for the following variables:
Go to the <SPEC> directory.
Clean-up your installation:
Build the application and configure it for Geronimo:
You will get the BUILD SUCCESSFUL diagnostic.
Make sure the files SPECjAppServer.ear and Emulator.war are created in the <SPEC>/jars directory.
Rename emulator.war to Emulator.war.
In the described configuration, the same database is used for all tables.
Go to the <SPEC>/config directory. Replace the content of each of the *db.properties files you find there with the contents of the attached db.properties template file. Make sure the pipeDir variable there points to a valid temporary directory, adjust if necessary.
After some time, you will get the BUILD SUCCESSFUL diagnostic.
At this stage you need to deploy the configured components to Geronimo.
|Note that if your geronimo.host and your driver.host are the same machine, and you changed the port number of the Geronimo RMI Registry, you should specify that port number in all deployer commands, like this:|
To deploy a connector to the Derby SPECDB database you created earlier, go to the <GERONIMO> directory and run:
You will get the Deployed SPEC/SPECjAppServerDB/1.05/car diagnostic.
You will get the Deployed SPEC/SPECjAppServerJMS/1.05/car diagnostic.
To deploy SPECjAppServer2004 on Geronimo, this configuration uses the deployment plan that was originally found in Geronimo sources at http://svn.apache.org, modified and updated for Geronimo version 1.1.
Go to the <GERONIMO> directory and run:
You will get the Deployed SPEC/SPECjAppServer/1.05/ear diagnostic.
At this stage you may check that the deployment has been done correctly and that SPECjAppServer2004 is operational.
Open the deployed SPECjAppServer2004 page: http://geronimo.host:8080/SPECjAppServer/
In the left-hand menu, click the Atomicity Tests link.
You will see the results of three atomicity tests' runs. If all three of them are marked as PASSED, your deployment is correct.
Open the deployed SPECjAppServer2004 page: http://geronimo.host:8080/SPECjAppServer/
In the left-hand menu, click the Go Trade Autos! or Go Build Cars! link.
Log in with the default credentials (1) by clicking Log in.
You should see the program interface and be able to perform transactions.
To deploy the SPECjAppServer2004 Supplier Emulator at the emulator.host, use one of the following:
The Geronimo built-in servlet container (in case the emulator.host and the geronimo.host are the same machine); or a stand-alone servlet container on the emulator.host.
|Note that SPECjAppServer2004 documentation requires that the Supplier Emulator servlet container should have the keep-alive option turned off. You can ignore this requirement, but that would impact the performance severely.|
Go to the <GERONIMO> directory and run:
You will get the Deployed SPEC/Emulator/1.05/war @ http://geronimo.host:8080/Emulator diagnostic.
This configuration assumes that your stand-alone servlet container on the emulator.host is Tomcat running on the default port (8080).
Install Tomcat to your <TOMCAT> directory on the emulator.host.
|Do not bother editing <SPEC>/config/tomcat.env file or running ant/bin/ant -f tomcat.xml.
Both files are obsolete, they generate the Emulator.war file, which has already been created at Building the application phase.
Copy the <SPEC>/jars/Emulator.war file to the <TOMCAT>/webapps directory and remove the <TOMCAT>/webapps/Emulator directory if it exists.
Go to the <TOMCAT> directory on the emulator.host and start Tomcat:
Go to the page http://emulator.host:8080/Emulator/. It should load normally and contain a single directory, dtd, with two files inside, delivery.dtd and po.dtd.
Go to the page http://emulator.host:8080/Emulator/EmulatorServlet. You should see a page with text like this:
Copy the <GERONIMO> directory to the driver.host, the copy will be your <DRIVER_GERONIMO> directory (in fact you only need some jars from it).
Copy the <SPEC> directory to the driver.host, the copy will be your <DRIVER> directory.
In the <DRIVER>/config/geronimo.env file adjust the JAS_HOME variable to the <DRIVER> directory and J2EE_HOME variable to the <DRIVER_GERONIMO> directory.
Go to the <DRIVER> directory on the driver.host and run:
This configures the environment to run the Driver.
To start the Driver itself, run:
If you wish to run a distributed load with multiple Drivers, then after the Driver is started on the first host (the master.host), start the Driver on other driver hosts like this:
After starting the Driver, you should see the output like this:
This means the Driver started normally.
Note the times for Rampup, SteadyState, Rampdown and Finish to figure out the time needed for the benchmark to complete.
|You can interrupt the run at any point with Ctrl-C.|
Sometimes binding exceptions or other problems may occur at the Driver startup. In such a case, interrupt the test run with Ctrl-C and rerun it again. Sometimes it helps.
|It's recommended to reload the database tables before each run, particularly if previous run was not finished correctly. Otherwise, errors like this may occur:
During the run, the following diagnostics may appear in the Driver window:
and in the same time, various TransactionRolledback and other exceptions of the same kind are being printed in the Geronimo shell.
|These diagnostics are probably caused by the fact that TranQL version 1.3 used in Geronimo version 1.1 does not provide the necessary transaction isolation level. Hopefully, this problem will be fixed in TranQL version 1.3.1.|
After the run has completed successfuly, you will see the output like this:
The number of JOPS is a final benchmark metric.
|For now these values for Geronimo are terribly low, and don't depend on the hardware being used. Probably this is due to some configuration issues that still exist or due to TranQL issue mentioned above.|
When driver is run, a subdirectory with a numerical name is created in the <OUTPUT> directory. The subdirectory with the largest number corresponds to the latest run. After the Driver run is complete, the result.props file is created there, it contains the raw results from the benchmark.
Go to the <DRIVER>/reporter directory, copy the file Sample_Submission.txt under arbitraty name (e. g. Your_Submission.txt) and edit the copy, as described in SPECjAppServer2004 User's Guide :: Section 5 – Results, add the raw data from the result.props file.
Run the following command to generate an HTML benchmark report, it would be named Your_Submission.report.html:
Run the following command to generate a text-only benchmark report, it would be named Your_Submission.report.txt:
For the details on how yo submit your results, see SPECjAppServer2004 User's Guide :: Section 5.3 – Submitting the Results