summaryrefslogtreecommitdiff
path: root/qpid/doc/book/src/jms-client-0-8/JMS-Client-Appendix-Exceptions.xml
blob: eb021f3132645a1abad6de7bb68d3a3c63816d05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
                    "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[
<!ENTITY %  entities SYSTEM  "commonEntities.xml">
%entities;
]>
<!--

 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.

-->

<appendix id="JMS-Client-0-8-Appendix-Exceptions">
  <title>Exceptions</title>

  <para>The methods of Qpid JMS Client throw <ulink url="&oracleJeeDocUrl;javax/jms/JMSException.html"
      >JMSExceptions</ulink> in response to error conditions. Typically the exception's message
    (#getMessage()) summarises the error condition, with contextual information being provided by
    the messages of linked exception(s). To understand the problem, it is important to read the messages
    associated with <emphasis>all</emphasis> the linked exceptions.</para>

  <para>The following table describes some of the more common exceptions linked to JMSException
    thrown by JMS methods whilst using the client:</para>

  <table pgwide="1">
    <title>Exceptions linked to JMSExceptions thrown by JMS methods</title>
    <tgroup cols="3">
      <thead>
        <row>
          <entry>Linked Exception</entry>
          <entry>Message</entry>
          <entry>Explanation/Common Causes</entry>
        </row>
      </thead>
      <tbody>
        <row>
          <entry>AMQUnresolvedAddressException</entry>
          <entry><emphasis>message varies</emphasis></entry>
          <entry><para>Indicates that the hostname included in the Connection URL's <link
                linkend="JMS-Client-0-8-Connection-URL-ConnectionOptions-Brokerlist"
                >brokerlist</link>, could not be resolved, . This could mean that the hostname is
              mispelt, or there is name resolution problem.</para></entry>
        </row>
        <row>
          <entry>AMQConnectionFailure</entry>
          <entry>Connection refused</entry>
          <entry><para>Indicates that the host included in the Connection URL's <link
                linkend="JMS-Client-0-8-Connection-URL-ConnectionOptions-Brokerlist"
                >brokerlist</link>, actively refused the connection. This could mean that the
              hostname and/or port number is incorrect, or the Broker may not be
            running.</para></entry>
        </row>
        <row>
          <entry>AMQConnectionFailure</entry>
          <entry>connect timed out</entry>
          <entry><para>Indicates that the host included in the Connection URL's <link
                linkend="JMS-Client-0-8-Connection-URL-ConnectionOptions-Brokerlist"
                >brokerlist</link>, could not be contacted within the <link
                linkend="JMS-Client-0-8-Connection-URL-BrokerOptions-ConnectTimeout"
                >connecttimeout</link>. This could mean that the host is shutdown, or a networking
              routing problem means the host is unreachable.</para></entry>
        </row>
        <row>
          <entry>AMQConnectionFailure</entry>
          <entry>General SSL Problem; PKIX path building failed; unable to find valid certification
            path to requested target</entry>
          <entry><para>Indicates that the CA that signed the Broker's certificate is not trusted by
              the JVM of the client. If the Broker is using a private-CA (or a self signed
              certificate) check that the client has been properly configured with a truststore. See
                <xref linkend="JMS-Client-0-8-Client-Understanding-Connection-SSL"/></para></entry>
        </row>
        <row>
          <entry>AMQTimeoutException</entry>
          <entry>Server did not respond in a timely fashion; Request Timeout</entry>
          <entry><para>Indicates that the broker did not respond to a request sent by the client in
              a reasonable length of time. The timeout is governed by <link
                linkend="JMS-Client-0-8-System-Properties-SyncOpTimeout"
                  ><literal>qpid.sync_op_timeout</literal></link>.</para><para>This can be a symptom
              of a heavily loaded broker that cannot respond or the Broker may have failed in
              unexpected manner. Check the broker and the host on which it runs and performance of
              its storage.</para></entry>
        </row>
      </tbody>
    </tgroup>
  </table>

  <para>The following table describes some of the more common exceptions linked to JMSException sent
    to <ulink url="&oracleJeeDocUrl;javax/jmx/ExceptionListener.html">ExceptionListener</ulink>
    instances.</para>

  <table pgwide="1">
    <title>Exceptions linked to JMSExceptions received by ExceptionListeners</title>
    <tgroup cols="3">
      <thead>
        <row>
          <entry>Linked Exception</entry>
          <entry>Message</entry>
          <entry>Explanation/Common Causes</entry>
        </row>
      </thead>
      <tbody>
        <row id="JMS-Client-0-8-Appendix-Exceptions-AMQNoRouteException">
          <entry>AMQNoRouteException</entry>
          <entry>No Route for message [Exchange: <emphasis>exchange name</emphasis>, Routing key:
              <emphasis>routing key</emphasis>] [error code 312: no route]</entry>
          <entry><para>Indicate that the named exchange is unable to route a message to at least one
              queue.</para>
            <para>This will occur if a queue has been improperly bound to an exchange. Use the
              Broker's management interface to check the bindings. See <xref
                linkend="JMS-Client-0-8-Client-Understanding-MessageProducer-MandatoryMessage"
              /></para></entry>
        </row>
        <row id="JMS-Client-0-8-Appendix-Exceptions-AMQNoConsumersException">
          <entry>AMQNoConsumersException</entry>
          <entry>Immediate delivery is not possible. [error code 313: no consumers]</entry>
          <entry><para>Immediate delivery was requested by the MessageProducer, but as there are no
              consumers on any target queue, the message has been returned to the publisher. See
                <xref linkend="JMS-Client-0-8-Client-Understanding-MessageProducer-ImmediateMessage"
              />
            </para></entry>
        </row>
        <row>
          <entry>AMQDisconnectedException</entry>
          <entry>Server closed connection and reconnection not permitted</entry>
          <entry><para>Indicates that the connection was closed by the Broker, and as <link
                linkend="JMS-Client-0-8-Client-Understanding-Connection-Failover">failover
                options</link> are not included in the Connection URL, the client has been unable to
              reestablish connection.</para>
            <para>The Connection is now closed and any attempt to use either Connection object, or
              any objects created from the Connection will receive an <ulink
                url="&oracleJeeDocUrl;javax/jms/IllegalStateException.html"
                >IllegalStateException</ulink>.</para></entry>
        </row>
        <row id="JMS-Client-0-8-Appendix-Exceptions-AMQDisconnectedException">
          <entry>AMQDisconnectedException</entry>
          <entry>Server closed connection and no failover was successful</entry>
          <entry><para>Indicates that the connection was closed by the Broker. The client has tried
              failover according to the rules of the <link
                linkend="JMS-Client-0-8-Client-Understanding-Connection-Failover">failover
                options</link>within the Connection URL, but these attempts were all
              unsuccessful.</para>
            <para>The Connection is now closed and any attempt to use either Connection object, or
              any objects created from the Connection will receive an <ulink
                url="&oracleJeeDocUrl;javax/jms/IllegalStateException.html"
                >IllegalStateException</ulink>.</para></entry>
        </row>

      </tbody>
    </tgroup>
  </table>

  <!--
  : 
  AMQDisconnectedException: Server closed connection 
  -->

</appendix>