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.
Similar Messages
-
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
SreenathYes.. the exception is self explanatory.. check you server admin to see what is the name of destination you are using.
-
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.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>
--------------------- -
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.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. -
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. -
Deprecation of javax.jms.QueueConnectionFactory
i found out in weblogic 6.1 docs that javax.jms.QueueConnectionFactory and javax.jms.TopicConnectionFactory is deprecated.
But i found no mention of this in the latest javadocs that i downloaded from java.sun.com.(jms 1.0.2 b)
clarifications in this regard is appreciatedHi -
I'm the JMS Specifecation Lead. Let me reassure you: the javax.jms.QueueConnectionFactory and and javax.jmsTopicConnectionFactory interfaces have not been deprecated.
I spoke with a senior BEA techincal person for JMS, and he explained that this is a documentation issue. He's filed a request to have it fixed. Here's what he said.
" In WebLogic, there are default connection
factories. Those default factories have some well known names. The
original names chosen were "javax.jms.QueueConnectionFactory" and
"javax.jms.TopicConnectionFactory". WebLogic changed the JNDI name in 6.0
(multiple reasons mostly to do with customer backward compatibility).
As far as I know the specification makes no statements about how a product
is administered, that there would even be default connection factories, or
what their names might be if there were. The documentation is misleading
in that it doesn't mention that those are the *JNDI names* of the factories,
not the interfaces for the factories. I will file an appropriate bug
report against the documentation.
Feel free to post my comments in your forum, or send me to the URL where I
can officially respond. Thanks for bringing this up."
I want to thank BEA for a prompt response on this.
i found out in weblogic 6.1 docs that
javax.jms.QueueConnectionFactory and
javax.jms.TopicConnectionFactory is deprecated.
But i found no mention of this in the latest javadocs
that i downloaded from java.sun.com.(jms 1.0.2 b)
clarifications in this regard is appreciated -
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>
--------------------- -
Cannot access class javax.jms.TextMessage;
Hi,
I am trying to run standard page from JDev and i am getting below error from EOImpl.java.
" cannot access class javax.jms.TextMessage; file javax\jms\TextMessage.class not found "
I tried to import javax/jms dir to my local machine but i could not find jms directory under javax in OS. Can you guys pls help me to resolve this.
Thanks,Hi Scott,
Not sure wht you wanted me to try...
I have something like this in the code which is causing that error..
BusinessEvent businessevent = new BusinessEvent(s1, s2);
businessevent.setData("Opportunity " + s2 + "updated");
ArrayList arraylist = new ArrayList(1);
arraylist.add(oadbtransaction);
businessevent.setObject(arraylist);
businessevent.setStringProperty("pLeadId", getLeadId().toString());
java.sql.Connection connection1 = oadbtransaction.getJdbcConnection();
businessevent.raise(connection1);
Its asking me to import jms..but ii could not find those files in Unix..is there anyway to import these files OR any other solution to fix this error?
Please help.. -
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 -
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
DhanaHave you signed your jars ?
-
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. -
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
NatrajanNatrajan,
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!!!
Maybe you are looking for
-
I got this problem in getting the size of the image display on the screen. I try to used getWidth & getHeight and print it out but the value is 0. I try many time will different combination but still can't. This is the example: map = getToolkit().get
-
i've just updated my itunes to 11.0, but now it won't recognize my iPhone!!! please help
-
Why do I have to put my debit card information when I sign in to download a free app from the App Store? This was not required before. It started happening like 2 weeks ago.
-
Inspire 5.1 5300 sound problem
Hello, My Inspire sound system was working very well until now. Now when i power up i get a constatnt hum on the speakers. This hum is even when the incoming cable from the sound card is disconnected. The lamp of the volume regulator comes on when it
-
IPhone 2G Exchange Calendar Problem
Hello, i have a problem with my iPhone 2G 2.0 and the Microsoft Exchange 2003 communication. Everything is working fine and I have full access to everything. My problem is, that i have to accept or decline every calendar entry on my iPhone. When i ha