[jboss-user] [JBoss Messaging] - Getting javax.jms.InvalidClientIDException when using 1.0.1.
sathish_06
do-not-reply at jboss.com
Tue Feb 20 10:05:44 EST 2007
Hi,
Iam trying to use the Jboss Messaging System-1.0.1.SP4, which got released recently, but its throwing exception message "javax.jms.InvalidClientIDException: Client ID 'defaultclient' already used by ConnectionEndpoint[-2147483632]"
Here is the configuration settings related to client ID in the persistence DB(oracle):
SELECT * FROM jms_user;
|
| USERID PASSWD CLIENTID
| mqm mqm defaultclient
| guest guest testclient
Note: We don't user user id - guest(client id - 'testclient'). We only uses userid - mqm.
And, we configured multiple destination(Topics) with single role/userid(mqm) in the destinations-service.xml file as shown below,
c:\jboss-4.0.4.GA\server\messaging\deploy\jboss-messaging.sar\destinations-service.xml
|
| <?xml version="1.0" encoding="UTF-8"?>
| <server>
|
| <mbean code="org.jboss.jms.server.destination.Topic"
| name="jboss.messaging.destination:service=Topic,name=HelloWorldTopic" xmbean-dd="xmdesc/Topic-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <attribute name="JNDIName">HelloWorldTopic</attribute>
| <attribute name="SecurityConfig">
| <security>
| <role name="mqm" read="true" write="true" create="true"/>
| </security>
| </attribute>
| </mbean>
|
|
| <mbean code="org.jboss.jms.server.destination.Topic"
| name="jboss.messaging.destination:service=Topic,name=UserDrivenCategorizationTopic" xmbean-dd="xmdesc/Topic-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <attribute name="JNDIName">UserDrivenCategorizationTopic</attribute>
| <attribute name="SecurityConfig">
| <security>
| <role name="mqm" read="true" write="true" create="true"/>
| </security>
| </attribute>
| </mbean>
|
| <mbean code="org.jboss.jms.server.destination.Topic"
| name="jboss.messaging.destination:service=Topic,name=TransactionCategorisationTopic" xmbean-dd="xmdesc/Topic-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <attribute name="JNDIName">TransactionCategorisationTopic</attribute>
| <attribute name="SecurityConfig">
| <security>
| <role name="mqm" read="true" write="true" create="true"/>
| </security>
| </attribute>
| </mbean>
| ........................
| ........................
|
| </server>
When we start JBoss Messaging system with the above configuration, it throwing below exception message:-
02:08:31,248 INFO [JMSContainerInvoker] Waiting for reconnect internal 10000ms for TransactionCategorisationMDB
| 02:08:31,279 ERROR [ExceptionUtil] org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint at b4dcd9 createConnectionDelega
| te [5c4o5s4p-gy8nr8-eyddak01-1-eyddfey7-1n]
| javax.jms.InvalidClientIDException: Client ID 'defaultclient' already used by ConnectionEndpoint[-2147483632]
| at org.jboss.jms.server.ServerPeer.checkClientID(ServerPeer.java:651)
| at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint.createConnectionDelegate(ServerConnectionFactoryEndpo
| int.java:129)
| at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised.org$jboss$jms$server$endpoint$advised$ConnectionFact
| oryAdvised$createConnectionDelegate$aop(ConnectionFactoryAdvised.java:64)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.jms.server.container.InjectionAspect.handleCreateConnectionDelegate(InjectionAspect.java:69)
| at org.jboss.aop.advice.org.jboss.jms.server.container.InjectionAspect0.invoke(InjectionAspect0.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:723)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:101)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:127)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:715)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:552)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:377)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:159)
| 02:08:31,279 ERROR [ServerThread] SocketServerInvoker[0.0.0.0:4457].invoke() call failed: Client ID 'perusworld' already used
| by ConnectionEndpoint[-2147483632]
| 02:08:31,295 WARN [JMSContainerInvoker] JMS provider failure detected for DataPointManagementMDB
| javax.jms.InvalidClientIDException: Client ID 'defaultclient' already used by ConnectionEndpoint[-2147483632]
| at org.jboss.jms.server.ServerPeer.checkClientID(ServerPeer.java:651)
| at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint.createConnectionDelegate(ServerConnectionFactoryEndpo
| int.java:129)
| at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised.org$jboss$jms$server$endpoint$advised$ConnectionFact
| oryAdvised$createConnectionDelegate$aop(ConnectionFactoryAdvised.java:64)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.jms.server.container.InjectionAspect.handleCreateConnectionDelegate(InjectionAspect.java:69)
| at org.jboss.aop.advice.org.jboss.jms.server.container.InjectionAspect0.invoke(InjectionAspect0.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:723)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:101
Note: When I use 1.0.1.SP2 version, with the above configuration, not facing this problem.
I just searched this error msg in the jboss site, the url -
http://lists.jboss.org/pipermail/jboss-cvs-commits/2007-February/021585.html , says that there is a fix made in 1.0.1.SP4, which avoids multiple Client IDs( as per JMS 1.1 spec).
Here is the snippet of the msg, mentioned in the above web url,
In ServerConnectionEndpoint.java file
|
| "
| + // verify the clientID is unique
| +
| + // JMS 1.1 Specifications, Section 4.3.2:
| + // "By definition, the client state identified by a client identifier can be ?in use? by
| + // only one client at a time. A JMS provider must prevent concurrently executing clients
| + // from using it."
| "
Iam not sure how we need to define the client ids/role. Can some one explan on this.
Do I need to define separate role(username, passwd and client id) for each destinations(Topics) as,
USERID PASSWD CLIENTID
| mqm1 mqm1 defaultclient1
| mqm2 mqm2 defaultclient2
| mqm3 mqm3 defaultclient3
| mqm4 mqm4 defaultclient4
and map them in destinations-service.xml as ,
<mbean code="org.jboss.jms.server.destination.Topic"
| name="jboss.messaging.destination:service=Topic,name=Topic1"
| xmbean-dd="xmdesc/Topic-xmbean.xml">
| ........
| <attribute name="SecurityConfig">
| <security>
| <role name="mqm1" read="true" write="true" create="true"/>
| </security>
| </attribute>
| </mbean>
|
| <mbean code="org.jboss.jms.server.destination.Topic"
| name="jboss.messaging.destination:service=Topic,name=Topic2"
| xmbean-dd="xmdesc/Topic-xmbean.xml">
| ........
| <attribute name="SecurityConfig">
| <security>
| <role name="mqm2" read="true" write="true" create="true"/>
| </security>
| </attribute>
| </mbean>
| mbean code="org.jboss.jms.server.destination.Topic"
| name="jboss.messaging.destination:service=Topic,name=Topic3"
| xmbean-dd="xmdesc/Topic-xmbean.xml">
| ........
| <attribute name="SecurityConfig">
| <security>
| <role name="mqm3" read="true" write="true" create="true"/>
| </security>
| </attribute>
| </mbean>
Is my understanding correct ?
Please help me in defining the client ids correctly to use 1.0.1.SP4.
Thx, Sathish
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019385#4019385
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019385
More information about the jboss-user
mailing list