Top Description Constructors Methods
org.springframework.jms

public abstract Class JmsException

extends NestedRuntimeException
Class Inheritance
Known Direct Subclasses
org.springframework.jms.JmsSecurityException, org.springframework.jms.MessageEOFException, org.springframework.jms.MessageFormatException, org.springframework.jms.MessageNotReadableException, org.springframework.jms.MessageNotWriteableException, org.springframework.jms.ResourceAllocationException, org.springframework.jms.TransactionInProgressException, org.springframework.jms.TransactionRolledBackException, org.springframework.jms.UncategorizedJmsException, org.springframework.jms.connection.SynchedLocalTransactionFailedException, org.springframework.jms.listener.adapter.ListenerExecutionFailedException, org.springframework.jms.listener.adapter.ReplyFailureException, org.springframework.jms.support.converter.MessageConversionException, org.springframework.jms.support.destination.DestinationResolutionException, org.springframework.jms.IllegalStateException, org.springframework.jms.InvalidClientIDException, org.springframework.jms.InvalidDestinationException, org.springframework.jms.InvalidSelectorException
Annotations
@SuppressWarnings:serial
Imports
jakarta.jms.JMSException, org.springframework.core.NestedRuntimeException, org.springframework.lang.Nullable

Base class for exception thrown by the framework whenever it encounters a problem related to JMS.
Authors
Mark Pollack, Juergen Hoeller
Since
1.1

Constructor Summary

AccessConstructor and Description
public
JmsException(String
the detail message
msg
)

Constructor that takes a message.

public
JmsException(String
the detail message
msg
,
Throwable
the cause of the exception. This argument is generally expected to be a proper subclass of jakarta.jms.JMSException, but can also be a JNDI NamingException or the like.
cause
)

Constructor that takes a message and a root cause.

public
JmsException(Throwable
the cause of the exception. This argument is generally expected to be a proper subclass of jakarta.jms.JMSException.
cause
)

Constructor that takes a plain root cause, intended for subclasses mirroring corresponding jakarta.jms exceptions.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a string specifying the vendor-specific error code if the root cause is an instance of JMSException, or null
getErrorCode
()

Convenience method to get the vendor specific error code if the root cause was an instance of JMSException.

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Return the detail message, including the message from the linked exception if there is one.

Inherited from org.springframework.core.NestedRuntimeException:
containsgetMostSpecificCausegetRootCause

Constructor Detail

JmsExceptionback to summary
public JmsException(String msg)

Constructor that takes a message.

Parameters
msg:String

the detail message

JmsExceptionback to summary
public JmsException(String msg, Throwable cause)

Constructor that takes a message and a root cause.

Parameters
msg:String

the detail message

cause:Throwable

the cause of the exception. This argument is generally expected to be a proper subclass of jakarta.jms.JMSException, but can also be a JNDI NamingException or the like.

JmsExceptionback to summary
public JmsException(Throwable cause)

Constructor that takes a plain root cause, intended for subclasses mirroring corresponding jakarta.jms exceptions.

Parameters
cause:Throwable

the cause of the exception. This argument is generally expected to be a proper subclass of jakarta.jms.JMSException.

Method Detail

getErrorCodeback to summary
public String getErrorCode()

Convenience method to get the vendor specific error code if the root cause was an instance of JMSException.

Returns:String

a string specifying the vendor-specific error code if the root cause is an instance of JMSException, or null

Annotations
@Nullable
getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Return the detail message, including the message from the linked exception if there is one.

Returns:String

Doc from java.lang.Throwable.getMessage.

the detail message string of this Throwable instance (which may be null).

Annotations
@Override
@Nullable
See Also
jakarta.jms.JMSException#getLinkedException()