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