RMI over IIOP

RMI over IIOP

Post by W Barksda » Tue, 11 Jul 2000 04:00:00



Hi,

I am working on an RMI over IIOP client/server. The client sends an SQL select
to the server whick uses jdbc to query a database, the resultset returnde by
the database is packed in a nested Vector and returned to the client.

Here's some code

client
..
        String query = "Select userid, userpwd, usernum, homeCity, wkstart,
hour from users where userid = '" + userID + "'";
        try{

        Vector rs = getUser.pc.dbc.dbConnection(query);
..

interface

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.*;
import java.io.Serializable;

public interface dbConnection extends Serializable,Remote
//public interface dbConnection extends Remote
{
        Vector dbConnection(String query) throws RemoteException;

Quote:}

server
        public Vector dbConnection(String query) {
                try {
                        dbConnectionStmt = con1.createStatement();
                        ResultSet rs = dbConnectionStmt.executeQuery(query);

                        ResultSetMetaData meta = rs.getMetaData();
                        int columnCount = meta.getColumnCount();

                        Vector rsRows = new Vector();
                        while (rs.next()) {
                                Vector newRsRow = new Vector();
                                for (int i = 1; i <= columnCount; i++) {

newRsRow.addElement(rs.getObject(i));
                                }
                                rsRows.addElement(newRsRow);
                        }
                        dbConnectionStmt.close();

                        return rsRows;

                }catch( Exception e ) {
                        System.out.println("An exception was thrown in
dbConnection -> " + e.getMessage());
//                      e.printStackTrace();
                }
                return null;
        }

Everything works as it should until we get to the retun vector. It generates
this error message.

CORBA MARSHAL 0 No;
nested exception is:
org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : null  
minor code: 0  completed: No

This is my first  RMI over IIOP and I'm probably missing something simple.

By the way the server is running on RedHat 6.2 with Oracle 8i and jdk 1.2 beta
The client is running on win98.

Thanks In Advance

Wayne

 
 
 

1. EJB's, RMI, IIOP

   Hey all... I'm just curious but is there any way to call external
programs via RMI from an EJB within Oracle?
How about within a java stored procedure?

I've read through a bit of documentation but I can't seem to find the
answer.

Dave

2. help!!

3. RMI-RMI-RMI ?????

4. concurrency on btrees

5. IIOP Connection Oracle 8i please help

6. Backup Problem

7. IIOP + service_update

8. Incorrect Column Number

9. IIOP connection to 8.1.7

10. iiop and linux

11. Advice on servelts / IIOP / ORB / JDBC

12. Listeners for IIOP Clients

13. 8i <- IIOP -> Java Client Problem