File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Mapping java collections as In parameters to Varrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Mapping java collections as In parameters to Varrays" Watch "Mapping java collections as In parameters to Varrays" New topic

Mapping java collections as In parameters to Varrays

Raseswari Achanta
Ranch Hand

Joined: Sep 25, 2001
Posts: 30
Hello Guys,

I have a java programme passing input parameters to a procedure. These input parameters are of types string, long, and few collections. These collections are user defined objects. And the procedure returns 2 output parameters of type ref cursors.

And my procedure contains few remote procedures and I'm passing few input parameters(which are not collections) into the main remote procedure and as i said it returns errorset and resultset cursors. One cursor contains errorcode and error messages and the other cursor contains unique identifier.

Here I got 3 problems.

1. If the data what I'm passing inside the main procedure is correct, Unique identifier is available in one of the cursors and I need to retreive that Id and use it in some other remote procedures. I could able to insert the data through the remote procedure call if I dont try to fetch Id from a cursor. I couldn't able to fetch the unique identifier from the cursor.

The error when I'm trying to loop the cursor and fetch the Id is,
ORA-02055: distributed update operation failed; rollback required ORA-24338: statement handle not executed ORA-06512: at line 51

and when I click on the error code, I got the below message.


A failure during a distributed update operation may not have rolled back all effects of the operation. Since some sites may be

inconsistent with others, the transaction must roll back to a savepoint or roll back entirely.


Roll back to a savepoint or roll back the entire transaction and resubmit the rolled-back statements.

I didnt understand what is the error message imply.

2. Inside my procedure I'm passing few input parameters which are of type varray. I don't know how to pass java collection as IN parameters which map to varrays. I'm not quiet sure whether I can pass java collections to Varrays.

3. One of the field in one remote procedure is of type clob. Remote procedure call is not allowing me to pass data in to that clob field.

I'm not good at remote procedure calls and in calling stored procedures from java.

Any pointers for my above problems?

Thank You,
[ April 08, 2005: Message edited by: Bear Bibeault ]
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1141

The following Web page may be of help:

Good Luck,
Sridhar Garimella
Ranch Hand

Joined: Feb 18, 2000
Posts: 73
Hi Avi,

Thanks for your help..

The link which you have given is good.. But it didn't help me much.

I'm still investigating on the net for my problems. Still no clues. I require a solution to my problem ASAP to continue my work. Any small help will be appreciated.

Thanks in Advance,

Thanks,<br />Sridhar.
I agree. Here's the link:
subject: Mapping java collections as In parameters to Varrays
It's not a secret anymore!