Spring疑难杂症 - MQ问题汇总(2) - MQCT_NO

折腾老半天,google搜也无法找到答案...最郁闷的事情莫过于此...

 

问题:

java.lang.NoSuchFieldError: MQCT_NONE

环境 spring2.0.6, mq6, 开发环境 RAD7

 

解决办法:

发现项目的library中有一jar包  ibm-mqseries-5.3.0.jar 

与mq版本不一致...

将此jar包去掉,加上mq6的3个jar包..果然通过...

<dir>\RAD7\runtimes\base_v61\lib\WMQ\java\lib\com.ibm.mq.jar

<dir>\RAD7\runtimes\base_v61\lib\WMQ\java\lib\com.ibm.mqjms.jar

<dir>\RAD7\runtimes\base_v61\lib\WMQ\java\lib\dhbcore.jar

 

异常完整信息:

 

Jan 23, 2008 11:37:35 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@8965fb: display name [org.springframework.context.support.ClassPathXmlApplicationContext@8965fb]; startup date [Wed Jan 23 11:37:35 CST 2008]; root of context hierarchy
Jan 23, 2008 11:37:36 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [testMqEs6.xml]
Jan 23, 2008 11:37:40 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@8965fb]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1d6f122
Jan 23, 2008 11:37:40 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1d6f122: defining beans [connectionFactory,myConnectionFactory,queue,replyToQ,mqQueue,mqReplyToQ,JMSMessenger,SendProtocol,RecvProtocol,esJmsTemplateSR,jmsTemplate,TestMQES6]; root of factory hierarchy
java.lang.NoSuchFieldError: MQCT_NONE
at com.ibm.mq.MQConnectionOptions.<clinit>(MQConnectionOptions.java:67)
at com.ibm.mq.jms.MQConnection.<init>(MQConnection.java:512)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:73)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:185)
at com.ibm.mq.jms.MQQueueConnectionFactory.createConnection(MQQueueConnectionFactory.java:1066)
at org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter.doCreateConnection(UserCredentialsConnectionFactoryAdapter.java:173)
at org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter.createConnection(UserCredentialsConnectionFactoryAdapter.java:148)
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:188)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:418)
at com.hsbc.esf.jms.templates.ESJmsTemplate.execute(ESJmsTemplate.java:49)
at test.TestMQES6.testRun(TestMQES6.java:28)
at test.TestMQES6.main(TestMQES6.java:75)
Exception in thread "main"

 

你可能感兴趣的:(java,spring,bean,IBM,jms)