title: NoClassDefFoundError Could not initialize class com.ibm.mq.headers.internal.HeaderType
body: <p>We have upgraded to IBM MQ8 and have following dependencies in our project. The following dependencies exists</p>
  
  <pre><code>com.ibm.disthub2.dhbcore
  com.ibm.mq.jmqi
  com.ibm.mqjms
  ibm-jaxrpc-client
  com.ibm.mq
  com.ibm.mq.headers
  com.ibm.mq.pcf
  com.ibm.mq.commonservices
  </code></pre>
  
  <p>However while running the main program, it is giving <code>NoDefFoundError</code>, despite of providing the jars in the classpath.</p>
  
  <pre><code>Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.ibm.mq.headers.internal.HeaderType
          at com.ibm.mq.headers.pcf.PCFMessage.&lt;init&gt;(PCFMessage.java:77) ~[com.ibm.mq.headers-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.mq.headers.pcf.PCFMessage.&lt;init&gt;(PCFMessage.java:132) ~[com.ibm.mq.headers-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.mq.ese.service.PolicyServiceImpl.policyFromPcf(PolicyServiceImpl.java:575) ~[com.ibm.mq.jmqi-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.storeSecurityInfoInSmqiObject(JmqiOpenInterceptorImpl.java:359) ~[com.ibm.mq.jmqi-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.readPolicyIfAvailable(JmqiOpenInterceptorImpl.java:321) ~[com.ibm.mq.jmqi-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.afterSpiOpen(JmqiOpenInterceptorImpl.java:203) ~[com.ibm.mq.jmqi-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.spiOpen(InterceptedJmqiImpl.java:411) ~[com.ibm.mq.jmqi-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.mq.ese.jmqi.ESEJMQI.spiOpen(ESEJMQI.java:513) ~[com.ibm.mq.jmqi-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.msg.client.wmq.internal.WMQMessageProducer$SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:762) ~[com.ibm.mqjms-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.msg.client.wmq.internal.WMQMessageProducer.&lt;init&gt;(WMQMessageProducer.java:995) ~[com.ibm.mqjms-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.msg.client.wmq.internal.WMQSession.createProducer(WMQSession.java:889) ~[com.ibm.mqjms-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.msg.client.jms.internal.JmsSessionImpl.createProducer(JmsSessionImpl.java:1232) ~[com.ibm.mqjms-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.msg.client.jms.internal.JmsQueueSessionImpl.createSender(JmsQueueSessionImpl.java:136) ~[com.ibm.mqjms-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.mq.jms.MQQueueSession.createSender(MQQueueSession.java:153) ~[com.ibm.mqjms-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at com.ibm.mq.jms.MQQueueSession.createProducer(MQQueueSession.java:254) ~[com.ibm.mqjms-7.5.0.6.jar:7.5.0.6 - p750-006-160226]
          at org.springframework.jms.core.JmsTemplate.doCreateProducer(JmsTemplate.java:1114) ~[spring-jms-4.3.4.RELEASE.jar:4.3.4.RELEASE]
          at org.springframework.jms.core.JmsTemplate.createProducer(JmsTemplate.java:1095) ~[spring-jms-4.3.4.RELEASE.jar:4.3.4.RELEASE]
          at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:482) ~[camel-jms-2.17.0.jar:2.17.0]
          at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:428) ~[camel-jms-2.17.0.jar:2.17.0]
          at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$1.doInJms(JmsConfiguration.java:442) ~[camel-jms-2.17.0.jar:2.17.0]
          at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:484) ~[spring-jms-4.3.4.RELEASE.jar:4.3.4.RELEASE]
  </code></pre>