1 Reply Latest reply: Jun 8, 2007 6:43 PM by 807606 RSS

    Connecting to a JMS topic

    807606
      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.