Package java.rmi

Examples of java.rmi.UnmarshalException


        } catch (RemoteException re) {
            // rmi.69=RemoteException occured while unmarshalling arguments
            throw new ServerException(Messages.getString("rmi.69"), re); //$NON-NLS-1$
        } catch (IOException ioe) {
            // rmi.6A=IOException occured while unmarshalling arguments
            throw new UnmarshalException(Messages.getString("rmi.6A"), ioe); //$NON-NLS-1$
        } catch (ClassNotFoundException cnfe) {
            // rmi.6B=ClassNotFoundException occured while unmarshalling arguments
            throw new UnmarshalException(Messages.getString("rmi.6B"), cnfe); //$NON-NLS-1$
        } catch (Error er) {
            // rmi.6C=Error occured while unmarshalling arguments
            throw new ServerError(Messages.getString("rmi.6C"), er); //$NON-NLS-1$
        }
        return params;
View Full Code Here


                try {
                    toReturn = oin.readRMIObject(m.getReturnType(), null);
                } catch (IOException ioe) {
                    // rmi.70=IOException occured while unmarshalling return value
                    throw new UnmarshalException(Messages.getString("rmi.70"), ioe); //$NON-NLS-1$
                } catch (ClassNotFoundException cnfe) {
                    // rmi.71=ClassNotFoundException occured while unmarshalling return value
                    throw new UnmarshalException(Messages.getString("rmi.71"), cnfe); //$NON-NLS-1$
                }
            }
        } catch (IOException ioe) {
            ((ClientRemoteCall) call).close();
            throw ioe;
View Full Code Here

        try {
            // read input
            if ((data = (new DataInputStream(conn.getInputStream())).readByte())
                    != CALL_OK) {
                // rmi.39=Unknown call status response: {0}
                throw new UnmarshalException(Messages.getString("rmi.39", data)); //$NON-NLS-1$
            }

            // read return value id
            getInputStream();
            data = oin.readByte();
        } catch (UnmarshalException re) {
            throw re;
        } catch (IOException ioe) {
            // rmi.3A=Unable to read call return header:
            throw new UnmarshalException(Messages.getString("rmi.3A"), //$NON-NLS-1$
                    ioe);
        }

        if (data != RETURN_VAL && data != RETURN_EX) {
            // rmi.3B=Unknown call result response: {0}
            throw new UnmarshalException(Messages.getString("rmi.3B", data)); //$NON-NLS-1$
        }
        uid = UID.read(oin);

        if (data == RETURN_EX) {
            getExceptionFromServer();
View Full Code Here

        try {
            obj = oin.readObject();
        } catch (IOException ioe) {
            // rmi.3C=IOException occured while unmarshalling returned exception
            throw new UnmarshalException(Messages.getString("rmi.3C"), ioe); //$NON-NLS-1$
                   
        } catch (ClassNotFoundException cnfe) {
            // rmi.3D=ClassNotFoundException occured while unmarshalling returned exception
            throw new UnmarshalException(Messages.getString("rmi.3D"), cnfe); //$NON-NLS-1$
        }

        if (obj instanceof Exception) {
            Exception resEx = (Exception) obj;
View Full Code Here

            // read RMI header
            int header = din.readInt();

            if (header != RMI_HEADER) {
                // rmi.82=Unknown header: {0}
                throw new UnmarshalException(Messages.getString("rmi.82", header)); //$NON-NLS-1$
            }

            // read RMI protocol version
            short ver = din.readShort();

            if (ver != PROTOCOL_VER) {
                // rmi.83=Unknown RMI protocol version: {0}
                throw new UnmarshalException(Messages.getString("rmi.83", ver));//$NON-NLS-1$
            }
        } catch (IOException ioe) {
            // rmi.84=Unable to read RMI protocol header
            throw new UnmarshalException(Messages.getString("rmi.84"), //$NON-NLS-1$
                    ioe);
        }

        if (proxyTransportLog.isLoggable(RMILog.VERBOSE)) {
            // rmi.85=Using protocol version {0}
View Full Code Here

            // read RMI header
            int header = din.readInt();

            if (header != RMI_HEADER) {
                // rmi.82=Unknown header: {0}
                throw new UnmarshalException(Messages.getString("rmi.82", header)); //$NON-NLS-1$
            }

            // read RMI protocol version
            short ver = din.readShort();

            if (ver != PROTOCOL_VER) {
                // rmi.83=Unknown RMI protocol version: {0}
                throw new UnmarshalException(Messages.getString("rmi.83", ver)); //$NON-NLS-1$
            }
        } catch (IOException ioe) {
            // rmi.84=Unable to read RMI protocol header
            throw new UnmarshalException(Messages.getString("rmi.84"), //$NON-NLS-1$
                    ioe);
        }

        if (tcpTransportLog.isLoggable(RMILog.VERBOSE)) {
            // rmi.85=Using protocol version {0}
View Full Code Here

                try {
                    id = ObjID.read(oin);
                } catch (IOException ioe) {
                    // rmi.74=Unable to read Object ID
                    throw new UnmarshalException(Messages.getString("rmi.74"), //$NON-NLS-1$
                            ioe);
                }
                RMIObjectInfo info = ExportManager.getInfo(id);
                RemoteException exToReturn = null;
View Full Code Here

                } // never reached
            }

            // specially treating for an UnmarshalException
            if (org instanceof UnmarshalException) {
                UnmarshalException ume = (UnmarshalException)org;

                if (ume.detail instanceof ClassNotFoundException)
                    throw (ClassNotFoundException) ume.detail;

                /* In Sun's RMI implementation, if a method return
View Full Code Here

        try {
            final ClassLoader old = AccessController.doPrivileged(new SetCcl(cl));
            try {
                return wrappedClass.cast(mo.get());
            } catch (ClassNotFoundException cnfe) {
                throw new UnmarshalException(cnfe.toString(), cnfe);
            } finally {
                AccessController.doPrivileged(new SetCcl(old));
            }
        } catch (PrivilegedActionException pe) {
            Exception e = extractException(pe);
            if (e instanceof IOException) {
                throw (IOException) e;
            }
            if (e instanceof ClassNotFoundException) {
                throw new UnmarshalException(e.toString(), e);
            }
            logger.warning("unwrap", "Failed to unmarshall object: " + e);
            logger.debug("unwrap", e);
        }
        return null;
View Full Code Here

            Exception e = extractException(pe);
            if (e instanceof IOException) {
                throw (IOException) e;
            }
            if (e instanceof ClassNotFoundException) {
                throw new UnmarshalException(e.toString(), e);
            }
            logger.warning("unwrap", "Failed to unmarshall object: " + e);
            logger.debug("unwrap", e);
        }
        return null;
View Full Code Here

TOP

Related Classes of java.rmi.UnmarshalException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.