Javax.jms.JMSException: [C4073]: Consumer limit exceeded on destination..

I seem to be getting this with the JMS queue.
javax.jms.JMSException: [C4073]: Consumer limit exceeded on destination notificationQueue
one the call
QueueReceiver subscriber = subSession.createReceiver(notificationQueue);
Works fine in Jboss and Jonas App Servers.
Stack Trace
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.sun.messaging.jmq.jmsclient.ProtocolHandler.addInterest(ProtocolHandler.java:1430)
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.sun.messaging.jmq.jmsclient.WriteChannel.addInterest(WriteChannel.java:55)
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.sun.messaging.jmq.jmsclient.ConnectionImpl.addInterest(ConnectionImpl.java:631)
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.sun.messaging.jmq.jmsclient.Consumer.registerInterest(Consumer.java:101)
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl.addInterest(MessageConsumerImpl.java:127)
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl.init(MessageConsumerImpl.java:122)
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.sun.messaging.jmq.jmsclient.QueueReceiverImpl.<init>(QueueReceiverImpl.java:40)
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.sun.messaging.jmq.jmsclient.UnifiedSessionImpl.createReceiver(UnifiedSessionImpl.java:83)
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.sun.enterprise.jms.SessionWrapperBase.createReceiver(SessionWrapperBase.java:213)
[08/Oct/2003:14:39:57] INFO ( 4936): CORE3282: stdout:      at com.jario.server.notification.NotificationServer.getNotifications(NotificationServer.java:152)

I did notice that Admin tracking for PetStore demo fails with exceptions. In fact I had to restart the PetStore admin webapp just to get url to function again...still couldn't login in and track items via WebStart though.
AdventureBuilder works fine too. Only error (noncritical?) was again at checkout.
Most errors seem to be involving method 'findByPrimaryKey'.
<[INFO][j2eesdk1.4_beta2][][][16][javax.enterprise.system.container.ejb][21.October.2003 17:40:54:723 PDT][
javax.ejb.ObjectNotFoundException: Bean CounterEJB method findByPrimaryKey: cannot find bean with key 5432
at com.sun.j2ee.blueprints.uidgen.counter.ejb.CounterEJB_217019936_ConcreteImpl.ejbFindByPrimaryKey(CounterEJB_217019936_ConcreteImp
l.java:210)

Similar Messages

  • Memory Leak, Receiver Got Null Message & Consumer limit exceeded on destina

    When running program that adds an Object message to a JMS queue and then recieves it. I get the following.
    1) interminitent NULL messages recieved.
    2) jms.JMSException: [C4073]: Consumer limit exceeded on destination interactionQueueDest. Even though only one receiver can be receiving via the supplied program.
    3) After many message are added to the queue 1000's the Message Queue goes to Out Of Memory exception. It should swap to disk!!
    STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
    RUN this program via a JSP call in the application server.
    JSP
    <%@ page language="java" import="jms.*"%>
    <html>
    <head>
    <title>Leak Memory</title>
    </head>
    <body>
    <hr/>
    <h1>Leak Memory</h1>
    <%
       LeakMemory leakMemory = new LeakMemory();
       leakMemory.runTest(10000,1000);
      // NOTE will brake but slower with setting leakMemory.runTest(10000,100);
    %>JMS resources must be created:
    jms/queueConnectionFactory
    jms/interactionQueue
    must be created first.
    Class:
    package jms;
    import javax.naming.*;
    import javax.jms.*;
    public class LeakMemory implements Runnable {
      private QueueConnectionFactory queueConnectionFactory = null;
      private Queue interactionQueue = null;
      private boolean receiverRun = true;
      private QueueConnection queueConnection;
      private int totalMessageInQueue = 0;
      public LeakMemory() {
        init();
       * initialize queues
      public void init(){
        try {
          InitialContext context = new InitialContext();
          this.queueConnectionFactory = (QueueConnectionFactory)context.lookup("jms/queueConnectionFactory");
          this.interactionQueue = (Queue) context.lookup("jms/interactionQueue");
        catch (NamingException ex) {
          printerError(ex);
      public void runTest(int messageCount, int messageSize){
        this.receiverRun = true;
        Thread receiverThread = new Thread(this);
        receiverThread.start();
        for (int i = 0; i < messageCount; i++) {
            StringBuffer messageToSend = new StringBuffer();
            for (int ii = 0; ii < messageSize; ii++) {
              messageToSend.append("0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\n");
            QueueConnection queueConnectionAdder = null;
            QueueSession queueInteractionSession = null;
            QueueSender interactionQueueSender = null;
            try {
                //Get a queue connection
                queueConnectionAdder = this.getQueueConnection();
                queueInteractionSession = queueConnectionAdder.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
                interactionQueueSender = queueInteractionSession.createSender(this.interactionQueue);
                ObjectMessage objectMessage = queueInteractionSession.createObjectMessage(messageToSend);
                objectMessage.setStringProperty("PROPERTY", "" + System.currentTimeMillis());
                //Send object
                interactionQueueSender.send(objectMessage,DeliveryMode.PERSISTENT,5,0);
                totalMessageInQueue++;
                //Close Resources
                interactionQueueSender.close();
                queueInteractionSession.close();
                interactionQueueSender = null;
                queueInteractionSession = null;
            } catch (JMSException ex) {
               printerError(ex);
       * run
      public void run()  {
        while(this.receiverRun){
                try {
                  QueueSession interactionQueueSession = this.getQueueConnection().createQueueSession(false, Session.CLIENT_ACKNOWLEDGE);
                  QueueReceiver queueReceiver = interactionQueueSession.createReceiver(this.interactionQueue);
                  ObjectMessage message = (ObjectMessage)queueReceiver.receive(100);
                  if(message != null){
                    StringBuffer messageRecived = (StringBuffer)message.getObject();
                    //Simulate Doing Something
                    synchronized (this) {
                      try {
                        Thread.sleep(400);
                      catch (InterruptedException ex1) {
                        //Can Safely be ignored
                    message.acknowledge();
                    totalMessageInQueue--;
                  } else {
                    printerError(new Exception("Receiver Got Null Message"));
                  queueReceiver.close();
                  interactionQueueSession.close();
                  queueReceiver = null;
                  interactionQueueSession = null;
                catch (JMSException ex) {
                  printerError(ex);
        * Get's the queue Connection and starts it
        * @return QueueConnection The queueConnection
       public synchronized QueueConnection getQueueConnection(){
           if (this.queueConnection == null) {
             try {
               this.queueConnection = this.queueConnectionFactory.createQueueConnection();
               this.queueConnection.start();
             catch (JMSException ex) {
               printerError(ex);
         return this.queueConnection;
       private void printerError(Exception ex){
         System.err.print("ERROR Exception totalMessageInQueue = " + this.totalMessageInQueue + "\n");
         ex.printStackTrace();
    }Is there something wrong with the way I'm working with JMS or is it just this unreliable in Sun App Server 7 Update 3 on windows?

    1) interminitent NULL messages recieved.Thanks that explains the behavior. It was wierd getting null messages when I know there is messages in the queue.
    2) jms.JMSException: [C4073]: Consumer limit exceeded
    on destination interactionQueueDest. Even though only
    one receiver can be receiving via the supplied
    program. No other instances, Only this program. Try it yourself!! It works everytime on Sun Application Server 7 update 2 & 3
    heres the broker dump at that error point
    [14/Apr/2004:12:51:47 BST] [B1065]: Accepting: [email protected]:3211->admin:3205. Count=1
    [14/Apr/2004:12:51:47 BST] [B1066]:   Closing: [email protected]:3211->admin:3205. Count=0
    [14/Apr/2004:12:52:20 BST] [B1065]: Accepting: [email protected]:3231->jms:3204. Count=1 [14/Apr/2004:12:53:31 BST] WARNING [B2009]: Creation of consumer  from connection [email protected]:3231 on destination interactionQueueDest failed:
    B4006: com.sun.messaging.jmq.jmsserver.util.BrokerException: [B4006]: Unable to attach to queue queue:single:interactionQueueDest: a primary queue is already active
    3) After many message are added to the queue 1000's
    the Message Queue goes to Out Of Memory exception. It
    should swap to disk!!The broker runs out of memory. Version in use
    Sun ONE Message Queue                   Copyright 2002
    Version:  3.0.1 SP2 (Build 4-a)              Sun Microsystems, Inc.
    Compile:  Fri 07/11/2003         All Rights ReservedOut of memory snippet
    [14/Apr/2004:13:08:28 BST] [B1089]: In low memory condition, Broker is attempting to free up resources
    [14/Apr/2004:13:08:28 BST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0021]: GREEN  - current memory is 118657K, 60% of total memory
    [14/Apr/2004:13:08:38 BST] WARNING [B2075]: Broker ran out of memory before the passed in VM maximum (-Xmx) 201326592 b,  lowering max to currently allocated memory (200431976 b ) and trying to recover [14/Apr/2004:13:08:38 BST] [B1089]: In low memory condition, Broker is attempting to free up resources
    [14/Apr/2004:13:08:38 BST] [B1088]: Entering Memory State [B0024]:  RED  from previous state [B0022]: YELLOW - current memory is 128796K, 99% of total memory [14/Apr/2004:13:08:38 BST] ERROR [B3008]: Message 2073-192.168.0.50(80:d:b6:c4:d6:73)-3319-1081944517772 exists in the store already [14/Apr/2004:13:08:38 BST] WARNING [B2011]: Storing of JMS message from IMQConn[AUTHENTICATED,[email protected]:3319,jms:3282] failed:
    com.sun.messaging.jmq.jmsserver.util.BrokerException: Message 2073-192.168.0.50(80:d:b6:c4:d6:73)-3319-1081944517772 exists in the store already
    [14/Apr/2004:13:08:38 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:38 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:39 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:39 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:39 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:39 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:40 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:40 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:40 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:40 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:41 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:42 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:42 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:42 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:42 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:43 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:43 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:43 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:43 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:44 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:44 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:44 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:45 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:45 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:46 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:46 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:47 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:47 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:47 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:47 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:48 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:49 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:49 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:49 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:49 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:50 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:50 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:50 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:50 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:51 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:51 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:51 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:51 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:52 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:52 BST] WARNING [B2076]: Broker is rejecting new producers, because it is extremely low on memory
    [14/Apr/2004:13:08:53 BST] ERROR [B3107]: Attempt to free memory failed, taking more drastic measures : java.lang.OutOfMemoryError
    [14/Apr/2004:13:08:53 BST] ERROR unable to deal w/ error: 1
    [14/Apr/2004:13:08:53 BST] ERROR TRYING TO CLOSE [14/Apr/2004:13:08:53 BST] ERROR DONE CLOSING
    [14/Apr/2004:13:08:53 BST] [B1066]:   Closing: [email protected]:3319->jms:3282. Count=0

  • Web Start Console :NoClassDefFoundError: javax/jms/JMSException

    HI all,
    am using JBoss server, J2SE1.4 ,windows XP
    This my JNLP file :
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="http://172.25.186.50:8080/JMSClient" href="JmsClient.jnlp">
    <information>
    <title>My JMS Consumer</title>
    <vendor> System</vendor>
    <icon href="icon.png"/>
    <icon href="splash.png" kind="splash"/>
    </information>
    <security>
    <j2ee-application-client-permissions/>
    </security>
    <resources>
    <j2se version="1.4+"/>
    <jar href="JMSconsumer.jar" main="true" download="eager"/>
    <jar href="WEB-INF/lib/jboss-j2ee.jar"/>
    <jar href="WEB-INF/lib/concurrent.jar"/>
    <jar href="WEB-INF/lib/jboss-common.jar"/>
    <jar href="WEB-INF/lib/jbossmq.jar"/>
    <jar href="WEB-INF/lib/jnlp-servlet.jar"/>
    <jar href="WEB-INF/lib/jardiff.jar"/>
    <jar href="WEB-INF/lib/jnlp.jar"/>
    <jar href="WEB-INF/lib/jnpserver.jar"/>
    </resources>
    <application-desc main-class="TafConsumer"/>
    </jnlp>
    Console Error message :
    Java Web Start 1.4.2_06 Console, started Fri May 05 15:51:29 IST 2006 Java 2
    Runtime Environment: Version 1.4.2_06 by Sun Microsystems Inc. Logging to
    file: C:\Documents and Settings\2210\Desktop\tafClient.log
    java.lang.NoClassDefFoundError: javax/jms/JMSException at
    java.lang.Class.getDeclaredMethods0(Native Method) at
    java.lang.Class.privateGetDeclaredMethods(Unknown Source) at
    java.lang.Class.getMethod0(Unknown Source) at
    java.lang.Class.getMethod(Unknown Source) at
    com.sun.javaws.Launcher.executeApplication(Unknown Source) at
    com.sun.javaws.Launcher.executeMainClass(Unknown Source) at
    com.sun.javaws.Launcher.continueLaunch(Unknown Source) at
    com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source) at
    com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) at
    com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown
    Source)
    this is for my JMSconsumer.jar which has all my Classes(.class files)
    MANIFEST.MF
    Manifest-Version: 1.0
    Created-By: 1.4.2_04 (Sun Microsystems Inc.)
    Main-Class: TafConsumer
    This is for my WAR file..
    MANIFEST.MF
    Manifest-Version: 1.0
    Created-By: 1.4.2_04 (Sun Microsystems Inc.)
    Main-Class: TafConsumer
    Class-Path: WEB-INF/lib/concurrent.jar WEB-INF/lib/jardiff.jar WEB-INF/lib/jboss-common.jar WEB-INF/lib/jboss-j2ee.jar WEB-INF/lib/jbossmq.jar WEB-INF/lib/jnlp.jar WEB-INF/lib/jnlp-servlet.jar WEB-INF/lib/jnpserver.jar JMSconsumer.jar
    while am running application it looks for JBoss-j2ee.jar file .. i have mention all the jar files which are required to run my application .... in JNLP file..
    it was executing in my command prompt
    like D:\java -jar applicationname.war
    Am getting out put properly... ( I have mention in MAIFEST.MF file .. that this is my main class and class path also(for Jar files).. )
    am missing some where around Jar file config..
    pls. any one can give me the solution..
    Thanks
    Dhana

    Have you signed your jars ?

  • Javax.jms.JMSException: Not supported in XA-backed session outside globaltx

    I am trying to setup OracleOJMS provider and tries to access queue and post to queue from a normal jsp for testing.
    I am getting the following
    code:
    javax.jms.JMSException: Not supported in XA-backed session outside global transaction
         at oracle.j2ee.ra.jms.generic.RAUtils.make(RAUtils.java:525)
         at oracle.j2ee.ra.jms.generic.RAUtils.toJMSException(RAUtils.java:199)
         at oracle.j2ee.ra.jms.generic.RAUtils.toJMSException(RAUtils.java:210)
         at oracle.j2ee.ra.jms.generic.CommonProducerWrapper.prepareForSend(CommonProducerWrapper.java:350)
         at oracle.j2ee.ra.jms.generic.CommonProducerWrapper.send(CommonProducerWrapper.java:159)
         at ResourceProvider.jspService(_ResourceProvider.java:112)
         at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Steps i have done
    ResourceProvider.jsp
    code:
    <!-- JSP Imports -->
    <%@ page import="javax.jms.QueueConnectionFactory "%>
    <%@ page import="javax.jms.XAQueueConnectionFactory "%>
    <%@ page import="javax.jms.QueueConnection "%>
    <%@ page import="javax.jms.QueueSession "%>
    <%@ page import="javax.jms.Queue "%>
    <%@ page import="javax.jms.QueueSender "%>
    <%@ page import="javax.jms.Message "%>
    <%@ page import="javax.jms.Session "%>
    <%@ page import="javax.naming.Context "%>
    <%@ page import="javax.naming.InitialContext "%>
    <html>
    <head>
    <title>
    Configuration of ResourceProvider for Advanced Queueing
    </title>
    </head>
    <body>
    <form name="TestResourceProvider" method="GET">
    <%
    // Check if the message has to be enqueued
    if (request.getParameter("Message") != null){
    Context jndiContext = new InitialContext();
    XAQueueConnectionFactory queueCF = (XAQueueConnectionFactory)jndiContext.lookup
    ("java:comp/env/jms/InQueueCF");
    Queue queue = (Queue)jndiContext.lookup("java:comp/env/jms/InQueue");
    QueueConnection queueConnection = queueCF.createQueueConnection();
    // Start the Connection
    queueConnection.start();
    QueueSender sender = queueSession.createSender(queue);
    Message msg = queueSession.createTextMessage(request.getParameter("Message"));
    sender.send(msg);
    queueSession.commit();
    sender.close();
    queueSession.close();
    queueConnection.close();
    %>
    <%
    }else{
    // User can enter the message to be enqueued through here
    %>
    Enter the message to be enqueued
    <INPUT type="text" name="Message">
    <br><br>
    <input type="Submit" value="Enqueue Message">
    <%
    %>
    </form>
    </body>
    </html>
    My Steps for OJMS PRovider
    1. Creating AQ queue in DB
    2. configuration of resource adapter and provider
    3. configuration of connection factories for resourceadapter[jmsconnector]
    code:
    1. Created the Queue table in DB using the sql
    DROP USER jmsuser CASCADE;
    GRANT connect, resource,AQ_ADMINISTRATOR_ROLE TO jmsuser IDENTIFIED BY jmsuser;
    GRANT execute ON sys.dbms_aqadm TO jmsuser;
    GRANT execute ON sys.dbms_aq TO jmsuser;
    GRANT execute ON sys.dbms_aqin TO jmsuser;
    GRANT execute ON sys.dbms_aqjms TO jmsuser;
    connect jmsuser/jmsuser;
    -- Create table to hold the queue, then create queue.
    -- For topics multiple_consumers must be true
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE( Queue_table => 'SMSCP_INQTBL', Queue_payload_type => 'SYS.AQ$_JMS_MESSAGE',
    sort_list => 'PRIORITY,ENQ_TIME', multiple_consumers => false, compatible => '8.1.5');
    DBMS_AQADM.CREATE_QUEUE( Queue_name => 'SMSCP_INQ', Queue_table => 'SMSCP_INQTBL');
    DBMS_AQADM.START_QUEUE(queue_name => 'SMSCP_INQ');
    END;
    quit;
    Now our queue Name is queue Name : SMSCP_INQ table Name: SMSCP_INQTBL
    2. Creating the Cp and datasource for the db [jmsuser] to make java to access queue
    Creating ConnectionPool jmsDBPool
    Creating DataSource jmsDBDataSource
    Jndi jdbc jdbc/JMSDBDS
    After creating, i got the following data-sources.xml
    DATASOURCES.XML
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <data-sources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd" schema-major-version="10" schema-minor-version="1">
    <!-- default one comes with oracle shipping -->
    <managed-data-source connection-pool-name="Example Connection Pool" jndi-name="jdbc/OracleDS" name="OracleDS"/>
    <!-- New one Created -->
         <managed-data-source connection-pool-name="jmsDBPool" jndi-name="jdbc/JMSDBDS" name="jmsDBDataSource"/>
    <!-- default one comes with oracle shipping -->
    <connection-pool name="Example Connection Pool">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="scott" password="tiger" url="jdbc racle:thin:@//localhost:1521/ORCL"/>
    </connection-pool>
    <!-- New one Created -->
    <connection-pool name="jmsDBPool">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="jmsuser" password="jmsuser" url="jdbc racle:thin:@//localhost:1521/xe"/>
    </connection-pool>
    </data-sources>
    3. JMS Connector Task. Customising the ra.xml
    ra.xml
    <!-- resourceadapter -->
    <resourceadapter>
    <resourceadapter-class>oracle.j2ee.ra.jms.generic.JMSResourceAdapter</resourceadapter-class>
    <config-property>
    <config-property-name>lookupMethod</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>resourceProvider</config-property-value>
    </config-property>
    <config-property>
    <config-property-name>resourceProviderName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>testResourceProvider</config-property-value>
    </config-property>
    <!-- adminobject configuration -->
              <adminobject>
    <adminobject-interface>javax.jms.Queue</adminobject-interface>
    <adminobject-class>oracle.j2ee.ra.jms.generic.AdminObjectQueueImpl</adminobject-class>
    <config-property>
    <config-property-name>jndiName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>Queues/MY_QUEUE</config-property-value>
    </config-property>
    <config-property>
    <config-property-name>resourceProviderName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>testResourceProvider</config-property-value>
    </config-property>
    </adminobject>
    <!--
    <adminobject>
    <adminobject-interface>javax.jms.Topic</adminobject-interface>
    <adminobject-class>oracle.j2ee.ra.jms.generic.AdminObjectTopicImpl</adminobject-class>
    <config-property>
    <config-property-name>jndiName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>Topics/MY_TOPIC</config-property-value>
    </config-property>
    <config-property>
    <config-property-name>resourceProviderName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>testResourceProvider</config-property-value>
    </config-property>
    </adminobject>
    -->
    <adminobject>
    <adminobject-interface>javax.jms.Queue</adminobject-interface>
    <adminobject-class>oracle.j2ee.ra.jms.generic.AdminObjectQueueImpl</adminobject-class>
    <config-property>
    <config-property-name>resourceProviderName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>testResourceProvider</config-property-value>
    </config-property>
    </adminobject>
    <adminobject>
    <adminobject-interface>javax.jms.Topic</adminobject-interface>
    <adminobject-class>oracle.j2ee.ra.jms.generic.AdminObjectTopicImpl</adminobject-class>
    <config-property>
    <config-property-name>resourceProviderName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>testResourceProvider</config-property-value>
    </config-property>
    </adminobject>
    </resourceadapter>
    4. Create a JMS Connector INstance
    oc4j-connectors.xml
         <connector name="testResourceAdapter" path="testResourceAdapter.rar">
              <config-property name="lookupMethod" value="resourceProvider"/>
              <config-property name="resourceProviderName" value="testResourceProvider"/>
              <!-- Default element generated by OC4J. Please uncomment and modify to suit your configuration needs.
              <adminobject-config location="">
                   <adminobject-class>oracle.j2ee.ra.jms.generic.AdminObjectQueueImpl</adminobject-class>
                   <config-property name="jndiName" value="Queues/MY_QUEUE"/>
                   <config-property name="resourceProviderName" value="ojmsRP"/>
              </adminobject-config>
              -->
              <!-- Default element generated by OC4J. Please uncomment and modify to suit your configuration needs.
              <adminobject-config location="">
                   <adminobject-class>oracle.j2ee.ra.jms.generic.AdminObjectTopicImpl</adminobject-class>
                   <config-property name="jndiName" value="Topics/MY_TOPIC"/>
                   <config-property name="resourceProviderName" value="ojmsRP"/>
              </adminobject-config>
              -->
         </connector>
    5. RA Connection Factories
    <?xml version="1.0" encoding="UTF-8"?>
    <oc4j-connector-factories xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/oc4j-connector-factories-10_0.xsd"
    schema-major-version="10"
    schema-minor-version="0">
    <connector-factory location="resourceAdapterXAQCF/MYXAQCF" connector-name="testResourceAdapter">
    <config-property name="jndiLocation" value="XAQueueConnectionFactories/XAQCF"/>
    <connection-pooling use="private">
    <property name="waitTimeout" value="300" />
    <property name="scheme" value="fixed_wait" />
    <property name="maxConnections" value="50" />
    <property name="minConnections" value="0" />
    </connection-pooling>
    <connectionfactory-interface>javax.jms.XAQueueConnectionFactory</connectionfactory-interface>
    </connector-factory>
    </oc4j-connector-factories>
    orion-web.xml
    <?xml version="1.0"?>
    <orion-web-app
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd"      deployment-version="10.1.3.1.0"
         deployment-time="1218369811921"
         jsp-cache-directory="./persistence"
         jsp-cache-tlds="standard"
         temporary-directory="./temp"
         context-root="/smscpReceiver"
    schema-major-version="10" schema-minor-version="0" >
         <!-- Uncomment this element to control web application class loader behavior.
              <web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true" />
         -->
         <resource-ref-mapping name="jms/InQueueCF" location="resourceAdapterXAQCF/MYXAQCF" />
         <message-destination-ref-mapping location="resourceAdapterInQ/MYINQ" name="jms/InQueue">
              </message-destination-ref-mapping>
         <web-app>
         </web-app>
    </orion-web-app>
    web.xml
    <resource-ref>
         <res-ref-name>jms/InQueueCF</res-ref-name>
         <res-type>javax.jms.XAQueueConnectionFactory</res-type>
         <res-auth>Container</res-auth>
    </resource-ref>
    <message-destination-ref>
         <message-destination-ref-name>jms/InQueue</message-destination-ref-name>
         <message-destination-type>javax.jms.Queue</message-destination-type>
         <message-destination-usage>Produces</message-destination-usage>
         <message-destination-link>jms/InQueue</message-destination-link>
    </message-destination-ref>
    <message-destination>
    <message-destination-name>jms/InQueue</message-destination-name>
    </message-destination>

    Sorry for the jammed one
    Neat one.
    am trying to setup OracleOJMS provider and tries to access queue and post to queue from a normal jsp for testing.
    I am getting the following
    javax.jms.JMSException: Not supported in XA-backed session outside global transaction
    at oracle.j2ee.ra.jms.generic.RAUtils.make(RAUtils.java:525)
    at oracle.j2ee.ra.jms.generic.RAUtils.toJMSException(RAUtils.java:199)
    at oracle.j2ee.ra.jms.generic.RAUtils.toJMSException(RAUtils.java:210)
    at oracle.j2ee.ra.jms.generic.CommonProducerWrapper.prepareForS
    INVOCATION
    <form name="TestResourceProvider" method="GET">
    <%
    // Check if the message has to be enqueued
    if (request.getParameter("Message") != null){
    Context jndiContext = new InitialContext();
    XAQueueConnectionFactory queueCF = (XAQueueConnectionFactory)jndiContext.lookup
    ("java:comp/env/jms/InQueueCF");
    Queue queue = (Queue)jndiContext.lookup("java:comp/env/jms/InQueue");
    QueueConnection queueConnection = queueCF.createQueueConnection();
    // Start the Connection
    queueConnection.start();
    QueueSender sender = queueSession.createSender(queue);
    Message msg = queueSession.createTextMessage(request.getParameter("Message"));
    sender.send(msg);
    queueSession.commit();
    sender.close();
    queueSession.close();
    queueConnection.close();
    %>
    <%
    }else{
    // User can enter the message to be enqueued through here
    %>
    Enter the message to be enqueued
    <INPUT type="text" name="Message">
    <br><br>
    <input type="Submit" value="Enqueue Message">
    <%
    %>
    </form>
    </body>
    </html>
    ---------------------

  • Javax.jms.JMSException: Not supported in XA-backed sessionoutside global tx

    I am trying to setup OracleOJMS provider and tries to access queue and post to queue from a normal jsp for testing.
    I am getting the following
    javax.jms.JMSException: Not supported in XA-backed session outside global transaction
         at oracle.j2ee.ra.jms.generic.RAUtils.make(RAUtils.java:525)
         at oracle.j2ee.ra.jms.generic.RAUtils.toJMSException(RAUtils.java:199)
         at oracle.j2ee.ra.jms.generic.RAUtils.toJMSException(RAUtils.java:210)
         at oracle.j2ee.ra.jms.generic.CommonProducerWrapper.prepareForSend(CommonProducerWrapper.java:350)
         at oracle.j2ee.ra.jms.generic.CommonProducerWrapper.send(CommonProducerWrapper.java:159)
         at _ResourceProvider._jspService(_ResourceProvider.java:112)
         at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)I have posted query in this link.
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=14&t=001837
    Can you please help me out?

    Sorry for the jammed one
    Neat one.
    am trying to setup OracleOJMS provider and tries to access queue and post to queue from a normal jsp for testing.
    I am getting the following
    javax.jms.JMSException: Not supported in XA-backed session outside global transaction
    at oracle.j2ee.ra.jms.generic.RAUtils.make(RAUtils.java:525)
    at oracle.j2ee.ra.jms.generic.RAUtils.toJMSException(RAUtils.java:199)
    at oracle.j2ee.ra.jms.generic.RAUtils.toJMSException(RAUtils.java:210)
    at oracle.j2ee.ra.jms.generic.CommonProducerWrapper.prepareForS
    INVOCATION
    <form name="TestResourceProvider" method="GET">
    <%
    // Check if the message has to be enqueued
    if (request.getParameter("Message") != null){
    Context jndiContext = new InitialContext();
    XAQueueConnectionFactory queueCF = (XAQueueConnectionFactory)jndiContext.lookup
    ("java:comp/env/jms/InQueueCF");
    Queue queue = (Queue)jndiContext.lookup("java:comp/env/jms/InQueue");
    QueueConnection queueConnection = queueCF.createQueueConnection();
    // Start the Connection
    queueConnection.start();
    QueueSender sender = queueSession.createSender(queue);
    Message msg = queueSession.createTextMessage(request.getParameter("Message"));
    sender.send(msg);
    queueSession.commit();
    sender.close();
    queueSession.close();
    queueConnection.close();
    %>
    <%
    }else{
    // User can enter the message to be enqueued through here
    %>
    Enter the message to be enqueued
    <INPUT type="text" name="Message">
    <br><br>
    <input type="Submit" value="Enqueue Message">
    <%
    %>
    </form>
    </body>
    </html>
    ---------------------

  • Soa-infra-wls WARNING -- javax.jms.JMSException: [JMSPool:169803]

    Hello Experts:
    Env:
    Sun Solaris 10
    Web Logic Server 10.3.6.
    SOA 11.1.1.1.6.0
    2 Node Cluster
    -- Installed WLS, SOA and went fine
    -- soa-infra-wls STATE is "Active" and Health shows as "Warning".
    -- I do see the below @ SOA MAnaged Server logs
    ====================
    ####<Dec 31, 2012 8:24:04 AM MST> <Warning> <JMSPool> <HPSTNAME> <TSOAServer1_1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <d41f212662d693cc:5f76b50b:13bf18b9bbd:-8000-0000000000000038> <1356967444568> <BEA-169808> <There was an error while making the initial connection to the JMS resource named jms/Queue/NotificationSenderQueueConnectionFactory from the EJB "NotificationServiceBean" inside application "soa-infra-wls". The server will attempt the connection again later. The error was javax.jms.JMSException: [JMSPool:169803]JNDI lookup of the JMS connection factory jms/Queue/NotificationSenderQueueConnectionFactory failed: javax.naming.NameNotFoundException: While trying to lookup 'jms.Queue/NotificationSenderQueueConnectionFactory' didn't find subcontext 'jms'. Resolved ''; remaining name 'jms/Queue/NotificationSenderQueueConnectionFactory'>
    =====================
    -- The JMS adapter is target for "AdminServer" and "SOA Managed Server".
    How to fix this Warning/error??
    Any help is appreciated.
    Thanks
    Rgds
    Natrajan

    Natrajan,
    soa-infra-wls STATE is "Active"This states your installation was successful and you are ready to use it.
    jms/Queue/NotificationSenderQueueConnectionFactoryTry to look into above JMS Resource and locate the JNDI name for the same.. there would be mismatch as per your logs suggest..
    Did you have set workflow notification properties in Oracle EM .If not set them as they are needed during server startup. After that you won't find notification warnings during server start up .
    http://oraclefusionfacts.blogspot.in/2011/04/configure-soa-suite-11g-for-sending.html
    Regards,
    Abhinav Gupta
    Edited by: Abhinav on Jan 1, 2013 12:36 PM

  • Javax.servlet.ServletException: javax/jms/JMSException

    Hi,
    I am trying to deploy a web application in tomcat 5.5, the application is trying to connect to BPEL using RMI. It throws the next exception when trying to retrieve the worklist:
    javax.servlet.ServletException: javax/jms/JMSException
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)....
    It works fine in the OC4J
    Please Help!!!

    Hi,
    I am trying to deploy a web application in tomcat 5.5, the application is trying to connect to BPEL using RMI. It throws the next exception when trying to retrieve the worklist:
    javax.servlet.ServletException: javax/jms/JMSException
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)....
    It works fine in the OC4J
    Please Help!!!

  • Javax.jms.JMSException:TopicConnection ( can't invoke method setClientID )

    07/02/19 11:21:47 javax.jms.JMSException: TopicConnection[Oc4jJMS.Connection.dsc
    p18056.3b2816fc:110d886e29f:-8000.35]: cannot invoke method "setClientID" within
    the J2EE container.
    07/02/19 11:21:47 at com.evermind.server.jms.JMSUtils.make(JMSUtils.java:1
    034)
    07/02/19 11:21:47 at com.evermind.server.jms.JMSUtils.toJMSException(JMSUt
    ils.java:1114)
    07/02/19 11:21:47 at com.evermind.server.jms.JMSUtils.toJMSException(JMSUt
    ils.java:1085)
    07/02/19 11:21:47 at com.evermind.server.jms.JMSUtils.assertNotContainer(J
    MSUtils.java:1500)
    07/02/19 11:21:47 at com.evermind.server.jms.EvermindConnection.setClientI
    D(EvermindConnection.java:254)
    07/02/19 11:21:47 at oracle.otnsamples.oc4jjms.ChatSubscriber.createSubscr
    iber(Unknown Source)
    07/02/19 11:21:47 at oracle.otnsamples.oc4jjms.GetMessage.doGet(Unknown So
    urce)
    07/02/19 11:21:47 at javax.servlet.http.HttpServlet.service(HttpServlet.ja
    va:743)
    07/02/19 11:21:47 at javax.servlet.http.HttpServlet.service(HttpServlet.ja
    va:856)
    07/02/19 11:21:47 at com.evermind.server.http.ServletRequestDispatcher.inv
    oke(ServletRequestDispatcher.java:719)
    07/02/19 11:21:47 at com.evermind.server.http.ServletRequestDispatcher.for
    wardInternal(ServletRequestDispatcher.java:376)
    07/02/19 11:21:47 at com.evermind.server.http.HttpRequestHandler.doProcess
    Request(HttpRequestHandler.java:870)
    07/02/19 11:21:47 at com.evermind.server.http.HttpRequestHandler.processRe
    quest(HttpRequestHandler.java:451)
    07/02/19 11:21:47 at com.evermind.server.http.HttpRequestHandler.serveOneR
    equest(HttpRequestHandler.java:218)
    07/02/19 11:21:47 at com.evermind.server.http.HttpRequestHandler.run(HttpR
    equestHandler.java:119)
    07/02/19 11:21:47 at com.evermind.server.http.HttpRequestHandler.run(HttpR
    equestHandler.java:112)
    07/02/19 11:21:47 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunna
    ble.run(ServerSocketReadHandler.java:260)
    07/02/19 11:21:47 at oracle.oc4j.network.ServerSocketAcceptHandler.procCli
    entSocket(ServerSocketAcceptHandler.java:230)
    07/02/19 11:21:47 at oracle.oc4j.network.ServerSocketAcceptHandler.access$
    800(ServerSocketAcceptHandler.java:33)
    07/02/19 11:21:47 at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptH
    andlerHorse.run(ServerSocketAcceptHandler.java:831)
    07/02/19 11:21:47 at com.evermind.util.ReleasableResourcePooledExecutor$My
    Worker.run(ReleasableResourcePooledExecutor.java:303)
    07/02/19 11:21:47 at java.lang.Thread.run(Thread.java:595)

    This is a J2EE 1.4 restriction.
    See section: J2EE.6.6 Java Service (JMS) 1.1 Requirements
    "The following methods may only be used by application components
    executing in the application client container:
    javax.jms.Connection method setClientID"
    For in-container connections, you should set clientID via the .xml.
    -Jeff

  • Javax.jms.JMSException: QueueConnection not started

    Hi,
    I want use oc4j like jms server, so I put in jms.xml this configuration :
    <jms-server port="9127">
         <queue-connection-factory location="jms/simpleQueueConnectionFactory" port="9127" host="127.0.0.1"/>
         <queue name="Simple Queue" location="jms/simpleQueue"/>
    </jms-server>
    and I try to post a message to JMS server with my webapp, and one exception occured :
    javax.jms.JMSException: QueueConnection not started
    this is my piece of code which post the JMS message (like example on http://otn.oracle.com/sample_code/tech/java/codesnippet/j2ee/p2p/PointToPoint_in_OC4J.html) :
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)new InitialContext().lookup ("java:comp/env/jms/simpleQueueConnectionFactory");
    QueueConnection connection = connectionFactory.createQueueConnection();
    connection.start();
    QueueSession queueSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue)new InitialContext().lookup("java:comp/env/jms/simpleQueue");
    QueueSender sender = queueSession.createSender(queue);
    Message message = queueSession.createMessage();
    message.setJMSType("theMessage");
    message.setLongProperty("time", System.currentTimeMillis());
    message.setStringProperty("subject", "Test Message Now");
    message.setStringProperty("message", "Hi");
    sender.send(message);
    How can I get more JMS log ? because in jms.log I have only :
    25/10/02 12:04 9.0.3.0.0 Started
    25/10/02 12:05 9.0.3.0.0 Stopped (JVM termination)
    My start command line for oc4j is (http://otn.oracle.com/tech/java/oc4j/htdocs/oc4j-logging-debugging-technote.html):
    java -Djms.debug=true -jar oc4j.jar -userThreads -verbosity 5
    thank you
    best regards
    jerome

    Hi Jerome,
    At this time Oracle recommends you use OJMS (AQ/JMS) as the J2EE 1.3 compatible JMS provider in Oracle9iAS v9.0.2 and v9.0.3. A future release of 9iAS will contain a lightweight JMS provider (OC4J/JMS) that is J2EE 1.3 compatible.
    See the Metalink note below...
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=205305.1

  • Javax.jms.JMSException

    I'm trying to connect to a oems jms queue from a 3rd party client to an oc4j instance. I keep getting a JMSException:
    javax.jms.JMSException: Unable to create a connection to "<server-name>" as user "oc4jadmin".
    The oc4j is running locally, and I can connect to a different oc4j server fine. I'm guessing this is a config issue, but can't figure out what it could be.
    Thanks.

    Hi Jerome,
    At this time Oracle recommends you use OJMS (AQ/JMS) as the J2EE 1.3 compatible JMS provider in Oracle9iAS v9.0.2 and v9.0.3. A future release of 9iAS will contain a lightweight JMS provider (OC4J/JMS) that is J2EE 1.3 compatible.
    See the Metalink note below...
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=205305.1

  • Javax.jms.JMSException: ctor

    Once in a while I am getting the following exception:
    javax.jms.JMSException: ctor
         at com.evermind.server.jms.JMSUtils.makeJMSException(JMSUtils.java:1829)
         at com.evermind.server.jms.JMSUtils.toJMSException(JMSUtils.java:1845)
         at com.evermind.server.jms.EvermindObjectMessage.(EvermindObjectMessage.java:64)
         at com.evermind.server.jms.EvermindSession.makeMessage(EvermindSession.java:1405)
         at com.evermind.server.jms.EvermindSession.createObjectMessage(EvermindSession.java:276)
         at com.example.myproject.JmsSender$1.createMessage(JmsSender.java:59)
         at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:566)
         at org.springframework.jms.core.JmsTemplate$2.doInJms(JmsTemplate.java:547)
         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:512)
         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:524)
         at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:545)
    I am running on Oracle 10.1.2 and Windows Server 2003.
    I had found only one post on this issue and there the problem was that the object that was enqueued was not Serializable. This is not the issue here.
    How can I know what is the reason?

    I found the reason by decompiling the EvermindObjectMessage.
    The problem was that one of the data members in my message object wasn't Serializable.

  • What causes javax.jms.JMSException: Can't publish message: Server running low on memory?

    I'm trying to debug a problem with an application running under
              Weblogic 5.11p11, Solaris 2.7. JMS has a JDBC backing store.
              The application runs fine unless we keep it under severe high load for
              a relatively long period of time (say a couple of hours) without
              giving it time to "breath". Then, we start getting these JMS
              exceptions: javax.jms.JMSException: Can't publish message: Server
              running low on memory
              I initially thought this was a GC problem: i thought the GC thread
              wasn't able to "catch up" because the server utilization was high.
              However, when i display Runtime.freeMemory() at the point where i get
              this JMSException, i can see that there is about 16MB (out of 64MB
              totalMemory) of allocatable memory. So it isn't really running out
              of memory!
              I'd appreciate any insights, pointers, etc., about this problem.
              Thank you in advance.
              glauber
              

    JMS 5.1 prevents new messages if the server as at 75% utilization. I think (not sure)
              that this can be turned off if desired, but I would not recommend doing so, as this feature prevents
              JMS messages from "hogging" all of the memory.
              Tom
              glauber wrote:
              > Does the JMS server use a separate pool of memory, or does it share
              > the same Java heap? If it's a separate pool, how can it be set up?
              >
              > glauber
              >
              > [email protected] (glauber) wrote in message news:<[email protected]>...
              > > I'm trying to debug a problem with an application running under
              > > Weblogic 5.11p11, Solaris 2.7. JMS has a JDBC backing store.
              > >
              > > The application runs fine unless we keep it under severe high load for
              > > a relatively long period of time (say a couple of hours) without
              > > giving it time to "breath". Then, we start getting these JMS
              > > exceptions: javax.jms.JMSException: Can't publish message: Server
              > > running low on memory
              > >
              > > I initially thought this was a GC problem: i thought the GC thread
              > > wasn't able to "catch up" because the server utilization was high.
              > > However, when i display Runtime.freeMemory() at the point where i get
              > > this JMSException, i can see that there is about 16MB (out of 64MB
              > > totalMemory) of allocatable memory. So it isn't really running out
              > > of memory!
              > >
              > > I'd appreciate any insights, pointers, etc., about this problem.
              > >
              > > Thank you in advance.
              > >
              > > glauber
              

  • Javax.jms.JMSException: [C4000]: Packet

    What can this message be caused by. Got it about 5 times in a 20 second period during server load. While getting a connection to a JMS queue.
    javax.jms.JMSException: [C4000]: Packet acknowledge failed.
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.writePacketWithAck(ProtocolHandler.java:443)
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.writePacketWithReply2(ProtocolHandler.java:277)
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:588)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:238)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1512)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)
         at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:33)
         at com.sun.messaging.jmq.jmsclient.QueueConnectionImpl.<init>(QueueConnectionImpl.java:32)
         at com.sun.messaging.jmq.jmsclient.XAQueueConnectionImpl.<init>(XAQueueConnectionImpl.java:33)
         at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionImpl.<init>(JMSXAQueueConnectionImpl.java:33)
         at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionFactoryImpl.createXAQueueConnection(JMSXAQueueConnectionFactoryImpl.java:75)
         at com.sun.enterprise.jms.ConnectionFactoryWrapper.createQueueConnection(ConnectionFactoryWrapper.java:112)

    Seems to be a memory problem. In the message queue broker log there is "out of memory " expections.
    So I increase the message queues vm max memory parameter to 512mb. But it still runs out of memory under load.
    This is pathetic as all resources are closed between uses and after about 5000 uses it runs out if memory. So with every new connection/close with the JMS memory is leaked.
    Im very disapointed. Where can I report/complain about this.
    Sun App Server 7 update 2..
    :-(

  • Javax.jms: Interface Connection

    Hi all.
    In the above interface is said:
    "A Connection object is a client's active connection to its JMS provider. It typically allocates provider resources outside the Java virtual machine (JVM). "
    What does this part exactly mean?
    "It typically allocates provider resources outside the Java virtual machine (JVM)."
    Thanks in advance.

    Can you also help me on this please; I have this piece of code; factory is an object of type: progress.message.jclient.ConnectionFactory
    Then createConnection() returns an object of type: Connection: javax.jms Interface Connection
    But shouldn't Connection be a class and not an interface?
    Any help is greatly appreciated.
    public class Chat
        implements javax.jms.MessageListener
    private javax.jms.Connection connect = null;
        private javax.jms.Session pubSession = null;
        private javax.jms.Session subSession = null;
        private javax.jms.MessageProducer publisher = null;
        /** Create JMS client for publishing and subscribing to messages. */
        private void chatter( String broker, String username, String password)
            // Create a connection.
            try
    // factory is an object of type: progress.message.jclient.ConnectionFactory
    javax.jms.ConnectionFactory factory;
                factory = (new progress.message.jclient.ConnectionFactory (broker));
                connect = factory.createConnection (username, password);
                pubSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
                subSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
            catch (javax.jms.JMSException jmse)
                System.err.println("error: Cannot connect to Broker - " + broker);
                jmse.printStackTrace();
                System.exit(1);
    }

  • When using rabbitmq-jms for vFabric RabbitMQ javax.jms.Message.getJMSDestination does not return the actual destination when it is received from a consumer listening on a Topic with a wild card

    When using rabbitmq-jms for vFabric RabbitMQ javax.jms.Message.getJMSDestination does not return the actual destination when it is received from a consumer listening on a Topic with a wild card. I have tested with both 1.0.3 and 1.0.5 clients with RabbitMQ 3.1.5.
    I was wondering if the community was aware of this problem and if there are any workarounds? If not what is the proper channel to file a bug report. An example code snippet is below. The test fails because the TextMessageMatcher expects the destination passed in on construction (second parameter) to equal the desination on the message received (aquired from getJMSDestination).
            Mockery context = new Mockery();
            final MessageListener messageListener = context.mock(MessageListener.class);
            final Latch latch = new LatchImpl();
            final String prefix = "test" + System.currentTimeMillis();
            context.checking(new Expectations() {
                    oneOf(messageListener).onMessage(with(new TextMessageMatcher("MSG1", prefix + ".1234")));
                    will(new CustomAction("release latch") {
                        @Override
                        public Object invoke(Invocation invocation) throws Throwable {
                            latch.unlatch();
                            return null;
            final Connection connection = createConnection(null, null);
            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
            connection.start();
            Topic wildcardTopic = (Topic) getInitialContext().lookup(prefix + "." + "#");
            Topic destination = (Topic) getInitialContext().lookup(prefix + ".1234");
            final MessageConsumer consumer = session.createConsumer(wildcardTopic);
            consumer.setMessageListener(messageListener);
            MessageProducer producer = session.createProducer(null);
            producer.send(destination, session.createTextMessage("MSG1"));
            latch.await(5000);
            connection.close();
            Thread.sleep(5);
            context.assertIsSatisfied();

    Check where your MDB sends the [response] messages to.

Maybe you are looking for

  • Problems with my new imac

    Hello everyone, i bought my imac 27" a month ago, and within this month it has crashed around 6 time, the last three time has been after i open skype!!. I need your help pleaseeee!. Never happened with old imac!

  • How can I load TPX Pantones into CS6 Photoshop palette?

    I use the Pantone papers for Fashion and Home and want to be able to load/download these into my photoshop palette rather than having to print out my designs and then match them to the papers by going tirelessly through the book. I've looked on the P

  • Missing Message in Performance Assistant (F1)

    Hi, we are facing the following problem: in the module FS-CD one could execute the performance assistant (by pressing F1). It always shows the desired text to help the user, exept in tx cd programm SAPLVKK5 (Basic Function > Activation of Basic Funct

  • Mozilla Firefox Start Page

    When I want to have a new tab, it takes me to the Mozilla Firefox Start Page. Before today, I just had a blank screen. Is there a way that I can get a blank screen when I open a new tab? Thanks!

  • Error :The function upload is not possible for this documentu2019

    Hi, The users are using Solution manager Help Desk system. When a specific user tries to create a message from the satellite system, and tries to upload a  document, he is unable to do so. He is getting an error message : 'The function <upload> is no