我已在公司筆記型電腦中安裝了 WebSphere Liberty 18.0.0.4 和 IBM MQ 用戶端。我已經配置了 server.xml,以便我的本機主機可以在伺服器上運行的 IBM MQ 中取得和放置訊息。我在 WebSphere liberty 上安裝了我的應用程序,它可以將訊息放入 MQ,但不使用該訊息。您能幫忙看看哪裡出了問題嗎?下面是server.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<server description="Default server">
<!-- Enable features -->
<featureManager>
<feature>javaee-8.0</feature>
<feature>ejbPersistentTimer-3.2</feature>
<!--feature>JDBC-4.1</feature-->
<!--feature>webProfile-7.0</feature-->
<feature>wmqJmsClient-2.0</feature>
<feature>jmsMdb-3.2</feature>
<feature>jms-2.0</feature>
<!--feature>jsf-2.2</feature-->
<!--feature>servlet-3.1</feature-->
<feature>jsp-2.3</feature>
<!--feature>jaxrs-2.0</feature-->
<!--feature>restConnector-1.0</feature-->
<feature>wasJmsServer-1.0</feature>
<feature>wasJmsClient-2.0</feature>
<feature>ejbRemote-3.2</feature>
<feature>ejb-3.2</feature>
<feature>concurrent-1.0</feature>
<feature>ejblite-3.2</feature>
<!--feature>cdi-1.2</feature-->
<feature>federatedRegistry-1.0</feature>
<feature>transportSecurity-1.0</feature>
<feature>localConnector-1.0</feature>
<!--feature>ssl-1.0</feature-->
<!--feature>appSecurity-2.0</feature-->
<feature>jndi-1.0</feature>
<feature>jca-1.7</feature>
<feature>ldapRegistry-3.0</feature>
<!--feature>adminCenter-1.0</feature-->
<feature>websocket-1.1</feature>
<!--feature>beanValidation-1.1</feature-->
</featureManager>
<!--For a user registry configuration, configure your user registry. For example, configure a basic user registry using the
basicRegistry element. Specify your own user name below in the name attribute of the user element. For the password,
generate an encoded password using bin/securityUtility encode and add it in the password attribute of the user element.
Then uncomment the user element. -->
<!--basicRegistry id="basic" realm="BasicRealm"-->
<!-- <user name="yourUserName" password="" />
</basicRegistry-->
<keyStore id="defaultKeyStore" password="keyspass" />
<!-- To allow access to this server from a remote client host="*" has been added to the following element -->
<httpEndpoint id="defaultHttpEndpoint"
host="*"
httpPort="9081"
httpsPort="9449" />
<!-- Automatically expand WAR files and EAR files -->
<applicationManager autoExpand="true"/>
<variable name="wmqJmsClient.rar.location" value="C:/Program Files/IBM/MQ/java/lib/jca/wmq.jmsra.rar"/>
<jmsConnectionFactory jndiName="jms/jmsConnectionFactory">
<properties.wmqJms maxPoolDepth="10" transportType="CLIENT" hostName="QTQTBI2.nl.eu.abnamro.com" port="1414" channel="ZTAT241.QTQTBI2.03" queueManager="QTQTBI2" />
<connectionManager maxPoolSize="10" minPoolSize="5" connectionTimeout="360s" maxIdleTime="30m" agedTimeout="30m" reapTime="180s" />
</jmsConnectionFactory>
<jmsQueue id="queue/t24OFSQueue" jndiName="queue/t24OFSQueue">
<properties.wmqJms baseQueueName="API.RUNTIME_REQUEST_ET_FIX.AO" baseQueueManagerName="QTQTBI2" transportType="CLIENT"/>
</jmsQueue>
<jmsQueue id="queue/t24OFSReplyQueue" jndiName="queue/t24OFSReplyQueue">
<properties.wmqJms baseQueueName="API.RUNTIME_REQUEST_ET_FIX.AI" baseQueueManagerName="QTQTBI2" transportType="CLIENT"/>
</jmsQueue>
</server>
下面是SystemOut.log
:
[ERROR ] CWIMK0011E: The user registry operation could not be completed. A valid user registry was not found. Add or correct the registry definition in the server.xml file.
com.ibm.wsspi.security.wim.exception.NoUserRepositoriesFoundException: CWIMK0011E: The user registry operation could not be completed. A valid user registry was not found. Add or correct the registry definition in the server.xml file.
at com.ibm.ws.security.wim.ProfileManager.genericProfileManagerMethod(ProfileManager.java:223)
at [internal classes]
2019-07-22 16:26:59 [Default Executor-thread-1281] DEBUG:: >>>> direct://holdings-PSD2.getAccountOverview Exchange[ID-NLLR4000508015-1563804055316-36-3]
2019-07-22 16:26:59 [Default Executor-thread-1281] INFO :: Request: ENQUIRY.SELECT,,UPGRADEUSER.2/U123456u/BE0010001///,PZ.API.ACCOUNTS.1.0.0,ACCOUNTREFERENCE:EQ=674400057512
2019-07-22 16:26:59 [Default Executor-thread-1281] DEBUG:: response queue used is queue/OFSReplyQueue for client type INTERNAL
[WARNING ] J2CA8501E: Property transportType of configuration element com.ibm.ws.jca.adminObject.supertype[queue/OFSReplyQueue] cannot be set because it is not found on the class com.ibm.mq.connector.outbound.MQQueueProxy.
2019-07-22 16:26:59 [Default Executor-thread-1281] DEBUG:: jms destination lookup successfull forqueue/OFSReplyQueue
2019-07-22 16:26:59 [Default Executor-thread-1281] DEBUG:: request queue used is queue/OFSQueue for client type INTERNAL
[WARNING ] J2CA8501E: Property transportType of configuration element com.ibm.ws.jca.adminObject.supertype[queue/OFSQueue] cannot be set because it is not found on the class com.ibm.mq.connector.outbound.MQQueueProxy.
2019-07-22 16:26:59 [Default Executor-thread-1281] DEBUG:: jms destination lookup successfull forqueue/OFSQueue
2019-07-22 16:27:59 [Default Executor-thread-1281] ERROR:: Response not received from APP for Message Sent with JMS Correlation id e6e081d3-759f-43d9-9ee9-b37bfc2516da
2019-07-22 16:27:59 [Default Executor-thread-1281] ERROR:: JTC-001,Failed to send message to APP via JMS
2019-07-22 16:27:59 [Default Executor-thread-1281] ERROR:: TGVCP-001
2019-07-22 16:27:59 [Default Executor-thread-1281] DEBUG:: Writing response in non-chunked mode as plain text with content-length 129 and buffer size: 4096
誰能建議我如何解決這個問題?
答案1
這是 MQ 名稱的問題。
server.xml 中的 jndiName="queue/t24OFSReplyQueue 配置應該是 API.RUNTIME_REPLY_ET_FIX.AI,而我將其配置為 API.RUNTIME_REQUEST_ET_FIX.AI。