3 Replies Latest reply on Apr 29, 2002 9:37 AM by Peter Antman

    Can't createQueueConnection()

    Gennadiy Newbie

      Hi,
      I have some problems with standalone JBoss client.
      When I try to run a code example and send an message to queue, I always get an exception: org.jboss.mq.SpyJMSException: Cannot authenticate user

      Jboss 3 RC1, Jaas based auth. works properly (I got an principal from EJBContext)

      My code is:
      Context ctx = new InitialContext();
      QueueConnectionFactory l_factory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
      QueueConnection l_QueConn = l_factory.createQueueConnection() ;
      ^^^^^^^^^
      In this place I have a truble

      My client stack trace:

      org.jboss.mq.SpyJMSException: Cannot authenticate user
      at org.jboss.mq.Connection.authenticate(Connection.java:765)
      at org.jboss.mq.Connection.(Connection.java:232)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:47)
      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:110)
      at com.softoffice.plis.wfmserver.test.AsyncTest.testQueue(AsyncTest.java:91)
      at com.softoffice.plis.wfmserver.test.AsyncTest.main(AsyncTest.java:178)
      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.uil.UILServerIL.createConnection(UILServerIL.java:516)
      at org.jboss.mq.il.uil.UILServerIL.checkConnection(UILServerIL.java:504)
      at org.jboss.mq.il.uil.UILServerIL.authenticate(UILServerIL.java:291)
      at org.jboss.mq.Connection.authenticate(Connection.java:758)
      at org.jboss.mq.Connection.(Connection.java:232)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:47)
      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:110)

      Question: Whats wrong?

      Thanks

        • 1. Re: Can't createQueueConnection()
          Peter Antman Expert



          Posts: 3
          Registered: Apr, 2002


          Can't createQueueConnection()
          Posted: Apr 27, 2002 2:44 PM

          Reply

          Hi,
          I have some problems with standalone JBoss client.
          When I try to run a code example and send an message to queue, I always get an exception: org.jboss.mq.SpyJMSException: Cannot authenticate
          user

          Jboss 3 RC1, Jaas based auth. works properly (I got an principal from EJBContext)

          My code is:
          Context ctx = new InitialContext();
          QueueConnectionFactory l_factory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
          QueueConnection l_QueConn = l_factory.createQueueConnection() ;
          ^^^^^^^^^
          In this place I have a truble

          My client stack trace:

          org.jboss.mq.SpyJMSException: Cannot authenticate user
          at org.jboss.mq.Connection.authenticate(Connection.java:765)
          at org.jboss.mq.Connection.(Connection.java:232)
          at org.jboss.mq.SpyConnection.(SpyConnection.java:47)
          at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.ja va:110)
          at com.softoffice.plis.wfmserver.test.AsyncTest.testQueue(AsyncTest.java:91)
          at com.softoffice.plis.wfmserver.test.AsyncTest.main(AsyncTest.java:178)
          linked exception is:
          java.net.SocketException: Option unsupported by protocol: connect
          at java.net.PlainSocketImpl.socketConnect(Native Method)

          Are you mixing 1.3 and 1.4 jvm's (server-client or the other way around)?

          //Peter

          • 2. Re: Can't createQueueConnection()
            Gennadiy Newbie

            Yes, I use jdk1.4 on server-side and 1.3 on client-side
            Thanks a lot

            The creating connection working well when i try to use the same VM, but I got other truble
            16:49:15,698 ERROR [JMSContainerInvoker] Exception in JMSCI message listener
            java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
            java.lang.SecurityException: Authentication exception, principal=null
            java.lang.SecurityException: Authentication exception, principal=null
            at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(Se
            curityInterceptor.java:169)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
            java:118)
            ...

            • 3. Re: Can't createQueueConnection()
              Peter Antman Expert

              Thats a classical one, seach the archives for a solution. MDB:s does currently not work well when deployed in a secured jar.

              //Peter