File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes BEA/Weblogic and the fly likes weblogic.jms. common. JMSException: Invalid destination name: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "weblogic.jms. common. JMSException: Invalid destination name:" Watch "weblogic.jms. common. JMSException: Invalid destination name:" New topic

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

Priyaa V Kumar
Ranch Hand

Joined: Aug 12, 2004
Posts: 32

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

Joined: Feb 27, 2002
Posts: 11

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

Joined: Aug 12, 2004
Posts: 32
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

It is sorta covered in the JavaRanch Style Guide.
subject: weblogic.jms. common. JMSException: Invalid destination name:
Similar Threads
MDB onMessage() not firing....Help needed please!
JMS Queue connection problem in WebLogic8.1
Issue while invoking JNDI in a JMS example in glassfish
Migrate 7 to 8 MDB connection issue
Need serious help on jms