Mule 3.4:java.lang.ClassNotFoundException:com.ibm.mq.jms.MQConnectionFactory

时间:2013-08-06 18:59:09

标签: mule mule-studio

我正在尝试使用WMQ作为入站端点,我已从样本目录中导入样本。

当我运行流程时,我收到错误,因为找不到类。

我将所需的jar文件添加到构建路径,但仍然收到错误。

请告诉我,问题是什么。

nested exception is java.lang.NoClassDefFoundError: com/ibm/mq/jms/MQConnectionFactory
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
    at org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:113)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
    at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
    at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:109)
    ... 13 more
Caused by: java.lang.NoClassDefFoundError: com/ibm/mq/jms/MQConnectionFactory
    at com.mulesoft.mule.transport.wmq.WebSphereMQConnector.<clinit>(WebSphereMQConnector.java:42)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:266)
    at org.apache.commons.lang.ClassUtils.getClass(ClassUtils.java:629)
    at org.apache.commons.lang.ClassUtils.getClass(ClassUtils.java:677)
    at org.apache.commons.lang.ClassUtils.getClass(ClassUtils.java:660)
    at org.mule.config.spring.parsers.assembly.DefaultBeanAssembler.methodExists(DefaultBeanAssembler.java:568)
    at org.mule.config.spring.parsers.assembly.DefaultBeanAssembler.bestGuessName(DefaultBeanAssembler.java:537)
    at org.mule.config.spring.parsers.assembly.DefaultBeanAssembler.extendBean(DefaultBeanAssembler.java:116)
    at org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser.processProperty(AbstractMuleBeanDefinitionParser.java:204)
    at org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser.doParse(AbstractMuleBeanDefinitionParser.java:424)
    at org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser.parseInternal(AbstractMuleBeanDefinitionParser.java:297)
    at org.mule.config.spring.parsers.generic.MuleOrphanDefinitionParser.parseInternal(MuleOrphanDefinitionParser.java:41)
    at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
    at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
    at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:88)
    at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:130)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:190)
    at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:55)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
    ... 22 more
Caused by: java.lang.ClassNotFoundException: com.ibm.mq.jms.MQConnectionFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 46 more

1 个答案:

答案 0 :(得分:6)

这是studio的一个已知问题,需要IBM库作为系统类加载器的一部分。

请将它们复制到

${studio.home}/plugins/org.mule.tooling.server.${mule.version}.ee_${mule.version}.${release.date}/mule/user 

解决它的文件夹。