0

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.??

3
  • The appserver is Websphere The name of the WAS related patch is 6.0.2.35 Earlier it was 6.0.2.17 Commented Nov 6, 2009 at 13:10
  • Sorry it wasnt an OS related patch as i said earlier. Commented Nov 6, 2009 at 13:17
  • Does your ejbstore() method call some other method that is doing the actual work? Commented Nov 6, 2009 at 20:40

1 Answer 1

4

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?

Sign up to request clarification or add additional context in comments.

3 Comments

The appserver is Websphere The name of the WAS related patch is 6.0.2.35 Earlier it was 6.0.2.17
Sorry it wasnt an OS related patch as i said earlier.
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.