Remote exceptions in java

Содержание
  1. A Exceptions In RMI
  2. java.rmi.StubNotFoundException
  3. java.rmi.server.SkeletonNotFoundException
  4. java.rmi.server.ExportException
  5. A.2 Exceptions During RMI Call
  6. java.rmi.UnknownHostException
  7. java.rmi.ConnectException
  8. java.rmi.ConnectIOException
  9. java.rmi.MarshalException
  10. java.rmi.NoSuchObjectException
  11. java.rmi.StubNotFoundException
  12. A.3 Exceptions or Errors During Return
  13. java.rmi.UnmarshalException
  14. java.rmi.UnexpectedException
  15. java.rmi.ServerError
  16. java.rmi.ServerException
  17. java.rmi.ServerRuntimeException
  18. A.3.1 Possible Causes of java.rmi.ServerException
  19. java.rmi.server.SkeletonMismatchException
  20. java.rmi.UnmarshalException
  21. java.rmi.MarshalException
  22. java.rmi.RemoteException
  23. A.4 Naming Exceptions
  24. java.rmi.AccessException
  25. java.rmi.AlreadyBoundException
  26. java.rmi.NotBoundException
  27. java.rmi.UnknownHostException
  28. A.5 Activation Exceptions
  29. A.6 Other Exceptions
  30. java.rmi.RMISecurityException
  31. java.rmi.server.ServerCloneException
  32. java.rmi.server.ServerNotActiveException
  33. java.rmi.server.SocketSecurityException
  34. Remote exceptions in java
  35. Field Summary
  36. Constructor Summary
  37. Method Summary
  38. Methods declared in class java.lang.Throwable
  39. Methods declared in class java.lang.Object
  40. Field Detail
  41. detail
  42. Constructor Detail
  43. RemoteException
  44. RemoteException
  45. RemoteException
  46. Method Detail
  47. getMessage
  48. getCause
  49. Remote exceptions in java
  50. Field Summary
  51. Constructor Summary
  52. Method Summary
  53. Methods inherited from class java.lang.Throwable
  54. Methods inherited from class java.lang.Object
  55. Field Detail
  56. detail
  57. Constructor Detail
  58. RemoteException
  59. RemoteException
  60. RemoteException
  61. Method Detail
  62. getMessage
  63. getCause

A Exceptions In RMI

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.StubNotFoundException

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.SkeletonNotFoundException

Note: 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.ExportException

The port is in use by another VM.

A.2 Exceptions During RMI Call

java.rmi.UnknownHostException

java.rmi.ConnectException

Connection refused to host.

java.rmi.ConnectIOException

I/O error creating connection.

java.rmi.MarshalException

I/O error marshaling transport header, marshaling call header, or marshaling arguments.

java.rmi.NoSuchObjectException

Attempt to invoke a method on an object that is no longer available.

java.rmi.StubNotFoundException

Remote object not exported.

A.3 Exceptions or Errors During Return

java.rmi.UnmarshalException

Corrupted stream leads to either an I/O or protocol error when:

  • Marshaling return header
  • Checking return type
  • Checking return code
  • Unmarshaling return
Читайте также:  What is csv file in php

Return value class not found.

java.rmi.UnexpectedException

An 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.ServerError

Any 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.ServerException

This 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.ServerRuntimeException

Note: 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.

A.3.1 Possible Causes of java.rmi.ServerException

These 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.SkeletonMismatchException

Note: this exception is deprecated as of the Java 2 SDK, Standard Edition, v1.2

Hash mismatch of stub and skeleton.

java.rmi.UnmarshalException

  • I/O error unmarshaling call header.
  • I/O error unmarshaling arguments.
  • Invalid method number or method hash.

java.rmi.MarshalException

Protocol error marshaling return.

java.rmi.RemoteException

A RemoteException occurring as a result of a remote invocation by the server.

A.4 Naming Exceptions

The following table lists the exceptions specified in methods of the java.rmi.Naming class and the java.rmi.registry.Registry interface.

java.rmi.AccessException

Operation disallowed. The registry restricts bind, rebind, and unbind to the same host. The lookup operation can originate from any host.

Читайте также:  Location object in javascript

java.rmi.AlreadyBoundException

Attempt to bind a name that is already bound.

java.rmi.NotBoundException

Attempt to look up a name that is not bound.

java.rmi.UnknownHostException

Attempt to contact a registry on an unknown host.

A.5 Activation Exceptions

The Activation mechanism has been removed from the system.

A.6 Other Exceptions

java.rmi.RMISecurityException

Note: 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.ServerCloneException

java.rmi.server.ServerNotActiveException

Attempt to get the client host via the RemoteServer.getClientHost method when the remote server is not executing in a remote method.

java.rmi.server.SocketSecurityException

Attempt to export object on an illegal port.

Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Источник

Remote exceptions in java

A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call. Each method of a remote interface, an interface that extends java.rmi.Remote , must list RemoteException in its throws clause. As of release 1.4, this exception has been retrofitted to conform to the general purpose exception-chaining mechanism. The «wrapped remote exception» that may be provided at construction time and accessed via the public detail field is now known as the cause, and may be accessed via the Throwable.getCause() method, as well as the aforementioned «legacy field.» Invoking the method Throwable.initCause(Throwable) on an instance of RemoteException always throws IllegalStateException .

Field Summary

Constructor Summary

Method Summary

Methods declared in class java.lang.Throwable

Methods declared in class java.lang.Object

Field Detail

detail

The cause of the remote exception. This field predates the general-purpose exception chaining facility. The Throwable.getCause() method is now the preferred means of obtaining this information.

Constructor Detail

RemoteException

RemoteException

RemoteException

Constructs a RemoteException with the specified detail message and cause. This constructor sets the detail field to the specified Throwable .

Method Detail

getMessage

getCause

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Читайте также:  Последнее число в строке php

Источник

Remote exceptions in java

A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call. Each method of a remote interface, an interface that extends java.rmi.Remote , must list RemoteException in its throws clause. As of release 1.4, this exception has been retrofitted to conform to the general purpose exception-chaining mechanism. The «wrapped remote exception» that may be provided at construction time and accessed via the public detail field is now known as the cause, and may be accessed via the Throwable.getCause() method, as well as the aforementioned «legacy field.» Invoking the method Throwable.initCause(Throwable) on an instance of RemoteException always throws IllegalStateException .

Field Summary

Constructor Summary

Method Summary

Methods inherited from class java.lang.Throwable

Methods inherited from class java.lang.Object

Field Detail

detail

The cause of the remote exception. This field predates the general-purpose exception chaining facility. The Throwable.getCause() method is now the preferred means of obtaining this information.

Constructor Detail

RemoteException

RemoteException

RemoteException

Constructs a RemoteException with the specified detail message and cause. This constructor sets the detail field to the specified Throwable .

Method Detail

getMessage

getCause

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Источник

Оцените статью