简体   繁体   English

将weblogic JMS移至Oracle Advanced Queuing时出错

[英]Error while moving weblogic JMS to Oracle Advanced Queuing

I'm trying to use Oracle Advanced Queuing instead of a running JMS implementation in weblogic. 我正在尝试使用Oracle Advanced Queuing代替weblogic中正在运行的JMS实现。

In theory I have everything configured as it should (as per documentation) in Weblogic but, when trying to send a message I get the following error: 从理论上讲,我已经按照Weblogic的说明(根据文档)对所有内容进行了配置,但是,当尝试发送消息时,出现以下错误:

####<Sep 18, 2019 10:27:12,290 AM CEST> <Info> <EJB> <svc-1> <svc_srv_1> <[ACTIVE] ExecuteThread: '4'
 for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <5e679652-75c8-44bc-948a-cec4ee2af708-00000437> 
<1568795232290> <[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-010213> 
<Message-Driven EJB: OutQueueMDBReader's transaction was rolled back, because javax.jms.JMSRuntimeException: 
[JMSPool:169829]JMS 2.0 method "createContext(int sessionMode)", called on the interface 
"javax.jms.ConnectionFactory", is not implemented by this JMS Provider.: 
java.lang.AbstractMethodError: oracle.jms.AQjmsXAQueueConnectionFactory.createXAContext()Ljavax/jms/XAJMSContext;
        at weblogic.deployment.jms.JMSExceptions.getJMSRuntimeException(JMSExceptions.java:47)
        at weblogic.deployment.jms.PooledConnectionFactory.createContext(PooledConnectionFactory.java:298)
        at weblogic.jms.integration.injection.AbstractJMSContextManager.createContext(AbstractJMSContextManager.java:68)
        at weblogic.jms.integration.injection.AbstractJMSContextManager.getContext(AbstractJMSContextManager.java:49)
        at weblogic.jms.integration.injection.TransactedJMSContextManager$Proxy$_$$_WeldClientProxy.getContext(Unknown Source)
        at weblogic.jms.integration.injection.InjectableJMSContext.delegate(InjectableJMSContext.java:144)
        at weblogic.jms.integration.injection.ForwardingJMSContext.createBytesMessage(ForwardingJMSContext.java:105)
        Truncated. see log file for complete stacktrace
java.lang.AbstractMethodError: oracle.jms.AQjmsXAQueueConnectionFactory.createXAContext()Ljavax/jms/XAJMSContext;
        at weblogic.deployment.jms.PsuedoXAJMSContext.<init>(PsuedoXAJMSContext.java:87)
        at weblogic.deployment.jms.PrimaryContextHelper.openConnection(PrimaryContextHelper.java:355)
        at weblogic.deployment.jms.PrimaryContextHelper.<init>(PrimaryContextHelper.java:180)
        at weblogic.deployment.jms.PrimaryContextHelper$PrimaryContextHelperServiceGeneratorImpl.createPrimaryContextHelperService(PrimaryContextHelper.java:1205)
        at weblogic.deployment.jms.PooledConnectionFactory.createNonPooledPrimaryContext(PooledConnectionFactory.java:562)
        at weblogic.deployment.jms.PooledConnectionFactory.createContextInternal(PooledConnectionFactory.java:488)
        at weblogic.deployment.jms.PooledConnectionFactory.createContext(PooledConnectionFactory.java:296)
        at weblogic.jms.integration.injection.AbstractJMSContextManager.createContext(AbstractJMSContextManager.java:68)
        at weblogic.jms.integration.injection.AbstractJMSContextManager.getContext(AbstractJMSContextManager.java:49)
        at weblogic.jms.integration.injection.TransactedJMSContextManager$Proxy$_$$_WeldClientProxy.getContext(Unknown Source)
        Truncated. see log file for complete stacktrace

The last place where my code runs is just: 我的代码运行的最后一个地方是:

    @Inject
    @JMSConnectionFactory("MyConnectionFactory")
    private JMSContext context;

    BytesMessage bytesMessage = getContext().createBytesMessage();

I've already checked this JMS 2.0 documentation and it seems everything should be working. 我已经检查了此JMS 2.0文档 ,似乎一切都应该正常工作。 May I be importing interfaces from different versions or something like this? 我可以从其他版本或类似的版本导入接口吗?

Based on this message in your log: 根据日志中的以下消息:

JMS 2.0 method "createContext(int sessionMode)", called on the interface "javax.jms.ConnectionFactory", is not implemented by this JMS Provider.: java.lang.AbstractMethodError: oracle.jms.AQjmsXAQueueConnectionFactory.createXAContext()Ljavax/jms/XAJMSContext; 此JMS提供者未实现在接口“ javax.jms.ConnectionFactory”上调用的JMS 2.0方法“ createContext(int sessionMode)”。 / XAJMSContext;

The documentation you cited is just an article about what's new in the JMS 2.0 specification. 您引用文档只是有关JMS 2.0规范中的新增功能的文章。 It makes no statement about what support OAQ provides for these new features. 它没有说明OAQ为这些新功能提供了哪些支持。 The fact that you're receiving the error message as well as the fact that when you remove OAQ it works indicates to me that OAQ simply doesn't support JMS 2.0. 您收到错误消息的事实以及在删除OAQ时都能正常工作的事实向我表明,OAQ根本不支持JMS 2.0。 I recommend you modify your application to use the JMS 1.1 API. 我建议您修改应用程序以使用JMS 1.1 API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM