Noted Malaka. I have created the jiras [1] & [2]. [1] - https://wso2.org/jira/browse/ESBJAVA-4646 [2] - https://wso2.org/jira/browse/ESBJAVA-4647
Thanks Kesavan Yogarajah Software Engineer Mobile :+94 (0) 779 758021 kesav...@wso2.com WSO2, Inc. lean . enterprise . middleware On Thu, Jun 2, 2016 at 12:17 PM, Malaka Silva <mal...@wso2.com> wrote: > +1 Please create a jira and attach the fix. Better to fix it for all cases. > > ---------- Forwarded message ---------- > From: Kesavan Yogarajah <kesav...@wso2.com> > Date: Thu, Jun 2, 2016 at 11:53 AM > Subject: Testing with ESB 5.0.0-BETA > To: Malaka Silva <mal...@wso2.com> > > > Hi Malaka, > > I have checked the rabbitmq inbound and some connectors with the ESB - > 5.0.0 BETA. I have found the following issues with rabbitmq inbound and > payload factory mediator. > > 1. In rabbitmq inbound, during the consumption of messages if an ill > formed message come intermittently the message consumption stopped with > [1].Ideally the consumption of messages should be continue.This can be > solved with [2]. > 2. When we using $ctx directly in the payload factory mediator if the > property is not set, it throws the null point exception [3].This can be > reproduced with proxy [4].Ideally it should give the response as [5]. > > > WDYT? > can I create jiras for above? > > [1] - > [2016-06-02 11:28:59,017] ERROR - TaskQuartzJobAdapter Error in executing > task: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character > '{' (code 123) in prolog; expected '<' > at [row,col {unknown-source}]: [1,1] > org.apache.axiom.om.OMException: > com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' > (code 123) in prolog; expected '<' > at [row,col {unknown-source}]: [1,1] > at > org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296) > at > org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109) > at > org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570) > at > org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566) > at > org.apache.axis2.builder.ApplicationXMLBuilder.processDocument(ApplicationXMLBuilder.java:81) > at > org.wso2.carbon.inbound.endpoint.protocol.rabbitmq.RabbitMQInjectHandler.invoke(RabbitMQInjectHandler.java:107) > at > org.wso2.carbon.inbound.endpoint.protocol.rabbitmq.RabbitMQConnectionConsumer.startConsumer(RabbitMQConnectionConsumer.java:169) > at > org.wso2.carbon.inbound.endpoint.protocol.rabbitmq.RabbitMQConnectionConsumer.execute(RabbitMQConnectionConsumer.java:72) > at > org.wso2.carbon.inbound.endpoint.protocol.rabbitmq.RabbitMQTask.taskExecute(RabbitMQTask.java:39) > at > org.wso2.carbon.inbound.endpoint.common.OneTimeTriggerInboundTask.execute(OneTimeTriggerInboundTask.java:46) > at > org.wso2.carbon.mediation.ntask.NTaskAdapter.execute(NTaskAdapter.java:98) > at > org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67) > at org.quartz.core.JobRunShell.run(JobRunShell.java:213) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected > character '{' (code 123) in prolog; expected '<' > at [row,col {unknown-source}]: [1,1] > at > com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639) > at > com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2052) > at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134) > at > org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225) > at > org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34) > at > org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681) > at > org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214) > ... 17 more > > [2] - > diff --git > a/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/rabbitmq/RabbitMQConnectionConsumer.java > b/components/inbound-e > index d6c8ea5..fd818d0 100644 > --- > a/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/rabbitmq/RabbitMQConnectionConsumer.java > +++ > b/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/rabbitmq/RabbitMQConnectionConsumer.java > @@ -18,7 +18,14 @@ > > package org.wso2.carbon.inbound.endpoint.protocol.rabbitmq; > > -import com.rabbitmq.client.*; > +import com.rabbitmq.client.AMQP; > +import com.rabbitmq.client.Channel; > +import com.rabbitmq.client.Connection; > +import com.rabbitmq.client.ConsumerCancelledException; > +import com.rabbitmq.client.ShutdownSignalException; > +import com.rabbitmq.client.QueueingConsumer; > + > +import org.apache.axiom.om.OMException; > import org.apache.commons.lang.StringUtils; > import org.apache.commons.logging.Log; > import org.apache.commons.logging.LogFactory; > @@ -76,6 +83,8 @@ public class RabbitMQConnectionConsumer { > " was disconnected", sse); > waitForConnection(); > } > + } catch (OMException e){ > + log.error("Invalid Message Format while consuming the > message", e); > } catch (IOException e) { > log.error("RabbitMQ Listener of the inbound " + > inboundName + > " was disconnected", e); > > [3] > [2016-06-02 11:47:43,471] ERROR - SequenceMediator Runtime error occurred > while mediating the message > java.lang.NullPointerException > at > org.apache.synapse.mediators.transform.PayloadFactoryMediator.replaceCTX(PayloadFactoryMediator.java:236) > at > org.apache.synapse.mediators.transform.PayloadFactoryMediator.regexTransformCTX(PayloadFactoryMediator.java:213) > at > org.apache.synapse.mediators.transform.PayloadFactoryMediator.mediate(PayloadFactoryMediator.java:155) > at > org.apache.synapse.mediators.transform.PayloadFactoryMediator.mediate(PayloadFactoryMediator.java:104) > at > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) > at > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:54) > at > org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:164) > at > org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:215) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) > at > org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:398) > at > org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:145) > at > org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > [2016-06-02 11:47:43,474] INFO - LogMediator To: > /services/11test.11testHttpSoap12Endpoint, WSAction: urn:mediate, > SOAPAction: urn:mediate, MessageID: > urn:uuid:f933dae8-06ed-42a2-b008-8b829ebbb65e, Direction: request, MESSAGE > = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = > Runtime error occurred while mediating the message, Envelope: <?xml > version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=" > http://www.w3.org/2003/05/soap-envelope > "><soapenv:Body/></soapenv:Envelope> > > > [4] > > <?xml version="1.0" encoding="UTF-8"?> > <proxy xmlns="http://ws.apache.org/ns/synapse" > name="11test" > transports="http,https" > statistics="disable" > trace="disable" > startOnLoad="true"> > <target> > <inSequence> > <property name="param1" value="111111"/> > <property name="param2" value="222222"/> > <payloadFactory media-type="xml"> > <format> > <urn:elts xmlns:urn="wso2.esb.test"> > <urn:elt1>$1</urn:elt1> > <urn:elt2>$ctx:param2</urn:elt2> > <urn:elt3>$2</urn:elt3> > <urn:elt4>$ctx:param4</urn:elt4> > </urn:elts> > </format> > <args> > <arg evaluator="xml" expression="get-property('param1')"/> > <arg evaluator="xml" expression="get-property('param3')"/> > </args> > </payloadFactory> > <log level="custom"/> > <respond/> > </inSequence> > <outSequence> > <log/> > <send/> > </outSequence> > </target> > <description/> > </proxy> > > [5] - > <urn:elts xmlns:urn="wso2.esb.test"> > <urn:elt1>111111</urn:elt1> > <urn:elt2>222222</urn:elt2> > <urn:elt3/> > <urn:elt4/> > </urn:elts> > > > Thanks > > Kesavan Yogarajah > Software Engineer > Mobile :+94 (0) 779 758021 > kesav...@wso2.com > WSO2, Inc. > lean . enterprise . middleware > > > > -- > > Best Regards, > > Malaka Silva > Senior Tech Lead > M: +94 777 219 791 > Tel : 94 11 214 5345 > Fax :94 11 2145300 > Skype : malaka.sampath.silva > LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77 > Blog : http://mrmalakasilva.blogspot.com/ > > WSO2, Inc. > lean . enterprise . middleware > http://www.wso2.com/ > http://www.wso2.com/about/team/malaka-silva/ > <http://wso2.com/about/team/malaka-silva/> > https://store.wso2.com/store/ > > Save a tree -Conserve nature & Save the world for your future. Print this > email only if it is absolutely necessary. > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev