Package java.rmi

Examples of java.rmi.MarshalException


  serviceType = stb.type;
  codebase = stb.codebase;
  try {
      service = new MarshalledObject(svc);
  } catch (IOException e) {
      throw new MarshalException("error marshalling arguments", e);
  }
  attributeSets = EntryRep.toEntryRep(item.attributeSets, true);
    }
View Full Code Here


    if (f.marshal && val != null)
        val = new MarshalledObject(val);
    fields[i] = val;
      }
  } catch (IOException e) {
      throw new MarshalException("error marshalling arguments", e);
  } catch (IllegalAccessException e) {
      throw new MarshalException("error marshalling arguments", e);
  }
    }
View Full Code Here

    if (f.marshal && val != null)
        val = new MarshalledWrapper(val);
    fields[i] = val;
      }
  } catch (IOException e) {
      throw new MarshalException("error marshalling arguments", e);
  } catch (IllegalAccessException e) {
      throw new MarshalException("error marshalling arguments", e);
  }
    }
View Full Code Here

  if (clazz != Object.class)
      this.interfaces = interfaces;
  try {
      computeHash();
  } catch (Exception e) {
      throw new MarshalException("unable to calculate the type hash for "
               + name, e);
  }
    }
View Full Code Here

      byte[] digest = md.digest();
      for (int i = Math.min(8, digest.length); --i >= 0; ) {
    hash += ((long) (digest[i] & 0xFF)) << (i * 8);
      }
  } catch (Exception e) {
      throw new MarshalException("Unable to calculate type hash for "
               + name, e);
  }
    }
View Full Code Here

    /** Construct, log, and throw a new MarshalException */
    private static MarshalException throwNewMarshalException(
      String msg, Exception nested)
  throws MarshalException
    {
  final MarshalException me = new MarshalException(msg, nested);
  if (logger.isLoggable(Levels.FAILED)) {
      logger.log(Levels.FAILED, msg, me);
  }

  throw me;
View Full Code Here

    catch (Exception caught) {
      assertEquals(ex, caught);
    }

    // Subclass of RemoteException
    ex = new MarshalException("");
    try {
      proxied.echoException(1, ex);
      fail();
    }
    catch (MarshalException caught) {
View Full Code Here

         {
            throw new EJBException("UnmarshalException", e);
         }
         else
         {
            throw new MarshalException("MarshalException", e);
         }
      }
      finally
      {
         if (m != null)
View Full Code Here

                        throw (IOException) wae.detail;
                }
            } else if (org instanceof MarshalException) {
                // IIOP will throw MarshalException wrapping a NotSerializableException
                // when a server fails to serialize a response.
                MarshalException me = (MarshalException)org;
                if (me.detail instanceof NotSerializableException) {
                    throw (NotSerializableException)me.detail;
                }
            }
View Full Code Here

        String message = "CORBA " + corbaName + " " + ex.minor + " " + status;

        // Now map to the correct RemoteException type...
        if (ex instanceof COMM_FAILURE) {
            return new MarshalException(message, ex);
        } else if (ex instanceof INV_OBJREF) {
            RemoteException newEx = new NoSuchObjectException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof NO_PERMISSION) {
            return new AccessException(message, ex);
        } else if (ex instanceof MARSHAL) {
            return new MarshalException(message, ex);
        } else if (ex instanceof OBJECT_NOT_EXIST) {
            RemoteException newEx = new NoSuchObjectException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof TRANSACTION_REQUIRED) {
            RemoteException newEx = new TransactionRequiredException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof TRANSACTION_ROLLEDBACK) {
            RemoteException newEx = new TransactionRolledbackException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof INVALID_TRANSACTION) {
            RemoteException newEx = new InvalidTransactionException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof BAD_PARAM) {
            Exception inner = ex;

            // Pre-Merlin Sun ORBs used the incorrect minor code for
            // this case.  See Java to IDL ptc-00-01-08 1.4.8.
            if (ex.minor == ORBConstants.LEGACY_SUN_NOT_SERIALIZABLE ||
                ex.minor == OMGSystemException.NOT_SERIALIZABLE) {

                if (ex.getMessage() != null)
                    inner = new NotSerializableException(ex.getMessage());
                else
                    inner = new NotSerializableException();

                inner.initCause( ex ) ;
            }

            return new MarshalException(message,inner);
        } else if (ex instanceof ACTIVITY_REQUIRED) {
            try {
                Class cl = ORBClassLoader.loadClass(
                               "javax.activity.ActivityRequiredException");
                Class[] params = new Class[2];
View Full Code Here

TOP

Related Classes of java.rmi.MarshalException

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.