开发者

Java Exception Hierarchy problem

开发者 https://www.devze.com 2022-12-10 05:23 出处:网络
I have a curious issue here In myejbCreate() method from where iinsert the front-end populated field vales into the database , there is Null checking done, so the nullable fields are converted to \"\

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


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消