Jmeter JSF client state

In order to know what kind of resources a new application needed I figured out to do a load test. The load testing software I used for this test is Apache Jmeter. The application to test is a Java based application deployed in Tomcat 6.

I used the Jmeter HTTP Proxy Recorder to simulate a normal user session to create a realistic test plan. Once I executed the test plan against the web application it returned Internal Server Error (Response code: 500). By using the “View Results Tree” Listener I was able to locate the problem as the Listener displays basic HTML and XML representations of the response.

[code lang=”text”]
javax.faces.application.ViewExpiredException: viewId:/presentation/task.jsf – View /presentation/task.jsf could not be restored.
[/code]

It appeared that the HTTP Proxy Recorder had recorded the server and client state. The javax.faces.ViewState field is written for both server and client side state saving. So removing this attribute from the sampler data makes Jmeter process the pages without error.

It took me a couple of hours to resolve this issue, hope this helps someone stumbling across the same.

Oracle RAC connect string for JDBC

For a Tomcat installation I needed to connect to a Oracle RAC database backend. I figured out the correct connection string, shown below:
[code lang=”text”]
jdbcUrl=”jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac01)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=rac02)(PORT=1521))(LOAD_BALANCE=on)(FAILOVER=on)(CONNECT_DATA=(SERVICE_NAME=orcl)))”
[/code]