Connecting to a JMS topic

Hi ALL,

I am trying to connect to a JMS topic but getting an exception.To connect to that JMS topic username and password are required.I have provided the required username and the pwd but still getting this exception.

The exception is as follows:-

javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason://sam03:8083/q~q~uq~?sr org.jnp.server.NamingServer_Stubxrjava.rmi.server. RemoteStub?exrjava.rmi.server.RemoteObject?a? ?

a3xpw8

UnicastRef2]]

at weblogic.jndi.internal.ExceptionTranslator.toNamin gException(ExceptionTranslator.java:47)

at weblogic.jndi.WLInitialContextFactoryDelegate.toNa mingException(WLInitialContextFactoryDelegate.java :636)

at weblogic.jndi.WLInitialContextFactoryDelegate.getI nitialContext(WLInitialContextFactoryDelegate.java :306)

at weblogic.jndi.WLInitialContextFactoryDelegate.getI nitialContext(WLInitialContextFactoryDelegate.java :239)

at weblogic.jndi.WLInitialContextFactory.getInitialCo ntext(WLInitialContextFactory.java:135)

at javax.naming.spi.NamingManager.getInitialContext(U nknown Source)

at javax.naming.InitialContext.getDefaultInitCtx(Unkn own Source)

at javax.naming.InitialContext.init(Unknown Source)

at javax.naming.InitialContext.<init>(Unknown Source)

at TopicReceive.getInitialContext(TopicReceive.java:1 75)

at TopicReceive.main(TopicReceive.java:142)

Caused by: weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason://sam03:8083/q~q~uq~?sr org.jnp.server.NamingServer_Stubxrjava.rmi.server. RemoteStub?exrjava.rmi.server.RemoteObject?a? ?

The JNDI connection code is:-

tconFactory = (TopicConnectionFactory) PortableRemoteObject.narrow(

ctx.lookup("DummyConnectionFactory"), TopicConnectionFactory.class);

tcon = tconFactory.createTopicConnection("xyz","xyz");

tsession = tcon.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

topic = (Topic) PortableRemoteObject.narrow(ctx.lookup(topicName), Topic.class);

tsubscriber = tsession.createSubscriber(topic);

tsubscriber.setMessageListener(this);

tcon.start();

Any help would be great.

-Hussain.

[2299 byte] By [hussain123a] at [2007-11-27 6:49:52]
# 1
You might want to post this to the JMS forum: http://forum.java.sun.com/forum.jspa?forumID=29
gymma at 2007-7-12 18:23:42 > top of Java-index,Java Essentials,Java Programming...