• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

Thanks
 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic