Home » Developer & Programmer » JDeveloper, Java & XML » ORA-17059 Cannot convert to internal representation
ORA-17059 Cannot convert to internal representation [message #92726] Wed, 22 December 2004 23:31 Go to next message
Jan Tanis
Messages: 4
Registered: December 2004
Junior Member
I'm getting this error as I try to execute the java code below:

private STRUCT getSelCritRecord(Connection conn, String STRINGVALUE)throws SQLException{
StructDescriptor rec_in_desc = StructDescriptor.createDescriptor("TEST_RECORD", conn);
Object[[]] objectValues = new Object[[]]{ new Integer(1),"Google"};
STRUCT struct = new STRUCT(rec_in_desc, conn, objectValues);
return struct;
}

private STRUCT getSelCritTable(Connection conn, STRUCT rec)throws SQLException{
StructDescriptor tab_in_desc = StructDescriptor.createDescriptor("TEST_TABLE", conn);
Object[[]] objectValues = new Object[[]]{ rec };
STRUCT struct = new STRUCT(tab_in_desc, conn, objectValues);
return struct;
}

I'm getting the stacktrace when the last STRUCT is made (STRUCT struct = new STRUCT(tab_in_desc, conn, objectValues);)

The rec variable is a STRUCT which was created in the function above it.

The typedeclaration of the two used types are:

CREATE OR REPLACE TYPE TEST_RECORD AS OBJECT
(
ID INTEGER,
STRINGVALUE VARCHAR2(255)
)
/

CREATE OR REPLACE TYPE TEST_TABLE AS TABLE OF TEST_RECORD
/

I've searched all FAQ's and forums for a solution but didnt ran into something valueable.

Thnx in advance.
Re: ORA-17059 Cannot convert to internal representation [message #92729 is a reply to message #92726] Thu, 23 December 2004 00:54 Go to previous message
Jan Tanis
Messages: 4
Registered: December 2004
Junior Member
Solved with the help of a coworker: the tab struct should be an array.
Previous Topic: Urgent Questions for JDBC
Next Topic: Where I can download classes12.zip API
Goto Forum:
  


Current Time: Fri Apr 26 19:42:59 CDT 2024