[ESBJAVA-4999] ESB gives parer error "JsonUtil #writeAsJson. Payload could not be written as JSON" when received response without payload Created: 20/Jan/17  Updated: 20/Jan/17

Status: Open
Project: WSO2 ESB
Component/s: None
Affects Version/s: 4.9.0, 5.0.0
Fix Version/s: 5.1.0

Type: Bug Priority: High
Reporter: Jagath Ariyarathne Assignee: Jagath Ariyarathne
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Severity: Major
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

ESB gives parer error "JsonUtil #writeAsJson. Payload could not be written as JSON" when received response without payload for a JSON request.

TID: [-1234] [] [2017-01-14 21:57:50,746] ERROR {org.apache.synapse.transport.passthru.PassThroughHttpSender} -  Failed to submit the response {org.apache.synapse.transport.passthru.PassThroughHttpSender}
org.apache.axis2.AxisFault: Payload could not be written as JSON.
	at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUtil.java:236)
	at org.apache.synapse.commons.json.JsonStreamFormatter.writeTo(JsonStreamFormatter.java:61)
	at org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:556)
	at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:265)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
	at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:212)
	at org.apache.synapse.mediators.builtin.RespondMediator.mediate(RespondMediator.java:28)
	at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:89)
	at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:56)
	at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
	at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:297)
	at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:528)
	at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
	at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:247)
	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)

Sample response:

TID: [-1] [] [2017-01-17 14:38:03,373] DEBUG {org.apache.synapse.transport.http.wire} -  >> "HTTP/1.1 201 Created[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2017-01-17 14:38:03,373] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Host: localhost:8280[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2017-01-17 14:38:03,373] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Accept-Encoding: gzip,deflate[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2017-01-17 14:38:03,374] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Date: Tue, 17 Jan 2017 09:08:03 GMT[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2017-01-17 14:38:03,374] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Transfer-Encoding: chunked[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2017-01-17 14:38:03,376] DEBUG {org.apache.synapse.transport.http.wire} -  >> "[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2017-01-17 14:38:03,376] DEBUG {org.apache.synapse.transport.http.wire} -  >> "0[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2017-01-17 14:38:03,376] DEBUG {org.apache.synapse.transport.http.wire} -  >> "[\r][\n]" {org.apache.synapse.transport.http.wire}





[ESBJAVA-4998] Respond doesn't come back to client from the fault sequence when a parse error occurs at the insequence Created: 20/Jan/17  Updated: 20/Jan/17

Status: Open
Project: WSO2 ESB
Component/s: None
Affects Version/s: 4.8.1
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Prabushi Samarakoon Assignee: Chanaka Fernando
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File configuration     File exceptionHandle.patch    
Severity: Major
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

Steps to reproduce the error.
1. Apply patch1095 patch1246 patch1261 to ESB 4.8.1 pack
2. Set the ESB configuration as in configuration file attached here.
3. Send an incorrect xml payload to the API in the configuration ( http://172.18.0.1:8280/services/PublishOracleData )

When the parser error occurs at the insequence, the flow get directed to the fault sequence, and the response at the fault sequence doest not comeback to the client as expected. Instead, the flow get directed to the default fault sequence in ESB.

Fix can be found at https://github.com/wso2-support/wso2-synapse/commit/ede097edbcc9fd78dca463b7024546121622e9ba
Attached the diff that was tested also.






[ESBJAVA-4997] WebSocket port does not reflect with port offset Created: 18/Jan/17  Updated: 18/Jan/17

Status: Open
Project: WSO2 ESB
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Highest
Reporter: tharindu dharmarathna Assignee: Chanaka Fernando
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

APIM 2.1.0 - RC3


Severity: Major
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

Start Full node APIM packs in same vm with port offset.

webocket port going to open as same in both due to registry shairing






Generated at Sun Jan 22 17:42:34 IST 2017 using JIRA 7.2.2#72004-sha1:9d5132893cc8c728a3601a9034a1f8547ef5c7be.