Package java.rmi

Examples of java.rmi.UnmarshalException


    activator.activate(this, force);
       return mobj.get();
   } catch (RemoteException e) {
       throw e;
   } catch (IOException e) {
       throw new UnmarshalException("activation failed", e);
   } catch (ClassNotFoundException e) {
       throw new UnmarshalException("activation failed", e);
  }
 
    }
View Full Code Here


       throwArray[2] =
     new ConnectIOException("ConnectIOException");
       throwArray[1] =
     new RemoteException("RemoteException");
       throwArray[0] =
     new UnmarshalException("UnmarshalException");

       return throwArray;
    }
View Full Code Here

       /* 02) any instance of java.rmi.UnmarshalException in which the
          value of the exception's detail field is an instance of
          java.io.ObjectStreamException */
       badInvException02 =
     new UnmarshalException("LeaseExpirationTest",
      new StreamCorruptedException("LeaseExpirationTest"));
       badInvOwner02 =
     new FailingOpCountingOwner(badInvException02, 0, renewGrant);

       /* 03) any instance of java.rmi.ServerException in which the
View Full Code Here

     */
    private static UnusableEntryException throwNewUnusableEntryException(
            String msg, Exception nested)
  throws UnusableEntryException
    {
  final UnmarshalException ue = new UnmarshalException(msg, nested);
  final UnusableEntryException uee = new UnusableEntryException(ue);

  if (logger.isLoggable(Levels.FAILED)) {
      logger.log(Levels.FAILED, msg, uee);
  }
View Full Code Here

       throwArray[2] =
     new ConnectIOException("ConnectIOException");
       throwArray[1] =
     new RemoteException("RemoteException");
       throwArray[0] =
     new UnmarshalException("UnmarshalException");

       return throwArray;
    }
View Full Code Here

      typeHashes.put(className, new Long(value));
      return false// new class
  } else {
      if (hash.longValue() != value) {
    final String msg = "Class mismatch: " + className;
    final UnmarshalException ue = new UnmarshalException(msg);
    opsLogger.log(Levels.FAILED, msg, ue);
    throw ue;
      }
  }
  return true;    // match
View Full Code Here

     */
    private UnmarshalException brokenTxn(TransactionManager mgr, long id,
           Exception nested)
  throws UnmarshalException
    {
  final UnmarshalException ue = new UnmarshalException(
            "Outrigger has a transaction with this id(" + id + "), but can't" +
      "unmarshal its copy of manager to confirm it is the same " +
      "transaction",
      nested);
 
View Full Code Here

      return null;

  default:
      // REMIND: close the response input stream?
      // REMIND: Do we really want this failure mode here?
      return new UnmarshalException("unexpected invocation status: " +
            Integer.toHexString(status));
  }
    }
View Full Code Here

  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

        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

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.