When a remote object class is created that extends UnicastRemoteObject, the object is exported, meaning it can receive calls from external Java virtual machines and can be passed in an RMI call as either a parameter or return value. An object can either be exported on an anonymous port or on a specified port. For objects not extended from UnicastRemoteObject, the java.rmi.server.UnicastRemoteObject.exportObject method is used to explicitly export the object.
java.rmi.StubNotFoundExceptionClass of stub not found.
Name collision with class of same name as stub causes one of these errors:
Bad URL due to wrong codebase.
Stub not of correct class.
java.rmi.server.SkeletonNotFoundExceptionNote: this exception is deprecated as of Java 2 SDK, Standard Edition, v1.2
Class of skeleton not found.
Name collision with class of same name as skeleton causes one of these errors:
Bad URL due to wrong codebase.
Skeleton not of correct class.
java.rmi.server.ExportExceptionThe port is in use by another VM.
java.rmi.UnknownHostExceptionUnknown host.
java.rmi.ConnectExceptionConnection refused to host.
java.rmi.ConnectIOExceptionI/O error creating connection.
java.rmi.MarshalExceptionI/O error marshaling transport header, marshaling call header, or marshaling arguments.
java.rmi.NoSuchObjectExceptionAttempt to invoke a method on an object that is no longer available.
java.rmi.StubNotFoundExceptionRemote object not exported.
java.rmi.activation.ActivateFailedExceptionThrown by RMI runtime when activation fails during a remote call to an activatable object
java.rmi.UnmarshalExceptionCorrupted stream leads to either an I/O or protocol error when:
Return value class not found.
java.rmi.UnexpectedExceptionAn exception not mentioned in the method signature occurred (excluding runtime exceptions). The UnexpectedException exception object contains the underlying exception that was thrown by the server.
java.rmi.ServerErrorAny error that occurs while the server is executing a remote method. The ServerError exception object contains the underlying error that was thrown by the server.
java.rmi.ServerExceptionThis exception is thrown as a result of a remote method invocation when a RemoteException is thrown while processing the invocation on the server, either while unmarshalling the arguments or executing the remote method itself. For examples, see Section A.3.1, “Possible Causes of java.rmi.ServerException”.
java.rmi.ServerRuntimeExceptionNote: this exception is deprecated as of Java 2 SDK, Standard Edition, v1.2
This exception is not thrown by servers running Java 2 SDK, Standard Edition, v1.2-compatible versions. A RuntimeException is propagated to clients intact.
java.rmi.ServerExceptionThese are some of the underlying exceptions which can occur on the server when the server is itself executing a remote method invocation. These exceptions are wrapped in a java.rmi.ServerException; that is the java.rmi.ServerException contains the original exception for the client to extract. These exceptions are wrapped by ServerException so that the client will know that its own remote method invocation on the server did not fail, but that a secondary remote method invocation made by the server failed.
java.rmi.server.SkeletonMismatchExceptionNote: this exception is deprecated as of the Java 2 SDK, Standard Edition, v1.2
Hash mismatch of stub and skeleton.
java.rmi.UnmarshalExceptionjava.rmi.MarshalExceptionProtocol error marshaling return.
java.rmi.RemoteExceptionA RemoteException occurring as a result of a remote invocation by the server.
The following table lists the exceptions specified in methods of the java.rmi.Naming class and the java.rmi.registry.Registry interface.
java.rmi.AccessExceptionOperation disallowed. The registry restricts bind, rebind, and unbind to the same host. The lookup operation can originate from any host.
java.rmi.AlreadyBoundExceptionAttempt to bind a name that is already bound.
java.rmi.NotBoundExceptionAttempt to look up a name that is not bound.
java.rmi.UnknownHostExceptionAttempt to contact a registry on an unknown host.
The following table lists the exceptions that can be thrown in activities involving activatable objects. The activation API is in the package java.rmi.activation.
java.rmi.activation.ActivateFailedExceptionThrown by RMI runtime when activation fails during a remote call to an activatable object.
java.rmi.activation.ActivationExceptionGeneral exception class used by the activation interfaces and classes.
java.rmi.activation.UnknownGroupExceptionThrown by methods of the activation classes and interfaces when the ActivationGroupID parameter or ActivationGroupID in an ActivationGroupDesc parameter is invalid.
java.rmi.activation.UnknownObjectExceptionThrown by methods of the activation classes and interfaces when the ActivationID parameter is invalid.
java.rmi.RMISecurityExceptionNote: this exception is deprecated as of the Java 2 SDK, Standard Edition, v1.2
A security exception that is thrown by the RMISecurityManager.
java.rmi.server.ServerCloneExceptionClone failed.
java.rmi.server.ServerNotActiveExceptionAttempt to get the client host via the RemoteServer.getClientHost method when the remote server is not executing in a remote method.
java.rmi.server.SocketSecurityExceptionAttempt to export object on an illegal port.
Copyright © 1997, 2017, Oracle and/or its affiliates. All rights reserved.
CONTENTS | PREV | NEXT