gpt4 book ai didi

jboss - MQJMS2005 : failed to create MQQueueManager from JBOSS

转载 作者:行者123 更新时间:2023-12-01 16:31:54 27 4
gpt4 key购买 nike

使用 JBOSS 4.3 和 Java 1.5.0_15 连接到 IBM WebSphere MQ 6.0.2.3

当 JBOSS 启动时,会发生这些错误。

堆栈跟踪

Caused by: javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN'
at com.ibm.mq.connector.ResourceAdapterConnectionPool.allocateConnection(ResourceAdapterConnectionPool.java:297)
at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:333)
at org.jboss.resource.deployment.RARDeployment.endpointActivation(RARDeployment.java:271)
at org.jboss.resource.deployment.RARDeployment.internalInvoke(RARDeployment.java:226)
at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:46)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.activate(JBossMessageEndpointFactory.java:343)
... 147 more


Caused by: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:614)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2549)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1899)
at com.ibm.mq.jms.MQConnection.<init>(MQConnection.java:862)
at com.ibm.mq.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:4821)
at com.ibm.mq.connector.ResourceAdapterConnectionPool.initializeJMSConnection(ResourceAdapterConnectionPool.java:445)
at com.ibm.mq.connector.ResourceAdapterConnectionPool.createNewConnection(ResourceAdapterConnectionPool.java:359)
at com.ibm.mq.connector.ResourceAdapterConnectionPool.allocateConnection(ResourceAdapterConnectionPool.java:284)
... 155 more

在 JBOSS server.log 文件的末尾。
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:ear=AmxBol.ear,jar=AmxBol.jar,name=BOLCFulfillmentMDB,service=EJB3
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:bolcustomizable@UATMQ1SUN@uatmq1sun; - nested throwable: (javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN')

ObjectName: jboss.j2ee:ear=AmxBol.ear,jar=AmxBol.jar,name=BOLPaymentMDB,service=EJB3
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:bolpayment@UATMQ1SUN@uatmq1sun; - nested throwable: (javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN')

ObjectName: jboss.j2ee:ear=AmxBol.ear,jar=AmxBol.jar,name=BOLPFulfillmentMDB,service=EJB3
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:bolpersonalized@UATMQ1SUN@uatmq1sun; - nested throwable: (javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN')

我不确定它是否相关,但最近对 JBOSS 应用了一个补丁。队列管理器 (UATMQ1SUN) 已启动并正在运行,但它似乎不想连接。关于可能出什么问题的任何想法? MQ 和 JBOSS 生活在同一个盒子上。
hostname = uatmq1sun
QManagerName = UATMQ1SUN

[mqm@uatmq1sun ~]$ strmqm UATMQ1SUN
WebSphere MQ queue manager running.

[mqm@uatmq1sun ~]$ netstat -an | grep 1416
tcp 0 0 :::1416 :::* LISTEN

最佳答案

JMS 抛出嵌套异常,其中高级异常包含通用 JMS 故障代码,链接异常包含特定于提供者的异常。因此,例如,在创建 QMgr 对象失败的所有可能原因中,有些是本地的,包括配置错误等,有些仅在尝试连接时发生。换句话说,您报告的错误的某些情况是代码,而某些是 MQ。如果没有链接异常,则问题不在于 MQ。

在连接尝试时才发生的那些(那些是 MQ 问题),链接异常明确地告诉你它是否连接但发现错误的 QMgr 名称,或者没有监听器,或者 channel 协商失败等. 但是这些非常具体的解释只有在代码费心打印链接异常时才可用。

在我工作或咨询过的许多商店中,如果发现 JMS 代码不打印链接异常,则将其视为 Sev-1 缺陷,并对此进行了测试。此类代码无法提升到生产环境,如果在生产环境中发现,则将其作为紧急更改进行提取和修复。预期代码要么打印链接异常,要么打印它检查过但不存在链接异常。如果没有这些,我们在这里能做的最好的事情(或者您的运营团队在实际中断时可以做的)只是猜测。

来自 JMS exceptions 上的 WebSphere MQ 信息中心页面:

catch (JMSException je) {
System.err.println("Caught JMSException");

// Check for linked exceptions in JMSException
Throwable t = je;
while (t != null) {
// Write out the message that is applicable to all exceptions
System.err.println("Exception Msg: " + t.getMessage());
// Write out the exception stack trace
t.printStackTrace(System.err);

// Add on specific information depending on the type of exception
if (t instanceof JMSException) {
JMSException je1 = (JMSException) t;
System.err.println("JMS Error code: " + je1.getErrorCode());

if (t instanceof JmsExceptionDetail){
JmsExceptionDetail jed = (JmsExceptionDetail)je1;
System.err.println("JMS Explanation: " + jed.getExplanation());
System.err.println("JMS Explanation: " + jed.getUserAction());
}
} else if (t instanceof MQException) {
MQException mqe = (MQException) t;
System.err.println("WMQ Completion code: " + mqe.getCompCode());
System.err.println("WMQ Reason code: " + mqe.getReason());
} else if (t instanceof JmqiException){
JmqiException jmqie = (JmqiException)t;
System.err.println("WMQ Log Message: " + jmqie.getWmqLogMessage());
System.err.println("WMQ Explanation: " + jmqie.getWmqMsgExplanation());
System.err.println("WMQ Msg Summary: " + jmqie.getWmqMsgSummary());
System.err.println("WMQ Msg User Response: "
+ jmqie.getWmqMsgUserResponse());
System.err.println("WMQ Msg Severity: " + jmqie.getWmqMsgSeverity());
}

// Get the next cause
t = t.getCause();
}
}

尝试使用任何传输提供程序调试任何 JMS 异常时,请打印链接的异常。该规范定义了一个嵌套数据结构来传达异常诊断条件,并且没有理由无法打印该信息。

关于jboss - MQJMS2005 : failed to create MQQueueManager from JBOSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15819572/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com