I am not advocating the use of PreparedStatement instead of CallableStatement when it comes to stored procedures. IMHO, there are two possible philosophies one can follow:
1 - go to the most specialized class/interface that is optmized exactly for what you need for stored procedure-related operations -> implement the CallableStatement interface
2 - use the most generalized class/interface that fits the purpose of you current operation with the least redundancy (and least levels of inheritance resolution) -> implement the PreparedStatement interface.
In my projects, I am always using the CallableStatement.
Oh, yes. Almost forgot...there is, of course, no ResultStatement class in JDBC... I meant ResultSet.
My application's running The problem was I have 'db2driver.jar' in the classpath, but I haven't included `db2jcc.jar' that is necesary for execute stored procedures with Callable Statement. The db2jccc.jar contains the class SQLJPackage that I haven't.