2014-11-05 198 views
0

我们正在试验IBM的WebSphere Liberty配置文件。现在我们无法连接到我们的WebSphere MQ服务器。它适用于普通的WebSphere配置文件。我们跟着这个教程https://developer.ibm.com/wasdev/2013/06/14/using-websphere-mq-with-the-liberty-profile/,我跑进了以下异常:WAS Liberty配置文件连接到MQ服务器

Stack Dump = java.lang.ClassNotFoundException: com.ibm.mq.jms.MQQueue 

任何想法,我可以改变,使这一类可能被发现?

我正在使用Liberty Profile,版本8.5.5.3。

server.xml看起来如下:

<server description="new server"> 

    <!-- Enable features --> 
    <featureManager> 
     <feature>jsf-2.0</feature> 
     <feature>jpa-2.0</feature> 
     <feature>jndi-1.0</feature> 
     <feature>localConnector-1.0</feature> 
     <feature>beanValidation-1.0</feature> 
     <feature>wasJmsClient-1.1</feature> 
     <feature>jaxws-2.2</feature> 
     <feature>jmsMdb-3.1</feature> 
    </featureManager> 

    <!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" --> 
    <httpEndpoint id="defaultHttpEndpoint" httpPort="9080" httpsPort="9443" /> 

    <application id="myapp" name="myApp" type="ear" location="d:\somehwere"> 
     <classloader delegation="parentLast" commonLibraryRef="global" /> 
    </application> 

    <variable name="wmqJmsClient.rar.location" value="D:\opt\was_liberty_profile\was_8_5_5_3\wlp\usr\shared\wmq\wmq.jmsra.rar"/> 

    <library id="global"> 
     <file name="d:/dev/mavenrepo/com/h2database/h2/1.4.181/h2-1.4.181.jar" /> 
    </library> 

    <jmsQueue id="MYAPP_QUEUE" jndiName="jms/test/testq"> 
     <properties.wmqJms 
      baseQueueName="MYAPP.TEST.A" 
      persistence="PERS" 
      targetClient="MQ"/> 
    </jmsQueue> 

    <jmsQueueConnectionFactory id="TEST.SVRCONN.001" jndiName="jms/test/testcf"><!-- connectionManagerRef="ConMgr2">--> 
    <properties.wmqJms 
     channel="WM026D.SVRCONN.001" 
     hostName="i19328.myhost.ch" 
     port="1439" 
     queueManager="WM026D" 
     targetClientMatching="false"/> 
    </jmsQueueConnectionFactory> 

    <jmsActivationSpec id="fvtapp/fvtmdb/FVTMessageDrivenBean"> 
    <properties.wmqJms destinationRef="MYAPP_QUEUE" 
        destinationType="javax.jms.Queue" 
        queueManager="WM026D"/> 
</jmsActivationSpec> 
</server> 
+0

你能提供你的server.xml文件吗?我假设你按照教程下载了wmq资源适配器? – whitfiea 2014-11-05 10:28:09

+0

@whitfiea你的第二个问题是什么意思?我认为我的同事从IBM下载 – EhmKah 2014-11-05 10:38:29

+0

我的意思是说你下载了wmq.jmsra.rar,因为它默认是作为Liberty的一部分来使用的。由于Gas已经提到过,问题在于你加载了错误的功能,所以你提到的类没有加载。 – whitfiea 2014-11-05 13:47:29

回答

3

你有错误的功能有。它应该是:

<feature>wmqJmsClient-1.1</feature> 

不是:

<feature>wasJmsClient-1.1</feature> 

后一个是建立在消息不MQ。

+0

谢谢。这是解决方案的第一部分。第二部分,我们将web.xml中配置的队列“铸造”为com.ibm.mq.jms.MQQueue。我们将其更改为java.js.Queue,现在它运行。 – EhmKah 2014-11-06 07:33:02

相关问题