Running EcPerf to measure performance of WebSphere Community Edition

So today we have decided to measure performance of the IBM WebSphere application Server Community Edition.

EcPerf has been selected as a standard J2EE performance measuring kit.

This application server from IBM is based on Apache Geronimo. So all the additional steps required to configure EcPerf to run on Apache Geronimo are quite the same. Detailed information on the difference between WAS CE and Apache Geronimo can be found here.

The first step is to populate database with the schema and initial data. PostgreSQL was used as a database. Execution of schema/sql/schema_C.sql script failed in one place. You’ll need to make the following replacement:

r_id        varchar(20) not null,
r_text      long varchar text

Once the database schema is created we can start building ecperf.ear and emulator.ear. So it’s necessary to create a separate src/geronimo folder based on src/reference folder.

In my case I was using JDK 1.6, so I had to specify source=”1.4″ target=”1.4″ in the ant target named compile. To make this working – the more recent version of ant is required, for example 1.7.1 worked fine.

Okay, compilation is successful and trying to load database data into PostgreSQL I get:

org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block

So go to src/com/sun/ecperf/load/ and do the following change:

public static void main(String [] argv) throws Exception {

Now all the data is uploaded successfully. Lets try to build application and deploy it. Build is fine and deploy gives the following error:

Unable to deploy: Unable to resolve resource reference ‘UtilDataSource’ (Could not auto-map to resource.  Try adding a resource-ref mapping to your Geronimo deployment plan.

Lets try to add all required datasources(UtilDataSource, CorpDataSource, OrdersDataSource, MfgDataSource, SupplierDataSource) via admin console. But still no success. It appeared that it’s required to have a special file in the application named geronimo-application.xml. It’s content is available below:

<app:application application-name="AppParent" xmlns:app="" xmlns:client="" xmlns:conn="" xmlns:dep="" xmlns:ejb="" xmlns:name="" xmlns:pers="" xmlns:pkgen="" xmlns:sec="" xmlns:web="">

And to have it bundled – you’ll need to change build.xml:

<property name="dd.application-specific" value="sun-j2ee-rigeronimo-application.xml">

Also it’s require to bundle xerces.jar into ecperf-ear and emulator-ear tasks to prevent ClassNotFoundException.

Okay deploying and seeing errors again

Unable to deploy: org.apache.openejb.OpenEJBException: Cannot unmarshall the ejb-jar.xml file: jar:file:/home/andy/Tools/wasce/var/temp/geronimo-deploymentUtil5319633835494891732.jar!/META-INF/ejb-jar.xml: unexpected element (uri:””, local:”small-icon”).

It appears that supplier.xml.BMP and supplier.xml.CMP have invalid declaration. So you’ll need to remove all “small-icon” and “large-icon” tags from it.

Deploying and everything works! But it’s only half of the way.  Now it’s necessary to configure agent.

So creating file in classpath and putting the following data there:


Starting the driver application and getting:

On client: java.lang.RuntimeException: Invalid response from server: -1
On server: ERROR remote “null  OEJ/0.0” FAIL “Unexpected error – For input string: “/””
java.lang.NumberFormatException: For input string: “/” 

It appears that client was using 3.1 version openejb-client while the server was expecting version 3.0.2 to be used. Okay, fixed.

What’s next…

NameNotFoundException: /WorkOrderSes does not exist in the system

Okay, iterating through the JNDI objects and we see WorkOrderSesRemoteHome. This time it’s required to change source code of EcPerf to add RemoteHome suffix.

Starting and WOW! It works!