blob: d501da2b80554cb3e852edd6bbfa19870f7c079f [file] [log] [blame]
<div class="wiki-content maincontent"><p>If you get an error like</p>
<structured-macro ac:macro-id="ad648f77-49f7-4ec9-bab0-a19e18153e66" ac:name="code" ac:schema-version="1"><plain-text-body>
java.lang.NoSuchMethodError:
javax.jms.Session.createConsumer(Ljavax/jms/Destination;)Ljavax/jms/MessageConsumer;
</plain-text-body></structured-macro>
<p>or</p>
<structured-macro ac:macro-id="3b8768da-d141-4822-9ac3-66c88cf3df4d" ac:name="code" ac:schema-version="1"><plain-text-body>
java.lang.AbstractMethodError:
javax.jms.ConnectionFactory.createConnection()Ljavax/jms/Connection;
</plain-text-body></structured-macro>
<h3>Fix</h3>
<p>You probably have old JMS 1.0.2b versions of the JMS API on your classpath. This is because various methods were added in JMS 1.1 to work with destinations in a polymorphic way (such as to create a consumer from a Destination like the above stack trace).</p>
<p>Please add the JMS 1.1 jars to your container/classpath and try again. </p>
<structured-macro ac:macro-id="84703f19-7c81-4f6a-8c2f-64ecb536de0f" ac:name="note" ac:schema-version="1"><parameter ac:name="title">Add to the correct ClassPath</parameter><rich-text-body>
<p>If the JMS 1.0.2b classes come from your application server you may need to add the JMS 1.1 to your boot classpath to ensure that the JMS 1.1 classes take precedence to the container supplied classes</p></rich-text-body></structured-macro>
<p>Note that to a user of the JMS API, JMS 1.1 is completely backwards compatible. The only issue with upgrading to JMS 1.1 is that any JMS provider which implements only JMS 1.0.2b and does not implement JMS 1.1 will not work; however if you're using ActiveMQ you should be fine.</p>
</div>