title: DetailedJMSSecurityException while trying to access queue in IBM MQ
body: <p>Here is my problem.</p>
  
  <p>I am using trial version of <code>IBM MQ V7.1</code>. I have created a queue manager <code>MYQM</code>, a channel <code>MY_SVRCONN</code> with <code>MCA User Id abc</code>.  I have provided user <code>abc</code> to access <code>MYQM</code>. I am trying to put a message into the queue <code>Q1</code>. But while getting the queue connection i am getting below exception.</p>
  
  <blockquote>
    <p>com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2013: The security authentication was not valid that was supplied for QueueManager 'MYQM' with connection mode 'Client' and host name '(1500)'.
    Please check if the supplied username and password are correct on the QueueManager to which you are connecting.</p>
  </blockquote>
  
  <p>I have used below command to allow user abc to access <code>MYQM</code>.</p>
  
  <pre><code>[mqm@localhost ~]$ setmqaut -m MYQM -t qmgr -p abc +connect
  The setmqaut command completed successfully.
  </code></pre>
  
  <p>Here is my Java program</p>
  
  <pre><code> public class MqPut
   {
       public static void main(String[] args)
       {
        sendMsg("Sample Message");
       }
       public static void sendMsg(String msg)
       {
         MQQueueConnectionFactory connectionFactory = null;
         QueueConnection queueConn = null;
         QueueSession queueSession = null;
         QueueSender queueSender = null;
         TextMessage message = null;
  
         try
         {
           connectionFactory = new MQQueueConnectionFactory();
           connectionFactory.setHostName(&lt;MQ SERVER IP&gt;);
           connectionFactory.setPort(1500);
           connectionFactory.setTransportType(WMQConstants.WMQ_CLIENT_NONJMS_MQ);
           connectionFactory.setQueueManager("MYQM");
           connectionFactory.setChannel("MY_SVRCONN");   
           queueConn = connectionFactory.createQueueConnection("abc","password");
           queueSession = queueConn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
           queueSender = queueSession.createSender(queueSession.createQueue("Q"));   
           queueSender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);   
           message = queueSession.createTextMessage(msg);
           queueSender.send(message);
           queueConn.close();
         }
         catch (Exception je)
         {
             je.printStackTrace();
         }
     }   
    }
  </code></pre>
  
  <p>I have tried with <a href="https://stackoverflow.com/questions/6012579/websphere-7-configuring-jms-q-connection-factory-without-user-id-mqrc-not-auth">WebSphere 7, configuring JMS Q connection factory without user id: MQRC_NOT_AUTHORIZED</a>, but still my problem persist. I am not getting what I am doing wrong. Any help is appreciated.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>User abc is not part of mqm group</p>