3 Replies Latest reply on Oct 29, 2002 9:03 AM by dstreev

    Authentication-Problem on a Queue

    matthias

      Hi,

      i try to connect to a queue with a client-program.


      QueueConnectionFactory queueFactory =
      (QueueConnectionFactory)context.lookup("ConnectionFactory");

      // Create the connection

      queueConnection = queueFactory.createQueueConnection();

      in the line ...createQueueConnection()

      i receive the following Exception:

      An exception occured while testing HelloSender: org.jboss.mq.SpyJMSException: Cannot authenticate user
      org.jboss.mq.SpyJMSException: Cannot authenticate user
      at org.jboss.mq.Connection.authenticate(Connection.java:766)
      at org.jboss.mq.Connection.(Connection.java:233)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:48)
      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:110)
      at test.client.HelloSender.(HelloSender.java:128)
      at test.client.HelloSender.main(HelloSender.java:198)
      linked exception is:
      java.net.SocketException: Option unsupported by protocol: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
      at java.net.Socket.(Socket.java:273)
      at java.net.Socket.(Socket.java:127)
      at org.jboss.mq.il.oil.OILServerIL.createConnection(OILServerIL.java:490)
      at org.jboss.mq.il.oil.OILServerIL.checkConnection(OILServerIL.java:478)
      at org.jboss.mq.il.oil.OILServerIL.authenticate(OILServerIL.java:266)
      at org.jboss.mq.Connection.authenticate(Connection.java:759)
      at org.jboss.mq.Connection.(Connection.java:233)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:48)
      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:110)
      at test.client.HelloSender.(HelloSender.java:128)
      at test.client.HelloSender.main(HelloSender.java:198)


      In jbossmq-service.xml i changed the following:


      org.jboss.mq.server.TracingInterceptor
      <!-- <depends optional-attribute-name="NextInterceptor">jboss.mq:service=SecurityManager -->
      <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager


      but this doesn´t help.

      I would be glad to get Help.

      Regards Matthias

        • 1. Re: Authentication-Problem on a Queue
          matthias

          i have forgotten:

          I am working with JBoss 3.0

          regards: Matthias

          • 2. Re: Authentication-Problem on a Queue

            You need to specify the correct username and password in the constructor to the queueConnection.

            IE: queueConnection = queueFactory.createQueueConnection(username, password);

            The username and password are pulled from the jbossmq-state.xml file. Be sure you have the permission "Security Conf" settings in your destination queue's set to match.

            I was stuck trying to get it to authenticate with the rest of my Realm Security, when in fact it doesn't use the same mechanism. It will be nice when these things are all in sync.

            • 3. Re: Authentication-Problem on a Queue

              You need to specify the correct username and password in the constructor to the queueConnection.

              IE: queueConnection = queueFactory.createQueueConnection(username, password);

              The username and password are pulled from the jbossmq-state.xml file. Be sure you have the permission "Security Conf" settings in your destination queue's set to match.

              I was stuck trying to get it to authenticate with the rest of my Realm Security, when in fact it doesn't use the same mechanism. It will be nice when these things are all in sync.