Javax.jms.InvalidDestinationException: Invalid destination

Hi!
Can any one tell me why this error is occured "javax.jms.InvalidDestinationException: Invalid destination" is it because of it unable to find the Destination queue?
Thanks
Sreenath

Yes.. the exception is self explanatory.. check you server admin to see what is the name of destination you are using.

Similar Messages

  • Javax.jms.InvalidDestinationException: Destination has invalid type "class

    Dear Sirs,
    I am trying to send a JMS message from an application deployed to AS 10.1.3.3 to a destination (Queue), that was described with help of Oracle Enterprise Manager. This desination is working correctly if I send message from ESB by it's adapter. But my class refuses to execute method "createProducer": I have an exception:
    "javax.jms.InvalidDestinationException: Destination has invalid type "class oracle.jms.AQjmsDestination" and cannot be used with OC4J JMS".
    What is the case?
    Thanks.

    Thank You, Gera!
    My mistake was: I tryed to use oficially registed QueueConnectionFactory. But, indeed, AS notes that "connection factories are only needed for in-memory and file based persistence destinations. Destinations that use database persistence do not require connection factories to be specified - these are created dynamically by the JMS connector (adapter) used for database persistence."
    So, I found ra.xml file in directory of generated adapter, fetched queue factory name that seems correct for me, and use it.
    Now it works!
    Спасибо, Гера.

  • Javax.jms.InvalidDestinationException: MQJMS2008

    I get an exception when my JMS Application
    puts a message into a Clustered local Queue.
    javax.jms.InvalidDestinationException: MQJMS2008: failed to open MQ queue.
    The same works in a non-clustered environment.
    I get the exception right where I try to do a createSender(queue).
    Is it failing because I am trying to put the message into a local queue in Cluster? but how can I avoid that?
    Do I have to modify my code to make it work in a clustered environment?
    Please help!

    I also face the same error before.
    1. you need to set authority right for your apps using setmqaut to have put, get and browse right. This will fix the access right problem
    2. for MQ clustred env, in JMSAdmin, for the destination queue, which you intend to drop message to, you need to use the destination queue manager name, not receiver queue manager name. If it is non cluster approach, the destination queue manager name will be the receiver queue manager name because there is a remote definition which point to destination queue.

  • 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.InvalidSelectorException occurs when upgrade to weblogic 12c

    Recently, our team upgrade weblogic server from 11g to 12c,  some errors occur when start web application in weblogic domain.
    The error is related to message driven bean,  below is the part of  ejb-jar.xml definition:
      <message-driven id="message-driven_1">
          <description>Message Driven Bean</description>
          <display-name>Message Configuration (MDB)</display-name>
          <ejb-name>Logger</ejb-name>
          <ejb-class>com.logging.mdb.Logger</ejb-class>
          <messaging-type>javax.jms.MessageListener</messaging-type>
          <transaction-type>Container</transaction-type>
          <message-destination-type>javax.jms.Queue</message-destination-type>
          <activation-config>
                <activation-config-property>
                    <activation-config-property-name>messageSelector</activation-config-property-name>
                    <activation-config-property-value>DELIVERY='IMMEDIATE'</activation-config-property-value>
                </activation-config-property>
                <activation-config-property>
                    <activation-config-property-name>acknowledgeMode</activation-config-property-name>
                    <activation-config-property-value>Auto-acknowledge</activation-config-property-value>
                </activation-config-property>
                <activation-config-property>
                     <activation-config-property-name>destinationType</activation-config-property-name>
                     <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
                </activation-config-property>
          </activation-config>
      </message-driven>
    When start application below errors show up:
    <Dec 18, 2013 6:24:05 AM PST> <Warning> <EJB> <SLC02PGO> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1387376645415> <BEA-010061> <The Message-Driven EJB Logger is unable to connect to the JMS destination edx/queue/logger. The Error was:
    javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    Nested exception: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    Nested exception: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    Nested exception: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    Nested exception: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    ####<Dec 18, 2013 6:24:15 AM PST> <Warning> <EJB> <SLC02PGO> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1387376655414> <BEA-010096> <The Message-Driven EJB MessageDispatcher is unable to connect to the JMS destination or bind to JCA resource adapter edx.queue.outbound. The onnection failed after 124 attempts. The MDB will attempt to reconnect/rebind every 10 seconds. This log message will repeat every 600 seconds until the condition clears.>
    It works well in weblogic 11g,   not sure whether there's any changes in weblgic 12c.
    I'm appreciate if there's someone can help me on this issue.
        <message-driven id="message-driven_1">
          <description>Message Driven Bean</description>
          <display-name>Message Configuration (MDB)</display-name>
          <ejb-name>Logger</ejb-name>
          <ejb-class>com.edocs.fs.logging.mdb.Logger</ejb-class>
          <messaging-type>javax.jms.MessageListener</messaging-type>
          <transaction-type>Container</transaction-type>
          <message-destination-type>javax.jms.Queue</message-destination-type>
          <activation-config>
            <activation-config-property>
              <activation-config-property-name>messageSelector</activation-config-property-name>
              <activation-config-property-value>DELIVERY='IMMEDIATE'</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
              <activation-config-property-name>acknowledgeMode</activation-config-property-name>
              <activation-config-property-value>Auto-acknowledge</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
              <activation-config-property-name>destinationType</activation-config-property-name>
              <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
            </activation-config-property>
          </activation-config>
          <resource-ref id="ResRef_Logger_1">
            <res-ref-name>jdbc/LoggerDataSource</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
          </resource-ref>
        </message-driven>

    Hi,
    I debug the application, I found my @ViewScoped ManagedBeans, they're recreated after you click a button or select a item in combobox
    Here is a piece of code:
        @PostConstruct
        public void resolveEntity() {
            Object sEntity = FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("entity");
            entity = (BctTbOportunidade) sEntity;
             FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("entity");
            if (entity == null) {
                entity = new BctTbOportunidade();
    I use @postConstruct to get a entity from another page in sessionMap(I set a item from a table and use this method to modify a entity in a other page).
    When I click a button or select a item in combobox in same page @PostConstruct method is called but values are lost. No Exceptions are thrown by server.
    I found a artice written by BalluC that some versions of jsf 2.1 has this behavior The BalusC Code: The benefits and pitfalls of @ViewScoped
    I already configured my web.xml to set false javax.faces.PARTIAL_STATE_SAVING 
    But this behavior continues.
    The jsf version deployed in my weblogic 12c is 2.1.7.

  • 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.

  • Javax.jms.Destination found at the specified.....

    I am making a Message Driven EJB, but i get this error when i try to run it."javax.jms.Destination found at the specified destination-location (jms/theTopic) for MessageDrivenBean MessageDrivenEJB".I am using JDeveloper 9.0.5
    My ejb-jar
    <enterprise-beans>
    <message-driven>
    <description>Message Driven Bean</description>
    <display-name>MessageDrivenEJB</display-name>
    <ejb-name>MessageDrivenEJB</ejb-name>
    <ejb-class>mypackage1.MessageDrivenEJBBean</ejb-class>
    <transaction-type>Container</transaction-type>
    <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>NonDurable</subscription-durability>
    </message-driven-destination>
    <resource-ref>
    <res-ref-name>TopicFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor/>
    </ejb-jar>
    My orion-ejb-jar
    <orion-ejb-jar>
    <enterprise-beans>
    <message-driven-deployment name="MessageDrivenEJB" destination-location="jms/theTopic" connection-factory-location="jms/theTopicConnectionFactory">
    <resource-ref-mapping name="The Topic" location=" jms/theTopic"/>
    </message-driven-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    and my jms.xml
    <topic name="The Topic" location="jms/theTopic">
    <description>A dummy topic</description>
    </topic>
    <topic-connection-factory name="jms/theTopicConnectionFactory" location="jms/theTopicConnectionFactory">
    <description>A dummy topic connection factory</description>
    </topic-connection-factory>
    I hope that there i somebody who can help.. :-)

    The files orion-ejb-jar and jms.xml are not defined in JMS or Java EE, so unless there are any Orion experts on this forum you may need to ask in a forum specific to your application server.
    Nigel

  • No javax.jms.Destination found at the specified destination-location (jms/

    i m trying to create new message driven bean
    i made entry in ejb-jar like this
    <message-driven>
    <description>Message Driven Bean</description>
    <display-name>UploadMultiFilesMDB</display-name>
    <ejb-name>UploadMultiFilesMDB</ejb-name>
    <ejb-class>com.tcs.sgv.fms.messagedrivenbeans.impl.UploadMultiFilesMDB</ejb-class>
    <transaction-type>Bean</transaction-type>
    <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
    <message-driven-destination>
    <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
    <ejb-ref>
    <ejb-ref-name>ejb/CommonUtility</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.tcs.sgv.common.entitybeans.CommonUtilityHome</home>
    <remote>com.tcs.sgv.common.entitybeans.CommonUtility</remote>
    <ejb-link>CommonUtility</ejb-link>
    </ejb-ref>
    <ejb-ref>
    <ejb-ref-name>ejb/DmsUtility</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.tcs.sgv.dms.entitybeans.DmsUtilityHome</home>
    <remote>com.tcs.sgv.dms.entitybeans.DmsUtility</remote>
    <ejb-link>DmsUtility</ejb-link>
    </ejb-ref>
    <resource-ref>
    <res-ref-name>jms/QueueConnectionUploadMultiFiles</res-ref-name>
    <res-type>javax.jms.QueueConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    in orion-ejb-jar entry is
    <message-driven-deployment name="UploadMultiFilesMDB"
    connection-factory-location="jms/QueueConnectionUploadMultiFiles"
    destination-location="jms/UploadMultiFiles"
    max-instances="0" min-instances="0"/>
    in jms.xml entry is like
    <queue name="UploadMultiFilesQueue" location="jms/UploadMultiFiles">
              <description>Upload Queue</description>
         </queue>
    <queue-connection-factory location="jms/QueueConnectionUploadMultiFiles" />
    but still it is giving me error like ....
    No javax.jms.Destination found at the specified destination-location (jms/UploadMultiFiles) for MessageDrivenBean UploadMultiFilesMDB
    Please do help
    thanks in Advance

    The files orion-ejb-jar and jms.xml are not defined in JMS or Java EE, so unless there are any Orion experts on this forum you may need to ask in a forum specific to your application server.
    Nigel

  • Javax.jms.InvalidSelectorException: The selector is invalid

    Hi ,
    I am getting the following exception while running a JMS program
    javax.jms.InvalidSelectorException: The selector is invalid: name !=Doctor
    the code as follows
    jndiContext = new InitialContext(env);
                   TopicConnectionFactory factory = (TopicConnectionFactory) jndiContext.lookup("TopicConnectionFactory");
                   //pubtopic = (Topic) jndiContext.lookup("topic/testTopic");
                   subtopic = (Topic) jndiContext.lookup("topic/testTopic");
                   TopicConnection conn = factory.createTopicConnection();
                   tsession = conn.createTopicSession(false, Session.CLIENT_ACKNOWLEDGE);
                   //publisher = tsession.createPublisher(topic);
                   //String name = "Doctor";
                   subscriber = tsession.createDurableSubscriber(subtopic,"testTopic","name != 'Doctor'",false);
    advance thanks
    syamsani

    Thanks for the reply.
    I think you are correct if i give like following it is working fine.
    String filter = "name in('doctor')";
    subscriber = tsession.createDurableSubscriber(subtopic,"labtech",filter,false);
    Syamsani
    I have one more issue regarding durable subscriptions. when i publish a message in persistance mode like below
    publisher.publish( myMessage,
              DeliveryMode.PERSISTENT,
              Message.DEFAULT_PRIORITY,
              180
    the durable subscriber not able to get the message when he is in both states offline/online. I think in PERSISTENT mode the durable subscriber should receive the message at any cost other wise there is no meaning of guaranteed messaging. The above method is working fine in both offline/online states when the time value given as 0 or more than one second. I am running my application in JBoss 4.2.2GA.
    Syamsani
    ------------------------------------

  • 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)

  • Messages in JMS Topic Error destination

    Hi,
    I have a JMS Topic with an error destination queue configured. Now, In our scenario , there are two subscribers of topic for the same message. Suppose for a message published to topic, subscriber1 is able to processes message successfully but subscriber2 throws errors when processing the same message.
    1. Once the redelivery limit is reached and subscriber2 continues to throw exception, Will the message get en queued to Error Destination (in spite of the fact that subscriber 1 has processed the same message successfully) ?
    2. For a consumer (e.g MDB) listening to Error destination and consuming error messages, Is it possible to determine which topic subscriber was unable to process the message ?
    Please let me know
    Regards,
    Arif

    Here it depends on the state of the message, if the message is visible then the message would be available for consumption, else it is not. In case the subscriber 2 failed to consume the message and the message is still visible then a retry would be made, else the message would not be retried.
    In case the message is visible then the message would be move to the error queue based on the configured redelivery attempts.
    Additionally, an MDB can find the destination using the getJMSDestination() call. But as per my understanding we will only be able to get the name of the last destination which in this case would be error queue:
    http://docs.oracle.com/javaee/1.4/api/javax/jms/Message.html#getJMSDestination%28%29

  • Weblogic Unit Of Order on Javax.JMS

    Hi I want to use Weblogic Unit of Order on Javax.jms and not on Weblogic.jms, does anyone know how to do that.

    You need to use WLS JMS extension interface to programmatically set a Unit-of-order. In order for applications that use pure javax.jms interfaces to take the advantage of Unit-of-order feature, WLS allows administrators to enable unit-of-order via configuration. Once you enable Unit-of-order on a connection factory, all messages sent from one session will belong to the same unit-of-order either with a system-generated name or a user-generated name. In addition, you could enable unit-of-order on a per destination basis as well.
    For details, please refer to http://docs.oracle.com/cd/E17904_01/web.1111/e13727/uoo.htm#i1040257.

  • Instanceof with a javax.jms.Topic

    I have an instance of Topic called "testTopic". Can somebody explain to me why both of these statements return true?
    testTopic instanceof javax.jms.Topic
    testTopic instanceof javax.jms.Queue
    How can something be both a Topic and a Queue. The second one should return false.
    Try it and see for yourself.

    Translating bbritta's code into plain text (nice example!): many JMS vendors actually use the same implementation class for both Queues and Topics, which is why you got the results you did.
    Now, there are a couple of ways to tell them apart. You'll have to experiment to see which works "best for you." And some of these may be vendor-specific handling, so not all results will apply on different servers.
    1) Invoke getTopicName() after casting your Destination to Topic (or Queue); check the result or see if you get an exception.
    2) If you have control (or input) over the server environment, make the names of the Destinations "BlahQueue" and "BlechTopic" and use the name to determine which one.
    3) Try to send a message and catch it when it barfs - if it does, that is.
    4) Pass a boolean or int to your methods using Destination, designating which one it is.
    My opinion: don't use generic Destinations - always code explicitly to a Queue or Topic JMS method. This helps you keep track of how your messages are handled and avoids confusion later on.

  • One vote for a javax.jms.MapMessage

    I need to send and receive MapMessages to integrate with other Java clients in my Flex app however i have seen that in the documentation message-type parameter of the jms property of a message destination only accepts javax.jms.TextMessage and javax.jms.ObjectMessage.
    If implementing a MapMessage would not be too difficult and someone can point me in the right direction i would be happy to contribute to the project.
    Max

    Hi Max,
    This would be a great enhancement to JMSAdapter and I don't think it'll be hard. These are the classes you need to touch.
    -JMSSettings.setMessageType should support the new message type.
    -JMSProducer.validate should support the new message type.
    -JMSProducer should have a new abstract method called sendMapMessage.
    -JMSQueueProducer and JMSTopicProducer should provide the implementation for sendMapMessage.
    I think this should be it! Once you get this working, please open an enhancement request to BlazeDS and provide your code. And let us know the bug number here so we can vote for it.
    -Mete

  • Inquiry on javax.mail.SendFailedException: Invalid Addresses error

    Hi,
    Anyone does have any idea why the following is being encountered during the email authentication process? We are using PeopleSoft application and we have notification functionality which will send a notification email to the users but email not being sent due to an invalid email address but actually the email is active and valid. Below are the logs from SMTP
    Log Start:
    DEBUG SMTP: Sending failed because of invalid destination addresses
    Wed Jul 31 09:38:14 GMT+08:00 2013 RSET
    Wed Jul 31 09:38:14 GMT+08:00 2013 250 2.0.0 Resetting
    Wed Jul 31 09:38:20 GMT+08:00 2013 javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    class com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 User unknown
    Wed Jul 31 09:38:20 GMT+08:00 2013 at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1141)
    Wed Jul 31 09:38:20 GMT+08:00 2013 at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:536)
    Wed Jul 31 09:38:20 GMT+08:00 2013 at com.peoplesoft.pt.mcf.mail.MCFOutboundEmail.send(MCFOutboundEmail.java:686)
    Wed Jul 31 09:38:20 GMT+08:00 2013 at com.peoplesoft.pt.mcf.mail.MCFOutboundEmail.send(MCFOutboundEmail.java:854)
    Log End:
    Kindly let us know your thoughts on this.
    Thanks.

    This isn't an authentication problem.  You're sending to an address that your server doesn't know about, so it's rejecting your message.  The error from the server is:
    550 5.1.1 User unknown

Maybe you are looking for