Yeah, the given patch fix the client ID issue. Since the issue is still in open state best thing would be to apply the patch your self into the artifact http://mirrors.ibiblio.org/apache//ws/commons/transport/1_0_0/axis2-transport-jms-1.0.0-sources.jarat http://ws.apache.org/commons/transport/download.cgi yourself and build the binary. I think Synapse 2.1 was out with this version of jms-transport.
It seems the WSO2 version of the same jar is incompatible with Synapse. Hope this helps. Rajika On Wed, Aug 15, 2012 at 4:46 PM, Wright, Peter <[email protected]>wrote: > Hi Rajika, > > I tried using that JAR file axis2-transport-jms-1.1.0-wso2v6.jar and the > following > axis2 config for a durable subscription, but unfortunately got a > NullPointerException. > ====================================== > transport.jms.SubscriptionDurable true > transport.jms.DurableSubscriberName msgmed.DEV1 > transport.jms.DurableSubscriberClientID myClientID > ====================================== > 2012-08-15T11:42:32,INFO > ,mdzhsfesb01,MSGMED,AbstractTransportListener.java:176,JMS Listener started > 2012-08-15T11:42:32,ERROR,mdzhsfesb01,MSGMED,AbstractTransportListener.java:234,Unexpected > error when configuring service JMS_XML_Proxy for the JMS transport. It will > be disabled for this transport and marked as faulty. > java.lang.NullPointerException > at > org.apache.axis2.transport.jms.JMSListener.getConnectionFactory(JMSListener.java:132) > at > org.apache.axis2.transport.jms.JMSEndpoint.loadConfiguration(JMSEndpoint.java:193) > at > org.apache.axis2.transport.base.AbstractTransportListenerEx.startListeningForService(AbstractTransportListenerEx.java:112) > at > org.apache.axis2.transport.base.AbstractTransportListener.internalStartListeningForService(AbstractTransportListener.java:213) > at > org.apache.axis2.transport.base.AbstractTransportListener$2.serviceAdded(AbstractTransportListener.java:126) > at > org.apache.axis2.transport.base.tracker.AxisServiceTracker.serviceAdded(AxisServiceTracker.java:212) > at > org.apache.axis2.transport.base.tracker.AxisServiceTracker.start(AxisServiceTracker.java:188) > at > org.apache.axis2.transport.base.AbstractTransportListener.start(AbstractTransportListener.java:178) > at > org.apache.axis2.engine.ListenerManager.start(ListenerManager.java:167) > at > org.apache.synapse.Axis2SynapseController.start(Axis2SynapseController.java:273) > at org.apache.synapse.ServerManager.start(ServerManager.java:185) > at org.apache.synapse.SynapseServer.main(SynapseServer.java:68) > 2012-08-15T11:42:32,WARN > ,mdzhsfesb01,MSGMED,AbstractTransportListener.java:192,Disabling the jms > transport for the service JMS_XML_Proxy, because it is not configured > properly for the service > ======================================== > > I did some "durable subscriber" tests using a standalone java application. > According to the docu ( > http://www.novell.com/documentation/extend52/Docs/help/MP/jms/tutorial/durable-1.htm > ), > two steps are necessary for a durable subscription: > > 1. Set the clientID to the connection > connection.setClientID(clientID); > > 2. Pass the subscriberName when creating the subscriber > subscriber = session.createDurableSubscriber(topicIn, subName); > > When I do both steps in my standalone java application, all works well. > When the first step is not done, I get exactly the same error message as I > got > earlier with synapse "Exception message: JMSCC0101: The client ID cannot > be null". > > It seems that step 1 is possibly missing in Synapse? > Maybe what you fixed in the WSO JAR file (that appears to be incompatible > with the synapse libs). > > Regards, > Peter > > -----Original Message----- > From: Rajika Kumarasiri [mailto:[email protected]] > Sent: Dienstag, 14. August 2012 18:02 > To: [email protected] > Subject: Re: Synapse: JMS Listener with durable subscription: how to > define client ID? > > This is probably because > https://issues.apache.org/jira/browse/WSCOMMONS-567 > . > > You can try using the > > http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/axis2/axis2-transport-jms/1.1.0-wso2v6/axis2-transport-jms-1.1.0-wso2v6.jarand > see if that helps. > > Rajika > > On Tue, Aug 14, 2012 at 2:28 PM, Wright, Peter > <[email protected]>wrote: > > > Hi Rajika, > > > > I tried setting transport.jms.DurableSubscriberClientID both ways: > > - "true" (as described here: > > > http://wso2.org/project/esb/java/4.0.3/docs/transports/transports-catalog.html > > ) > > - with a name e.g. "myClientID" (as I expected it to be defined) > > > > Unfortunately I always get the same exception: > > "The client ID cannot be null. Specify a non-null client ID." > > > > Any other ideas? > > Has anyone got a durable subscriber in synapse up and running with IBM > MQ? > > > > Thanks for the help, > > Peter > > > > -----Original Message----- > > From: Rajika Kumarasiri [mailto:[email protected]] > > Sent: Dienstag, 14. August 2012 10:32 > > To: [email protected] > > Subject: Re: Synapse: JMS Listener with durable subscription: how to > > define client ID? > > > > You need to set it via the > > property, transport.jms.DurableSubscriberClientID and not set it to true. > > Also this can be a proxy service level parameter so that you can define > > different client ids for different proxy services. > > > > Hope this helps. > > > > Rajika > > > > On Tue, Aug 14, 2012 at 12:01 PM, Wright, Peter > > <[email protected]>wrote: > > > > > Hi, > > > > > > I want to define a JMS listener as a durable subscription, > > > but always get an error message that the client-id is null. > > > I'm using IBM MQ as the messaging provider. > > > > > > I've attached the error messages and my axis2 JMS config. > > > > > > Running synapse 2.1.0 on solaris 10. > > > > > > Thanks for any help, > > > Peter > > > > > > -------------------------------------------- > > > > > > Error Messages > > > > > > 2012-08-14T08:16:33,INFO > ,mdzhsfesb01,MSGMED,SynapseServer.java:70,Apache > > > Synapse started successfully > > > > > > 2012-08-14T08:16:34,ERROR,mdzhsfesb01,MSGMED,ServiceTaskManager.java:965,Error > > > creating JMS consumer for service : JMS_XML_Proxy > > > com.ibm.msg.client.jms.DetailedInvalidClientIDException: JMSCC0101: The > > > client ID cannot be null. Specify a non-null client ID. > > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > Method) > > > at > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > > at > > > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > > at > > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > > at > > > > > > com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:313) > > > at > > > > > > com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:388) > > > at > > > > > > com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:104) > > > at > > > > > > com.ibm.msg.client.jms.internal.JmsSessionImpl.createDurableSubscriber(JmsSessionImpl.java:964) > > > at > > > com.ibm.mq.jms.MQSession.createDurableSubscriber(MQSession.java:467) > > > at > > > > org.apache.axis2.transport.jms.JMSUtils.createConsumer(JMSUtils.java:632) > > > at > > > > > > org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.createConsumer(ServiceTaskManager.java:839) > > > at > > > > > > org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.getMessageConsumer(ServiceTaskManager.java:710) > > > at > > > > > > org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.receiveMessage(ServiceTaskManager.java:478) > > > at > > > > > > org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.run(ServiceTaskManager.java:409) > > > at > > > > > > org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58) > > > at > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > > at > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > > at java.lang.Thread.run(Thread.java:662) > > > > > > -------------------------------------------- > > > > > > axis2.xml > > > > > > <transportReceiver name="jms" > > > class="org.apache.axis2.transport.jms.JMSListener"> > > > <parameter name="java.naming.factory.initial" > > > locked="false">com.sun.jndi.ldap.LdapCtxFactory</parameter> > > > <parameter name="java.naming.provider.url" > > > locked="false">ldap://server:port/myDn</parameter> > > > <parameter name="transport.jms.ConnectionFactoryType" > > > locked="false">topic</parameter> > > > <parameter name="transport.jms.ConnectionFactoryJNDIName" > > > locked="false">cn=TCF-FINESB-POS-SED1.EU.DEV.01</parameter> > > > <parameter name="transport.jms.ConnectionFactory" > > > locked="false">cn=TCF-FINESB-POS-SED1.EU.DEV.01</parameter> > > > <parameter name="transport.jms.Destination" > > > locked="false">cn=sed.finesb.pos.fkism.cust</parameter> > > > <parameter name="transport.jms.DestinationType" > > > locked="false">topic</parameter> > > > <parameter name="java.naming.security.principal" > > > locked="false">myLoginDn</parameter> > > > <parameter name="java.naming.security.credentials" > > > locked="false">myPassword</parameter> > > > <parameter name="transport.jms.SubscriptionDurable" > > > locked="false">true</parameter> > > > <parameter name="transport.jms.DurableSubscriberName" > > > locked="false">msgmed.DEV1</parameter> > > > <parameter name="transport.jms.DurableSubscriberClientID" > > > locked="false">true</parameter> > > > </transportReceiver> > > > > > > > > > The content of this e-mail is intended only for the confidential use of > > > the person addressed. > > > If you are not the intended recipient, please notify the sender and > > delete > > > this email immediately. > > > Thank you. > > > > > The content of this e-mail is intended only for the confidential use of > > the person addressed. > > If you are not the intended recipient, please notify the sender and > delete > > this email immediately. > > Thank you. > > > The content of this e-mail is intended only for the confidential use of > the person addressed. > If you are not the intended recipient, please notify the sender and delete > this email immediately. > Thank you. >
