1 Reply Latest reply on Dec 6, 2006 7:52 PM by Nicolas Pujol

    The connection has already a clientID

    Pascal RICHIER Newbie


      Trying to refactor a piece of code from a friend from 2001, I have a JMS warning:

      20:50:28,000 INFO [JMSContainerInvoker] Trying to reconnect to JMS provider
      20:50:28,015 WARN [JMSContainerInvoker] JMS provider failure detected:
      javax.jms.IllegalStateException: The connection has already a clientID
       at org.jboss.mq.Connection.setClientID(Connection.java:521)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:696)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:862)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.run(JMSContainerInvoker.java:1432)
       at java.lang.Thread.run(Thread.java:534)
      20:50:28,015 INFO [JMSContainerInvoker] Reconnected to JMS provider

      I use jboss-4.0.2RC1 with these config files :

      - jboss.xml
       <configuration-name>Standard Message Driven Bean</configuration-name>

      - conf/login-config.xml modificated to use file-state-service.xml (move comments on database config)

      - default deploy/jms/file-state-service.xml, indicating to use jbossmq-state.xml file

      - conf/jbossmq-state.xml

      - deploy/jms/hsqldb-jdbc-state-service.xml removed
      - other config files are default files

      If someone has an idea of what happend here, I would be happy :)
      I have searched a lot (on this forum, wiki and with google) but haven't found the solution. I'm still in the fog :(

      Thanks all and have a nice day.


        • 1. Re: The connection has already a clientID
          Nicolas Pujol Newbie

          Because you have defined this:


          the clientid will be set automatically by jbossmq on the connection for user TPCAddSchool. If you want to connect to the topic you should not be specifying TopicConnection.setClientID. The exception you are seeing is per the JMS spec.