Version 15

    JBoss SPECjAppServer2002 Setup Instructions


    This document will guide you through the SPECjAppServer2002 setup process for JBoss-3.2.x server. For JBoss-4.0 when executing the script to create specj configuration just use jboss40.xml instead of jboss32.xml, correct JAVAX_JAR path to servlet classes in jboss32.env (see the comment in jboss32.env) and datasource deployment descriptor.


    1. Install the standard SPECjAppServer2002

    2. JBoss SPECjAppServer2002 Kit

    3. Setup the database

    4. Adjust environment variables

    5. Create specj server and deploy the benchmark

    6. Build the driver

    7. Load the data into the database

    8. Start the JBoss and run the benchmark


    Install the standard SPECjAppServer2002


    Install the SPECjAppServer2002 kit to create a SPECjAppServer2002 directory. FAQ, user's guide and design information can be found on the SPECjAppServer2002 site.


    JBoss SPECjAppServer2002 Kit


    The JBoss SPECjAppServer2002 kit contains JBoss-specific configuration files and scripts that help you to setup the benchmark to run in the JBoss server. The kit is available for 


    downloaded from the JBoss CVS at

    Use the following CVS command to check out the kit:

    $ cvs -z3 co specj


    This will create specj directory under which you'll find SPECjAppServer2002 directory with JBoss-specific configuration and script files.

    The specj/SPECjAppServer2002 contains




    defines various environment variables


    contains logging configuration and will be copied to JBOSS_HOME/server/specj/conf as log4j.xml


    defines various services that should be available to run the benchmark and will be copied to JBOSS_HOME/server/specj/conf as jboss-service.xml. XX is a JBoss version, i.e. 32 or 40


    defines standard EJB containers for the benchmark and will be copied to JBOSS_HOME/server/specj/conf as standardjboss.xml,,,

    are identical to those that are distributed with the standard SPECjAppServer2002 kit but add properties for MySql

    jbossXX-mysql-ds.xml, jbossXX-oracle-ds.xml

    datasource configurations for the benchmark, one of them will be copied to JBOSS_HOME/server/specj/deploy. XX is a JBoss version, i.e. 32 or 40


    configures cache listeners for entity beans, this is used for profiling and will not be copied to JBOSS_HOME/server/specj/deploy by default



    DDL files for MySql



    contains JBoss-specific deployment descriptors


    Java source files that will be copied to the src directory to the standard SPECjAppServer2002/src directory


    creates specj JBoss server configuration and deploys the benchmark. XX is a JBoss version, i.e. 32 or 40.


    Copy the contents of JBoss kit specj/SPECjAppServer2002 to the standard SPECjAppServer2002 directory adding/replacing files.


    Setup The Database


    Go to SPECjAppServer2002/schema directory and use the database product-specific setup scripts to create the database schema.


    Adjust Environment Variables


    Go to SPECjAppServer2002 directory.



    • instead of ri.1.3.1 write jboss32




    • JAS_HOME should point to the directory SPECjAppServer2002 was installed in

    • JAVA_HOME should point to the JDK directory

    • J2EE_HOME is the directory the JBoss server was installed in

    • JDBC_CLASSPATH should include the JDBC driver, this is used to load initial data to the database before running the benchmark

    • datasource is a JNDI name of the DataSource for entity beans, the default is java:/DefaultDS and should not normally be changed

    • datasource-mapping is a type-mapping name defined in standardjbosscmp-jdbc.xml, default is Oracle9i, so, change it if you are using a different database

    • ds.xml is a name of one of the datasource configuration -ds.xml files in the SPECjAppServer2002/config directory that will be copied to the $J2EE_HOME/server/specj/deploy


    Change other properties such as JAS_HOST, JAS_PORT, JAS_PREFIX, EMULATOR_HOST, EMULATOR_PORT, EMULATOR_PREFIX as appropriate (see SPECjAppServer2002 documentation).




    Set APPSSERVER to jboss32 and JAVA_HOME and JAS_HOME as appropriate.




    Set APPSSERVER to jboss32 and JAVA_HOME and JAS_HOME as appropriate.


    Create specj Server And Deploy The Benchmark


    Go to SPECjAppServer2002 directory and execute

    $ANT_HOME/bin/ant -buildfile jboss32.xml deploy-all


    For JBoss-4.0 execute the following

    $ANT_HOME/bin/ant -buildfile jboss40.xml deploy-all


    This will create a specj server configuration in $J2EE_HOME/server/specj directory and deploy the benchmark (emulator.ear and SPECjAppServer.ear).


    Note 1: there is one thing you should do yourself, i.e. copy the JDBC driver to the $J2EE_HOME/server/specj/lib directory.


    Note 2: I had to use a newer ANT version than the one that is distributed with the SPECjAppServer2002.


    Build The Driver



    $ANT_HOME/bin/ant -Dappserver=jboss32 driver


    to compile the benchmark driver.


    Load Initial Data Into The Database



    $ANT_HOME/bin/ant -Dappserver=jboss32 loaddb


    Start JBoss And Run The Benchmark


    To start JBoss go to $J2EE_HOME/bin and execute

    run -c specj


    To run the benchmark go to SPECjAppServer2002/bin and execute



    Oh! And, please, don't forget to let us know your experience!



    Known issues


    Oracle: Invalid type conversion error


    Running the benchmark you might see exceptions about invalid type conversion for field qty. This field is of type short. The problem is the JDBC/SQL type mapping. Open standardjbosscmp-jdbc.xml file and find mapping for java.lang.Short in Oracle9i type-mapping. There are two variants of jdbc-type mapping: NUMERIC and SMALLINT. If one does not work for you then try the other one.

    In my experience, NUMERIC works for Oracle9i and SMALLINT for Oracle 10g. But it, probably, depends on the driver you use.



    Unix: Cannot load the driver


    If you are using Linux/Unix, make sure that jboss32.env has : instead of ; in the definition of the Classpath. The error message displayed is fuzzy and could make you confused.







    You might want to edit the files under $JAS_HOME to set the output directory for the run. It defaults to /SPECjAppserver2002/output; which probably doesn't exist (or isn't writable) on your unix system!


      Livin Stephen --Wednesday_March-29-2006_IST