tags:

views:

85

answers:

1

I have a curious issue here

In my ejbCreate() method from where i insert the front-end populated field vales into the database , there is Null checking done, so the nullable fields are converted to ""(empty space) fields and the row is inserted properly into the Database.

Now my ejbstore() method doesnt have the same null checking so it always used to throw a "java.sql.SQLException" but the following catch (java.sql.SQLException e) used to catch it and the application was running fine.

Now there is a new Patch added to the Unix box(my OS), now the same exception is not been caught in the "catch (java.sql.SQLException e) block", instead its falling under generic "Exception block", so my code is throwing a "CORBA related NullPointerexception" and the application crashes.

Can anybody let know how does a OS patch can change the Java exception Type hierarchy.??

+4  A: 

I wonder whether there is some bizarre classloader issue going on.

Remember that two classes are only the "same" if they are the same class and are loaded by the same class loader.

If the component throwing SQLExcpetion loads it from one classloader, and your component loads it from somewhere else then I suspect you could get this effect.

Hence, could the OS patch have affected the JDBC drivers or the classpath from which they are loaded? Or could the OS patch have put a copy of SQLException somewhere new. Or could the OS patch have set an environment variable that affects the Classpath for some components?

djna
The appserver is WebsphereThe name of the WAS related patch is 6.0.2.35Earlier it was 6.0.2.17
Gourav
Sorry it wasnt an OS related patch as i said earlier.
Gourav
Then my classloader idea is quite likely right. WAS does have some power, flexible classloader features, and with great power comes great gnarliness. You should raise a PMR with IBM. Also you can investigate classloaders through the admin console and via verbose trace.
djna