我想在Websphere Liberty 8.5.5中添加mq功能,但我得到了ClassNotFoundException: com.ibm.msg.client.commonservices.componentmanager.Component
。我已经检查了许多描述该过程的网站,但我仍然坚持这个错误。
显然启用此功能应该非常简单:
server.xml。
在需要时,使用featuremanager install命令正确安装了以下所有功能。
<featureManager>
<feature>jsp-2.2</feature>
<feature>jndi-1.0</feature>
<feature>servlet-3.1</feature>
<feature>jdbc-4.0</feature>
<feature>localConnector-1.0</feature>
<feature>jaxb-2.2</feature>
<feature>jaxws-2.2</feature>
<feature>jaxrs-1.1</feature>
<feature>jpa-2.0</feature>
<feature>jca-1.6</feature>
<feature>javaMail-1.5</feature>
<feature>jdbc-4.1</feature>
<feature>appSecurity-2.0</feature>
<feature>ldapRegistry-3.0</feature>
<feature>jmsMdb-3.1</feature>
<feature>wmqJmsClient-1.1</feature>
</featureManager>
<!--***********
* JMS *
***********-->
<variable name="wmqJmsClient.rar.location" value="C:/IBM/wlp/extra-lib/connectors/wmq.jmsra.rar"/>
<jmsQueueConnectionFactory id="jms-queue-factory" jndiName="jms/queue-factory">
<properties.wmqJms channel="CHANNEL_TEST1" hostName="somehost.es" port="1414" queueManager="SOME_QUEUE_MANAGER_1"/>
</jmsQueueConnectionFactory>
<jmsQueue id="TEST" jndiName="jms/queue-test">
<properties.wmqJms baseQueueName="TEST"/>
</jmsQueue>
<jmsActivationSpec id="as/test">
<properties.wmqJms destinationRef="TEST" destinationType="javax.jms.Queue" queueManager="SOME_QUEUE_MANAGER_1"/>
</jmsActivationSpec>
当wmq.jmsra.rar(在变量标签中引用)是一个zip文件时,我在messages.log中收到以下错误:
[16/02/15 12:55:55:696 CET] 00000012 LogService-88-com.ibm.ws.jca
E CWWKE0701E: [com.ibm.ws.jca.bundleResourceAdapter(234)] The activate method has thrown an exception Bundle:com.ibm.ws.jca(id=88) java.lang.NoClassDefFoundError: com/ibm/msg/client/commonservices/componentmanager/Component
...
...
Caused by: java.lang.ClassNotFoundException: com.ibm.msg.client.commonservices.componentmanager.Component
at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:424)
at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoader.java:257)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.ibm.ws.classloading.internal.AppClassLoader.findOrDelegateLoadClass(AppClassLoader.java:402)
at com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppClassLoader.java:373)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 200 more
或者我提取了wmq.jmsra.rar的内容。然后好像它不能将某些属性设置为类com.ibm.mq.connector.ResourceAdapterImpl
(或其超类com.ibm.mq.connector.ResourceAdapterConfiguration
)的成员:
[WARN] J2CA8501E: Property startupRetryInterval of configuration element wmqJmsClient cannot be set because it is not found on the class com.ibm.mq.connector.ResourceAdapterImpl.
[WARN] J2CA8501E: Property startupRetryCount of configuration element wmqJmsClient cannot be set because it is not found on the class com.ibm.mq.connector.ResourceAdapterImpl.
[WARN] J2CA8501E: Property nativeLibraryPath of configuration element wmqJmsClient cannot be set because it is not found on the class com.ibm.mq.connector.ResourceAdapterImpl.
[WARN] J2CA8501E: Property startupRetryInterval of configuration element wmqJmsClient cannot be set because it is not found on the class com.ibm.mq.connector.ResourceAdapterImpl.
[WARN] J2CA8501E: Property startupRetryCount of configuration element wmqJmsClient cannot be set because it is not found on the class com.ibm.mq.connector.ResourceAdapterImpl.
[WARN] J2CA8501E: Property nativeLibraryPath of configuration element wmqJmsClient cannot be set because it is not found on the class com.ibm.mq.connector.ResourceAdapterImpl.
[WARN] J2CA8501E: Property startupRetryInterval of configuration element wmqJmsClient cannot be set because it is not found on the class com.ibm.mq.connector.ResourceAdapterImpl.
[WARN] J2CA8501E: Property startupRetryCount of configuration element wmqJmsClient cannot be set because it is not found on the class com.ibm.mq.connector.ResourceAdapterImpl.
[WARN] J2CA8501E: Property nativeLibraryPath of configuration element wmqJmsClient cannot be set because it is not found on the class com.ibm.mq.connector.ResourceAdapterImpl.
我从Websphere 8.0安装中获得了wmq.jmsra.rar。可能是8.5.5不支持这个吗?那么我在哪里可以获得有效的连接器?
答案 0 :(得分:2)
检查这些链接以将Liberty连接到WMQ。特别检查第二个链接,如何获取Liberty的WMQ资源适配器。 我假设您为Liberty配置文件安装了WebSphere Application Server Liberty配置文件和扩展内容