axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sagara Gunathunga (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AXIS2-5207) JSON formatted content gives an error if there is a line break ('\n') or tab space ('\t') or carriage return ('\r') after the first curly bracket
Date Mon, 12 Dec 2011 10:00:31 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-5207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sagara Gunathunga  resolved AXIS2-5207.
---------------------------------------

    Resolution: Fixed
    
> JSON formatted content gives an error if there is a line break ('\n') or tab space ('\t')
or carriage return ('\r') after the first curly bracket
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5207
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5207
>             Project: Axis2
>          Issue Type: Bug
>          Components: json
>    Affects Versions: 1.7.0
>            Reporter: Thilini Ishaka
>            Priority: Critical
>             Fix For: 1.7.0
>
>         Attachments: axis2_5207.patch
>
>
> A sample JSON (having a line break at the first line) which causes the error is; 
> { 
> "Hi_ABC": [ 
> {"abc": "PPP-TEST_11"}, 
> {"abc": "QQQ-Test1"} 
> ]} 
> The error log; 
> [2011-11-16 16:32:00,125] ERROR - OMSourcedElementImpl Could not get parser from data
source for element 
> "Hi_ABC" 
> javax.xml.stream.XMLStreamException 
> at org.codehaus.jettison.mapped.MappedXMLInputFactory.createXMLStreamReader(MappedXMLInputFactory.java:46)

> at org.apache.axis2.json.JSONDataSource.getReader(JSONDataSource.java:56) 
> at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:225)

> at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElementImpl.java:254)

> at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:685)

> at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeChildren(OMSerializerUtil.java:556)

> at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:875)

> at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:230)

> at org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:125)

> at org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:113)

> at org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:988) 
> at java.lang.String.valueOf(String.java:2826) 
> at java.lang.StringBuffer.append(StringBuffer.java:219) 
> at org.apache.synapse.mediators.builtin.LogMediator.getFullLogMessage(LogMediator.java:184)

> at org.apache.synapse.mediators.builtin.LogMediator.getLogMessage(LogMediator.java:123)

> at org.apache.synapse.mediators.builtin.LogMediator.mediate(LogMediator.java:91) 
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)

> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)

> at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:154)

> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) 
> at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)

> at org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:408)

> at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:259) 
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)

> 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) 
> [2011-11-16 16:32:00,127] ERROR - NativeWorkerPool Uncaught exception 
> java.lang.RuntimeException: Error obtaining parser from data source:null 
> at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:230)

> at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElementImpl.java:254)

> at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:685)

> at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeChildren(OMSerializerUtil.java:556)

> at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:875)

> at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:230)

> at org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:125)

> at org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:113)

> at org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:988) 
> at java.lang.String.valueOf(String.java:2826) 
> at java.lang.StringBuffer.append(StringBuffer.java:219) 
> at org.apache.synapse.mediators.builtin.LogMediator.getFullLogMessage(LogMediator.java:184)

> at org.apache.synapse.mediators.builtin.LogMediator.getLogMessage(LogMediator.java:123)

> at org.apache.synapse.mediators.builtin.LogMediator.mediate(LogMediator.java:91) 
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)

> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)

> at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:154)

> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) 
> at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)

> at org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:408)

> at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:259) 
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)

> 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) 
> With the CRLF after the first curly bracket throws following error.
> 'Could not get parser from data source for element ^M"Hi_ABC"' (^M = ascii 0x0D): 
> INFO | jvm 1 | 2011/11/28 09:37:43 | [2011-11-28 09:37:43,749] DEBUG - TransportUtils
createSOAPEnvelope using Builder (class org.apache.synapse.commons.builders.XFormURLEncode

> dBuilder) selected from type (application/x-www-form-urlencoded) 
> INFO | jvm 1 | 2011/11/28 09:37:43 | [2011-11-28 09:37:43,750] INFO - LogMediator To:
/services/JSONTestProxy, MessageID: 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message