Package java.rmi

Examples of java.rmi.MarshalException


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


        try {
            TypeRepository rep = RMIState.current().getTypeRepository();
            CopyState state = new CopyState(rep);
            return state.copy(obj);
        } catch (CopyRecursionException ex) {
            throw new MarshalException("unable to resolve recursion", ex);
        } catch (org.omg.CORBA.SystemException ex) {
            throw mapSystemException(ex);
        }

    }
View Full Code Here

            TypeRepository rep = RMIState.current().getTypeRepository();
            CopyState state = new CopyState(rep);
            try {
                return (Object[]) state.copy(objs);
            } catch (CopyRecursionException ex) {
                throw new MarshalException("unable to resolve recursion", ex);
            }

            /*
             * int length = objs.length;
             *
 
View Full Code Here

        } else if (copyWithinState) {
            CopyState state = new CopyState(getTypeRepository());
            try {
                return state.copy(result);
            } catch (CopyRecursionException e) {
                throw new MarshalException("cannot copy recursive value?");
            }
        }

        return result;
    }
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

         log.error("Error loading classes from remote call result.", ex);
         throw (ClassNotFoundException) ex;
      }
      else if (ex instanceof SocketTimeoutException)
      {
         throw new MarshalException("Socket timed out.  Waited " + socketWrapper.getTimeout() + " milliseconds for response while calling on " +
                                    getLocator(), ex);
      }
      else if (ex instanceof InterruptedException && isWrapInterruptedException())
      {
         log.debug(this, ex);
         throw new RuntimeException(ex);
      }
     
      throw new MarshalException("Failed to communicate.  Problem during marshalling/unmarshalling", ex);

   }
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

         log.error("Error loading classes from remote call result.", ex);
         throw (ClassNotFoundException) ex;
      }
      else if (ex instanceof SocketTimeoutException)
      {
         throw new MarshalException("Socket timed out.  Waited " + socketWrapper.getTimeout() + " milliseconds for response while calling on " +
                                    getLocator(), 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

        }
        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

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.