Examples of UnmarshalException


Examples of java.rmi.UnmarshalException

  integrity = MarshalledWrapper.integrityEnforced(in);
  if (hash == 0) {
      try {
    computeHash();
      } catch (Exception e) {
    throw new UnmarshalException("unable to calculate the type"
               + " hash for " + name, e);
      }
  }
    }
View Full Code Here

Examples of java.rmi.UnmarshalException

        if (op != -1) {
            // Using 1.1. RMI protocol version
            if (skel == null) {
                // rmi.65=Skeleton class not found.
                throw new UnmarshalException(Messages.getString("rmi.65")); //$NON-NLS-1$
            }
            String m = skel.getOperations()[op].toString();
            logServerCall(m);

            try {
                skel.dispatch((Remote) ref.get(), call, op, h);
            } catch (Throwable t) {
                Exception ex = prepareException(m, t);
                RMIObjectOutputStream oout =
                        (RMIObjectOutputStream) call.getResultStream(false);
                oout.writeObject(ex);
            }

            try {
                call.getOutputStream().flush();
            } catch (IOException ioe) {
            }
            return;
        }

        // Using 1.2 RMI protocol version
        Method m = (Method) remoteMethods.get(new Long(h));

        if (m == null) {
            // rmi.66=Method with hash = {0} not found.
            throw new UnmarshalException(Messages.getString("rmi.66", h)); //$NON-NLS-1$
        }
        logServerCall(m.toString());
        Object[] params = readParams(m, oin);
        call.releaseInputStream();
        Object toReturn = null;
View Full Code Here

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

Examples of java.rmi.UnmarshalException

                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

Examples of java.rmi.UnmarshalException

        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

Examples of java.rmi.UnmarshalException

        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

Examples of java.rmi.UnmarshalException

            // 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

Examples of java.rmi.UnmarshalException

            // 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

Examples of java.rmi.UnmarshalException

                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

Examples of java.rmi.UnmarshalException

                } // 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
TOP
Copyright © 2018 www.massapi.com. 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.