title: wildfly 14 : javax.jms.JMSException: AMQ119030: large-message not initialized on server
body: <p>I have configured activemq subsystem in wildfly as below. </p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0"&gt;
           &lt;server name="default" persistence-enabled="true"&gt;
                  &lt;cluster password="${jboss.messaging.cluster.password:CHANGE ME!!}"/&gt;
                  &lt;journal type="NIO" min-files="2"/&gt;
                  &lt;bindings-directory path="/opt/shared/messaging/live/bindings"/&gt;
                  &lt;journal-directory path="/opt/shared/messaging/live/journal"/&gt;
                  &lt;large-messages-directory path="/opt/shared/messaging/live/largemessages"/&gt;
                  &lt;paging-directory path="/opt/messaging/live/paging"/&gt;
                  &lt;security-setting name="#"&gt;
                      &lt;role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/&gt;
                  &lt;/security-setting&gt;
                  &lt;address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" redelivery-delay="60000" max-delivery-attempts="5" max-size-bytes="50485760" page-size-bytes="10485760" address-full-policy="PAGE" redistribution-delay="1000"/&gt;
                  &lt;http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/&gt;
                  &lt;http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput"&gt;
                      &lt;param name="batch-delay" value="50"/&gt;
                  &lt;/http-connector&gt;
                  &lt;in-vm-connector name="in-vm" server-id="0"&gt;
                      &lt;param name="buffer-pooling" value="false"/&gt;
                  &lt;/in-vm-connector&gt;
                  &lt;http-acceptor name="http-acceptor" http-listener="default"/&gt;
                  &lt;http-acceptor name="http-acceptor-throughput" http-listener="default"&gt;
                      &lt;param name="batch-delay" value="50"/&gt;
                      &lt;param name="direct-deliver" value="false"/&gt;
                  &lt;/http-acceptor&gt;
                  &lt;in-vm-acceptor name="in-vm" server-id="0"&gt;
                      &lt;param name="buffer-pooling" value="false"/&gt;
                  &lt;/in-vm-acceptor&gt;
                  &lt;broadcast-group name="bg-group1" jgroups-cluster="activemq-cluster" connectors="http-connector"/&gt;
                  &lt;discovery-group name="dg-group1" jgroups-cluster="activemq-cluster"/&gt;
                  &lt;cluster-connection name="my-cluster" address="jms" connector-name="http-connector" discovery-group="dg-group1"/&gt;
                  &lt;jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/&gt;
                  &lt;jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/&gt;
                  &lt;jms-queue name="TestQueue" entries="java:/jms/TestQueue java:jboss/exported/jms/TestQueue"/&gt;
                  &lt;connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/&gt;
                  &lt;connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/&gt;
                  &lt;pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/&gt;
              &lt;/server&gt;
      &lt;/subsystem&gt;
  </code></pre>
  
  <p>I lookup 'TestQueue' using java:/ConnectionFactory. Initially it is working fine but after some times it throws following exception:</p>
  
  <p><b>1)</b> Warning message:</p>
  
  <pre><code>AMQ212051: Invalid concurrent session usage. Sessions are not supposed to be used by more than one thread concurrently.: java.lang.Exception: trace
      at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.startCall(ClientSessionImpl.java:1457)
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:229)
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:129)
      at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.doSendx(ActiveMQMessageProducer.java:517)
      at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:201)
      at com.demo.Test.executeQuery(Test.java:296)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  </code></pre>
  
  <p><b>2)</b> Warning message:</p>
  
  <pre><code>AMQ212054: Destination address=jms.queue.TestQueue is blocked. If the system is configured to block make sure you consume messages on this configuration.
  </code></pre>
  
  <p><b>3) : configured shared directory in messaging-activemq subsystem but after processing couple of records still getting following error.</b> </p>
  
  <pre><code>javax.jms.JMSException: AMQ119030: large-message not initialized on server
      at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.sendSessionSendContinuationMessage(ActiveMQSessionContext.java:924)
      at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.sendLargeMessageChunk(ActiveMQSessionContext.java:502)
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.largeMessageSendStreamed(ClientProducerImpl.java:503)
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.largeMessageSendBuffered(ClientProducerImpl.java:413)
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.largeMessageSend(ClientProducerImpl.java:344)
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:274)
  </code></pre>