Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> calling oracle (8i) stored procedures from Java
I have the following problem:
I have created a custom java class (financity.storage.User - which implements SQLData) and am trying to pass an instance of this class to a stored procedure as follows:
public static void saveUser( OracleConnection conn, financity.storage.User usr )
throws SQLException
{
CallableStatement cstmt = conn.prepareCall( "{call save_user(?)}" ); cstmt.setObject( 1, usr ); cstmt.executeUpdate();
I have mapped the class financity.storage.User to an oracle type as required, but at runtime I get the following exception:
java.sql.SQLException: Invalid column type: setObject
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:422) at
at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement
.java:1397)
at
financity.jdbc.DatabaseInterface.saveUser(DatabaseInterface.java:63)
at financity.jdbc.UserSession.createNewUser(UserSession.java:136) at testHarness.main(testHarness.java:21)
hmmmm .... not too sure what is going on here !?!? Thanks in advance. Received on Tue Aug 10 1999 - 08:34:31 CDT
![]() |
![]() |