Skip to Content
Former Member
Nov 03, 2006 at 01:35 PM

Problem passing data to Oracle Stored Procedures II


Hello @all,

I did lots of investigation since my last post in here.(see Problem passing data to Oracle StoredProcedures) But now I am in a vicious circle.

I tried to replace Oracles ArrayDescriptors and StructDescriptors with Standard JDBC Elements.

I have two types of UserDefinedTypes stored in the Database.

The first Type represents a normal object, the second is a table of the first type.

For example:

Type 1: Object with 3 attributes -> Type 2 Array of this object(declared as "Table of" in PL/SQL)

I created Javaclasses for both types which implement the SQLData interface.

Case 1: I put the simple type into the stored procedure -> it works

Case 2: I put the array into the storedprocedure with cs.setObject()

-> Error is ORA-01403: No Data Found

Case 3: I put the array into the storedprocedure with cs.setArray()

-> Error: java.lang.ClassCastException because Oracle internally casts my Array to oracle.sql.ARRAY, which needs an Oracle Connection, which I cannot use because I can't get directly from the ApplicationServer.

I also implemented the Interfaces java.sql.Struct for the simple type and java.sql.Array for the Table of the simple Type with the same result

Has anyone an idea how to solve my problem? I would prefer a solution where I can use the OracleConnection and make full use of Oracles Features.

Or is there a totally different approach? Will it work with NetWeaver AS 6.40?

Thanks in advance

Matthias Reizammer