1 Reply Latest reply on Jun 22, 2009 12:56 AM by Yong Hao Gao

    JBOSS Messaging Error

    Prabjot Singh Newbie

      Hi,

      There is a configuration file jbossmq-state.xml which is present in the JBOSS version 3.x and up. The entries are basically the user and their roles along with the client id's.

      However, in the latest JBOSS version 5, this file is not there and so we need to map the entries in the jbossmq-state.xml in some way in JBOSS 5.0 as well.

      I did figure out that the latest version has messaging directory, which has a -persistence-service.xml file, and in our case it is mssql-persistence-service.xml.

      In this file you can specify the insert queries for inserting the users, roles and their client ids into the messaging related tables like JBM_USER and JBM_ROLE. Now, when you start the JBOSS server, these tables gets created and the data is inserted into them.

      However, when I start the JBOSS server and start my client, I recieve the following error:

      Here it complains of having the existing client id as '000' in the jbm_user table

      javax.jms.IllegalStateException: Cannot set clientID, already set as 000
      at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.setClientID(ServerConnectionEndpoint.java:316)
      at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$setClientID$aop(ConnectionAdvised.java:85)
      at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$setClientID_N1479100880614063379.invokeTarget(ConnectionAdvised$setClientID_N1479100880614063379.java)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
      at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.setClientID(ConnectionAdvised.java)
      at org.jboss.jms.wireformat.ConnectionSetClientIDRequest.serverInvoke(ConnectionSetClientIDRequest.java:73)
      at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:549)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)

      Any help would be appreciated.

        • 1. Re: JBOSS Messaging Error
          Yong Hao Gao Master

          Hi,

          I'm afraid you didn't use setClientID correctly. Please see the following API doc:


          If a client sets the client identifier explicitly, it must do so immediately after it creates the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.