Package java.rmi

Examples of java.rmi.MarshalException


                Class rtype = method.getReturnType();
                if (rtype != void.class) {
                    marshalValue(rtype, result, out);
                }
            } catch (IOException ex) {
                throw new MarshalException("error marshalling return", ex);
                /*
                 * This throw is problematic because when it is caught below,
                 * we attempt to marshal it back to the client, but at this
                 * point, a "normal return" has already been indicated,
                 * so marshalling an exception will corrupt the stream.
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);
      }

      // Put socket back in pool for reuse
      synchronized(pool)
      {
View Full Code Here

     */
    private void writeObject(ObjectOutputStream out)
            throws IOException {
        if (ref == null) {
            // rmi.17=Invalid remote object: RemoteRef = null
            throw new MarshalException(Messages.getString("rmi.17")); //$NON-NLS-1$
        }
        String refType = ref.getRefClass(out);

        if (refType != null && refType.length() != 0) {
            out.writeUTF(refType);
View Full Code Here

                        oout.writeRMIObject(params[i], paramTypes[i]);
                    }
                }
            } catch (IOException ioe) {
                // rmi.6F=I/O error occurred while marshalling arguments
                throw new MarshalException(Messages.getString("rmi.6F"), ioe); //$NON-NLS-1$
            }

            // execute the call
            invoke(call);
View Full Code Here

            oout.writeLong(hash);
            return call;
        } catch (IOException ioe) {
            done(call);
            // rmi.72=Unable to marshal call header
            throw new MarshalException(Messages.getString("rmi.72"), ioe); //$NON-NLS-1$
        }
    }
View Full Code Here

     */
    private void writeObject(ObjectOutputStream out)
            throws IOException {
        if (ref == null) {
            // rmi.17=Invalid remote object: RemoteRef = null
            throw new MarshalException(Messages.getString("rmi.17")); //$NON-NLS-1$
        }
        String refType = ref.getRefClass(out);

        if (refType != null && refType.length() != 0) {
            out.writeUTF(refType);
View Full Code Here

                        oout.writeRMIObject(params[i], paramTypes[i]);
                    }
                }
            } catch (IOException ioe) {
                // rmi.6F=I/O error occurred while marshalling arguments
                throw new MarshalException(Messages.getString("rmi.6F"), ioe); //$NON-NLS-1$
            }

            // execute the call
            invoke(call);
View Full Code Here

            oout.writeLong(hash);
            return call;
        } catch (IOException ioe) {
            done(call);
            // rmi.72=Unable to marshal call header
            throw new MarshalException(Messages.getString("rmi.72"), ioe); //$NON-NLS-1$
        }
    }
View Full Code Here

                Class rtype = method.getReturnType();
                if (rtype != void.class) {
                    marshalValue(rtype, result, out);
                }
            } catch (IOException ex) {
                throw new MarshalException("error marshalling return", ex);
                /*
                 * This throw is problematic because when it is caught below,
                 * we attempt to marshal it back to the client, but at this
                 * point, a "normal return" has already been indicated,
                 * so marshalling an exception will corrupt the stream.
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

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.