title: java.lang.NoClassDefFoundError: Could not initialize class com.ibm.mq.jms.MQQueueConnectionFactory
body: <p>I am facing issue while starting my project.</p>
  
  <p><strong>Environment:</strong></p>
  
  <p><em>Tomcat 6, Jdk_6.45,
  <strong>Alredy added</strong>: com.ibm.mq.jar, com.ibm.mqjms.jar,</em></p>
  
  <p><strong>Context.xml</strong></p>
  
  <pre><code>&lt;Context&gt;
  ...
  &lt;Resource name="jms/sl.mqfactory" type="com.ibm.mq.jms.MQQueueConnectionFactory"
          factory="com.ibm.mq.jms.MQQueueConnectionFactoryFactory" description="JMS Queue Connection Factory"
          HOST="mqqs01.s.abc.co.uk" PORT="53162" CHAN="MQ.CLT.BLP.CHL.DEV"
          TRAN="1" CCS="819" QMGR="QS01" auth="Container" username="" password="" /&gt;
  
  &lt;/Context&gt;
  </code></pre>
  
  <p>Spring:</p>
  
  <pre><code>&lt;bean id="jndiConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"&gt;
          &lt;property name="jndiName" value="${sl.mqfactory}" /&gt; &lt;!--from properties file --&gt;
          &lt;property name="proxyInterface" value="javax.jms.QueueConnectionFactory"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p><strong>Exception:</strong></p>
  
  <pre><code>java.lang.NoClassDefFoundError: Could not initialize class com.ibm.mq.jms.MQQueueConnectionFactory
  </code></pre>