Package java.rmi

Examples of java.rmi.MarshalException


        }
        if (ex instanceof NO_PERMISSION) {
            return new AccessException(ex.getMessage(), ex);
        }
        if (ex instanceof MARSHAL) {
            return new MarshalException(ex.getMessage(), ex);
        }
        if (ex instanceof UNKNOWN) {
            return new RemoteException(ex.getMessage(), ex);
        }
        return delegate.mapSystemException(ex);
View Full Code Here


      {
         log.debug(this, ex);
         throw new RuntimeException(ex);
      }
     
      throw new MarshalException(
         "Failed to communicate. Problem during marshalling/unmarshalling.", ex);
   }
View Full Code Here

         //TODO: -TME Add better exception handling for class not found exception
         log.error("Error loading classes from remote call result.", ex);
         throw (ClassNotFoundException)ex;
      }

      throw new MarshalException(
         "Failed to communicate. Problem during marshalling/unmarshalling.", ex);
   }
View Full Code Here

                                                http.getEncoding(),
                                                http.getLength());

            if (detail instanceof String) {
                if (((String)detail).indexOf("DataEncodingUnknown") != -1) {
                    throw new MarshalException((String)detail);
                } else {
                    throw new ServerException((String)detail);
                }
            } else {
                Object[] wrapper = (Object[])detail;
View Full Code Here

      Throwable t = invocationHandler.t;
      assertTrue(t instanceof HandleCallbackException);
      log.info("t.getCause:", t.getCause());
      if (t.getCause() instanceof MarshalException)
      {
         MarshalException e = (MarshalException) t.getCause();
         assertNotNull(e.getMessage());
         assertTrue(e.getMessage().startsWith("Failed to communicate.  Problem during marshalling/unmarshalling"));
         assertTrue(e.getCause() instanceof IOException);
         IOException ioe = (IOException) e.getCause();
         assertEquals("closed", ioe.getMessage());
      }
      else
      {
         assertTrue(t.getCause() instanceof CannotConnectException);
View Full Code Here

        }
        if (ex instanceof NO_PERMISSION) {
            return new AccessException(ex.getMessage(), ex);
        }
        if (ex instanceof MARSHAL) {
            return new MarshalException(ex.getMessage(), ex);
        }
        if (ex instanceof UNKNOWN) {
            return new RemoteException(ex.getMessage(), ex);
        }
        return delegate.mapSystemException(ex);
View Full Code Here

                    marshalValue(types[i], params[i], out);
                }
            } catch (IOException e) {
                clientRefLog.log(Log.BRIEF,
                    "IOException marshalling arguments: ", e);
                throw new MarshalException("error marshalling arguments", e);
            }

            // unmarshal return
            call.executeCall();
View Full Code Here

            RemoteCall call =
                new StreamRemoteCall(conn, ref.getObjID(), opnum, hash);
            try {
                marshalCustomCallData(call.getOutputStream());
            } catch (IOException e) {
                throw new MarshalException("error marshaling " +
                                           "custom call data");
            }
            return call;
        } catch (RemoteException e) {
            ref.getChannel().free(conn, false);
View Full Code Here

            id.write(out);               // object id (target of call)
            // call header, part 2 (read by Dispatcher)
            out.writeInt(op);            // method number (operation index)
            out.writeLong(hash);         // stub/skeleton hash
        } catch (IOException e) {
            throw new MarshalException("Error marshaling call header", e);
        }
    }
View Full Code Here

            ObjID id;

            try {
                id = ObjID.read(call.getInputStream());
            } catch (java.io.IOException e) {
                throw new MarshalException("unable to read objID", e);
            }

            /* get the remote object */
            Transport transport = id.equals(dgcID) ? null : this;
            Target target =
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.