Weblogic JMS 异常 055167“无法支持多个同步消息预取使用者。”
这是什么意思?
我继承了一个复杂的 Java 库,但集成测试失败。该库使用通用的发布/订阅范例,但我必须承认,当涉及到 Weblogic/JMS/Spring 的任何内容时,我都非常缺乏经验。测试应用程序在一台服务器上运行,并通过 JNI 从 C++ 调用 Java,并通过 fork 启动子发布者进程(通过 JNI/Java 发布)。主应用程序通过 Spring 配置,并与安装在另一台服务器上的 Weblogic JMS 进行通信(Weblogic JMS 服务器由我们项目中的另一个组控制)。我设法打开 spring jms 调试,这有点帮助。因此,我的日志文件向我显示了一系列如下事件:
(My App) Publishing...
org.springframework.jms.connection.CachingConnectionFactory Creating cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]: weblogic.jms.client.WLProducerImpl@7b9a29
...
(My App) Publishing...
org.springframework.jms.connection.CachingConnectionFactory Found cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]: weblogic.jms.client.WLProducerImpl@7b9a29
...
(My App) Publishing...
org.springframework.jms.connection.CachingConnectionFactory Found cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]: weblogic.jms.client.WLProducerImpl@7b9a29
...
(My App) Subscribing to DataTest2
org.springframework.jndi.JndiTemplate Looking up JNDI object with name [DataTest2]
(My App) Launching publisher process...
org.springframework.jms.support.destination.JndiDestinationResolver Located object with JNDI name [DataTest2]
org.springframework.jms.connection.CachingConnectionFactory Creating cached JMS MessageConsumer for destination [MY-JMS-Module!DataTest2]: weblogic.jms.client.WLConsumerImpl@5e3eed51
(My App) Publishing....
org.springframework.jms.connection.CachingConnectionFactory Creating cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]
...
WARN 2011-11-14 22:01:00,421 org.springframework.jms.listener.DefaultMessageListenerContainer Setup of JMS message listener invoker failed for destination 'DataTest2' - trying to recover. Cause: [JMSClientExceptions:055167]Single session cannot support more than one synchronous message-prefetching consumer.
java.lang.UnsupportedOperationException: [JMSClientExceptions:055167]Single session cannot support more than one synchronous message-prefetching consumer.
at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:587)
at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
at org.springframework.jms.connection.CachedMessageConsumer.receive(CachedMessageConsumer.java:74)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:429)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:310)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
at java.lang.Thread.run(Thread.java:636)
我确实希望能够立即访问 Weblogic JMS 源代码来运行该异常。任何帮助或建议将不胜感激。就像我说的,代码有点复杂,所以我不确定我是否可以提供比上面截断的日志更多的信息,而无需将其变成小说。
What does it mean?
I inherited a complex Java library with a failing integration test. The library uses a general publish/subscribe paradigm, but I must confess I'm pretty inexperienced when it comes to any of this Weblogic/JMS/Spring stuff. The test application runs on one server and invokes Java from C++ via JNI, and launches a child publisher process via fork (that publishes via JNI/Java). THe main app is configured via Spring, and communicates with Weblogic JMS installed on another server (the Weblogic JMS server is controlled by another group on our project). I managed to turn on spring jms debugging, which has been somewhat helpful. So my log file is showing me a sequence of events like this:
(My App) Publishing...
org.springframework.jms.connection.CachingConnectionFactory Creating cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]: weblogic.jms.client.WLProducerImpl@7b9a29
...
(My App) Publishing...
org.springframework.jms.connection.CachingConnectionFactory Found cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]: weblogic.jms.client.WLProducerImpl@7b9a29
...
(My App) Publishing...
org.springframework.jms.connection.CachingConnectionFactory Found cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]: weblogic.jms.client.WLProducerImpl@7b9a29
...
(My App) Subscribing to DataTest2
org.springframework.jndi.JndiTemplate Looking up JNDI object with name [DataTest2]
(My App) Launching publisher process...
org.springframework.jms.support.destination.JndiDestinationResolver Located object with JNDI name [DataTest2]
org.springframework.jms.connection.CachingConnectionFactory Creating cached JMS MessageConsumer for destination [MY-JMS-Module!DataTest2]: weblogic.jms.client.WLConsumerImpl@5e3eed51
(My App) Publishing....
org.springframework.jms.connection.CachingConnectionFactory Creating cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]
...
WARN 2011-11-14 22:01:00,421 org.springframework.jms.listener.DefaultMessageListenerContainer Setup of JMS message listener invoker failed for destination 'DataTest2' - trying to recover. Cause: [JMSClientExceptions:055167]Single session cannot support more than one synchronous message-prefetching consumer.
java.lang.UnsupportedOperationException: [JMSClientExceptions:055167]Single session cannot support more than one synchronous message-prefetching consumer.
at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:587)
at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
at org.springframework.jms.connection.CachedMessageConsumer.receive(CachedMessageConsumer.java:74)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:429)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:310)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
at java.lang.Thread.run(Thread.java:636)
I sure wish I had access to the Weblogic JMS source code to run down that exception right about now. Any help or advice would be appreciated. Like I said, the code is kind of complex, so I'm not sure I can provide much more info than my truncated log snipped above, without turning this into a novel.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TL;DR 版本
尝试在 Weblogic 管理控制台中禁用 JMS 连接工厂之一的消息预取。
长版
希望这会有所帮助,因为我不完全熟悉 Weblogic 的这方面。
基本入门是来自 Oracle 文档的流程图。
您拥有的日志消息显示了查找连接工厂 JNDI、创建连接、从该连接创建会话、查找目标 JNDI、注册消费者和生产者等基本内容。
当它意识到有多个消费者启用了预取之后,它似乎失败了。
此预取是同步消费者的一个属性,它支持预取批量消息提高性能。
请参阅标题为“使用预取模式创建同步消息管道”的章节。
从管理控制台,尝试设置“预取模式同步消费者”这个到禁用
我遇到的其他文档是错误代码解释
TL;DR version
Try disabling Message Prefetch for one of the JMS Connection Factories within Weblogic Admin Console.
Long Version
Hope this helps since I'm not fully familiar with this aspect of Weblogic.
The Basic Primer is this flowchart from the Oracle docs.
The log messages you have show the basic stuff happening as far as looking up the Connection Factory JNDI, Creating a Connection, Creating a Session from that Connection, Look up the destination JNDI, Registering the Consumers and Producers goes.
It seems to be failing after that when it realizes that there are more than one consumer with prefetching enabled.
This prefetch is a property of the Synchronous Consumer which enables prefetching batches of messages to improve performance.
See the Sec titled "Using the Prefetch Mode to Create a Synchronous Message Pipeline"
From the Admin Console, Try setting "Prefetch Mode for Synchronous Consumer" this to Disabled
The other docs I came across are the Error Code explanation