This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "weblogic.jms. common. JMSException: Invalid destination name:" Watch "weblogic.jms. common. JMSException: Invalid destination name:" New topic
Author

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

Priyaa V Kumar
Ranch Hand

Joined: Aug 12, 2004
Posts: 32
Hi,

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
and
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) {
th.printStackTrace();
System.out.println("Exception looking up queue: " + th.getMessage());
}
}

HERE's WHERE I GET EXCEPTION

Naming Exception - looking up queue
weblogic.jms.common.JMSException: Invalid destination name: exampleQueue
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
ava:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:138)
at weblogic.jms.dispatcher.DispatcherImpl_812_WLStub.dispatchSyncNoTranF
uture(Unknown Source)
at weblogic.jms.dispatcher.DispatcherWrapperState.dispatchSyncNoTran(Dis
patcherWrapperState.java:463)
at weblogic.jms.client.JMSSession.createDestination(JMSSession.java:1961
)
at weblogic.jms.client.JMSSession.createQueue(JMSSession.java:1465)
at ObjectSender.init(ObjectSender.java:87)
at ObjectSender.<init>(ObjectSender.java:58)
at ObjectSender.<init>(ObjectSender.java:48)
at ObjectSender.main(ObjectSender.java:31)
Caused by: weblogic.jms.common.JMSException: Invalid destination name: exampleQu
eue
at weblogic.jms.frontend.FEManager.destinationCreate(FEManager.java:214)

at weblogic.jms.frontend.FEManager.invoke(FEManager.java:539)
at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.jav
a:621)
at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsyncInternal(Dispatch
erImpl.java:128)
at weblogic.jms.dispatcher.DispatcherImpl.dispatchSyncNoTranFuture(Dispa
tcherImpl.java:236)
at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Exception looking up queue: Invalid destination name: exampleQueue
Not ready to send messages.

Any pointers to solve this problem is welcome.

thanks
makiey bartsch
Greenhorn

Joined: Feb 27, 2002
Posts: 11
hi,

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").


greetings,
makiey
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

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
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