Monthly Archives: August 2011

Commons HTTPClient 3.1 and 401 Unauthorized Error

Commons http client is a library provides the client-side implementation of most of the HTTP standards and recommendations. It is mainly used while building HTTP aware client applications such as web browsers, web service clients etc.

Recently while accessing the sql server reporting services, we faced an authentication error on one of the client environments. The stacktrace found was as below

2011-08-10 03:17:12,868 INFO  [http-8080-2]( - Unable to sendViaPost to url[http://machine-name/ReportServer/ReportService2005.asmx]
org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
at org.apache.axis2.transport.http.HTTPSender.handleResponse(
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(
at org.apache.axis2.transport.http.HTTPSender.send(
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
at org.apache.axis2.engine.AxisEngine.send(
at org.apache.axis2.description.OutInAxisOperationClient.send(
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
at org.apache.axis2.client.OperationClient.execute(

Read the rest of this entry

Difference between Performance and Scalability of a Web Application

Below is the definition of these two terms and the difference between them


Raw speed of your application in terms of a single user. How long does a single application-level operation take?

When we talk about performance of an operation such as clicking on the confirm button for booking a flight ticket, we are interested in the end-to-end time required to complete that operation. In other words, the clock starts ticking when the user clicks the button and stops ticking when the user sees the information delivered.


The challenge to deal with large audiences and high demand is termed as the problem of scalabilty. More specifically, we say that a Web appli cation can scale if it continues to be available and functional at consistent speeds as the number of users and requests continues to grow, even to very high numbers. Note that this definition has nothing to do with performance. As long as a slow application continues to provide consistent performance in the wake of rising demand, it is classified as scalable!

Although scalability is commonly defined strictly as a measurement of resiliency under ever-increasing user load, nobody expects a single instance of an application server on a single machine to accommodate millions of users. Often people consider how well an application can scale up” by describing how effective it is to add resources, such as more CPUs, more memory, or more disks. An application is considered to scale up well if it requires additional resources at a low rate.

InfoQ Video – Learnings From Five Years As Skype Architect

I came through this interesting video where Andres Kutt as a architect at Skype talks about his learnings while being a part of the architecture team. His presentation is categorized in two sections – technical and non technical learnings. He starts off mentioning that non-technical learnings are more important then technical ones :). Some of the highlights are

Read the rest of this entry

Enabling Trace On Oracle Client

Tracing produces a detailed sequence of statements that describe network events as they are run. Tracing an operation enables you to obtain more information about the internal operations of the components of Oracle Net Services than is provided in a log file.

Each Oracle Net Services component produces its own trace file. To enable tracing on the oracle client, the configuration file which needs to be modified is sqlnet.ora. This file can be found in ORACLE_HOME\network\admin directory.

Oracle Net Manager is a component/tool installed while installing Oracle client. It enables you to configure Oracle Net Services for an Oracle home on a local client or server host.

Read the rest of this entry

Checking Oracle Client Version On Windows

As most of us know, an oracle client software needs to be installed on every machine which wants to connect to an oracle database server remotely. Oracle Client for 11g release 1 can be downloaded from here and the release 2 patch for windows can be downloaded from here.

There would be times when you want to verify the client version installed. Checking the about version popup of one of the configuration tools like Oracle Net Manager doesn’t help much since it doesn’t detail out on the patch version number.

The client version could be verified by executing SQL*Plus but depending on how the installation was done, this client tool may not be installed. Executing tnsping command seems to be sure-shot way to assert the client version since this tool is installed regardless of the install options chosen and this does not change with the release of Oracle client.

Read the rest of this entry

Autogenerated Keys with Oracle JDBC Driver

JDBC 3.0’s autogenerated keys feature provides a way to retrieve values from columns that are part of an index or have a default value assigned. The method Statement.getGeneratedKeys can be called to retrieve the value of such a column. This method returns a ResultSet object with a column for each automatically generated key. Calling ResultSet.getMetaData on the ResultSetobject returned by getGeneratedKeys produces a ResultSetMetaData object that can be used to determine the number, type, and properties of the generated keys. A flag indicating that any auto-generated columns should be returned is passed to the methods executeexecuteUpdate, or prepareStatement when the statement is executed or prepared.

Read the rest of this entry

Database Protocol Packet Size and Performance

The Data Access Handbook points out that the size of the database protocol packet is an important factor for the database application performance. Each database vendor defines a protocol for communication with the database system, a format that only that database system understands. For example Microsoft SQL Serveruses communication encoded with the Tabular Data Stream (TDS) protocol, IBM DB2 uses communication encoded with the Distributed RelationalDatabase Architecture (DRDA) protocol and Oracle defines Oracle Net.

Read the rest of this entry