This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

weblogic.jms. common. JMSException: Invalid destination name:  RSS feed

Priyaa V Kumar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have configured WebLogic Server 8.1. I logged on to administration console and went to

examples -> services -> JMS -> ConnectionFactories

There are three examples already listed there...

exampleQueue, exampleTopic, exampleTrader

I wrote a jave program to send messages to this exampleQueue. I left the default jndi name - weblogic.examples.jms.QueueConnectionFactory in the weblogic console as such.

my code goes like this...

public static final String JMS_FACTORY = "weblogic.examples.jms.QueueConnectionFactory";
public static final String QUEUE = "exampleQueue";


created an InitialContext object with
weblogic.jndi.WLInitialContextFactory as the INITIAL_CONTEXT_FACTORY
PROVIDER_URL as t3://localhost:7001/

the contect gets created.

then i try to create a QueueConnectionFactory by loking up the context

QueueConnectionFactory qcf = (QueueConnectionFactory) context.lookup(JMS_FACTORY);

this also goes thru

//then i get a QueueConnection, queue session
QueueConnection con = qcf.createQueueConnection();
QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

till this point it works

now, i try to lookup the queue-

try {
System.out.println("Lookup queue");
queue = (Queue) c.lookup(QUEUE);
catch (NamingException ne) {
System.out.println("Naming Exception - looking up queue");
try {
queue = session.createQueue(QUEUE);
c.bind(QUEUE, queue);
System.out.println("Bound context to queue");
catch (Throwable th) {
System.out.println("Exception looking up queue: " + th.getMessage());


Naming Exception - looking up queue
weblogic.jms.common.JMSException: Invalid destination name: exampleQueue
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
at weblogic.rmi.internal.BasicRemoteRef.invoke(
at weblogic.jms.dispatcher.DispatcherImpl_812_WLStub.dispatchSyncNoTranF
uture(Unknown Source)
at weblogic.jms.dispatcher.DispatcherWrapperState.dispatchSyncNoTran(Dis
at weblogic.jms.client.JMSSession.createDestination(
at weblogic.jms.client.JMSSession.createQueue(
at ObjectSender.init(
at ObjectSender.<init>(
at ObjectSender.<init>(
at ObjectSender.main(
Caused by: weblogic.jms.common.JMSException: Invalid destination name: exampleQu
at weblogic.jms.frontend.FEManager.destinationCreate(

at weblogic.jms.frontend.FEManager.invoke(
at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.jav
at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsyncInternal(Dispatch
at weblogic.jms.dispatcher.DispatcherImpl.dispatchSyncNoTranFuture(Dispa
at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(
at weblogic.rmi.internal.BasicServerRef$
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
at weblogic.kernel.ExecuteThread.execute(
Exception looking up queue: Invalid destination name: exampleQueue
Not ready to send messages.

Any pointers to solve this problem is welcome.

makiey bartsch
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

please ensure, that
- at least one JMS Server is successfully deployed;
- and for this JMS Server you have created at least one JMS Queue (in your case, JNDI name must be "exampleQueue").

Priyaa V Kumar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

I figured out the problem.

The queue name should be a fully qualified name...

QUEUE = "weblogic.examples.jms.exampleQueue";

I ran my test program and looks like the messages are sent to the queue.

I also see the messages in my queue in the Weblogic Server Console

Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!