Today, I ran into an Oracle error that i hadn’t seen before

java.sql.SQLRecoverableException: IO Error: Size Data Unit (SDU) mismatch

Caused by: Size Data Unit (SDU) mismatch


Tomcat 7

JDK 1.6

Spring 3.x

Hibernate 4.x

Oracle 11 G


The fix:

I  tried swapping the JDBC driver with the older ojdbc14.jar and voila ! The real error was exposed : Good old

ORA-00942 (table or view does not exist)

Once I put the table in- everything works fine- with ojdbc14.jar as well ojdbc6.jar

No idea- why the newer driver was not throwing the more descriptive error message ?
Continue reading »


One of the most interesting problems I worked on was a deadlock between the JVM and the Database.

This blog post is a case-study of some sorts.
I will talk about the symptoms we saw, how we analysed the problem, and the solution.

Technologies involved
A J2EE web application running on Tomcat
Oracle Database

Remind me one more time – what is a deadlock ?
Deadlock happens when two (or more ) processes have acquired  a lock and are now waiting for the other process to release its lock first- before it can proceed further. Since each process would wait for the other process to complete first- it becomes a deadlock- i.e there is no way out unless someone intervenes.Oracle will immediately detect and  break the deadlock by killing one of the process, and I believe JVM also has a similar recovery process.

So what so special about this deadlock ?
When you have a deadlock across the two systems i.e one lock exists in the JVM and another lock in Oracle, it is impossible for either system to detect it- because they simply do not know about the existence of the other lock . Each system considers it as a uni-directional lock. Uni-directional locks aren’t a problem(generally). Deadlocks are . In our case, the lock in the JVM was by the usage of a synchronized block and the lock in Oracle was because of update on one table and a pending commit.  Both these locks would exist for ever. Why? Read on…
Continue reading »


The context

I am using Google App Engine using the  Grails AppEngine plugin . The default port is 8080, but I needed to run it on a different port.

It was easy to figure out that Google App Engine supports running the development server on any configured port. But it took me some time to realize that the  Grails AppEngine plugin that I am using doesn’t.

The fix:

Modify the \plugins\app-engine-0.8.5\scripts\AppEngine.groovy.

Continue reading »

© 2011 Technology Cafe Suffusion theme by Sayontan Sinha