简体   繁体   中英

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.

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:

####<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. 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;

The documentation you cited is just an article about what's new in the JMS 2.0 specification. It makes no statement about what support OAQ provides for these new features. 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. I recommend you modify your application to use the JMS 1.1 API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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