[ESBJAVA-4590] Script Mediator does not support concurrent execution and is using ScripEngine.eval() which does not guarantee state isolation between script executions. Created: 04/May/16  Updated: 04/May/16  Resolved: 04/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: Mediators
Affects Version/s: 4.8.1, 4.9.0
Fix Version/s: 5.0.0, 5.0.0-Beta

Type: Bug Priority: Highest
Reporter: Ravi Undupitiya Assignee: Ravi Undupitiya
Resolution: Fixed 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   

Regression from ESBJAVA-3616 causes script executions to happen sequentially. There is another issue with the script mediator where ScriptEngine.eval() method may be called from different threads while script execution is in progress leading to error [1] intermittently. This seems to be because ScriptEngine.eval() can't guarantee state isolation between executions based on https://docs.oracle.com/javase/7/docs/api/javax/script/ScriptEngine.html#eval(java.lang.String,%20javax.script.ScriptContext).

[1] TID: [0] [ESB] [2016-05-02 14:25:40,141] ERROR

{org.apache.synapse.mediators.bsf.ScriptMediator} - The script engine returned an error executing the external js script : Value {name ='null', keyValue ='conf:/repository/esb/transform.js'} function transform {org.apache.synapse.mediators.bsf.ScriptMediator}

com.sun.phobos.script.util.ExtendedScriptException: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "name" from undefined (<Unknown source>#8) in <Unknown source> at line number 8



 Comments   
Comment by Ravi Undupitiya [ 04/May/16 ]

Fixed with https://github.com/wso2/wso2-synapse/pull/524 and https://github.com/wso2/product-esb/pull/512





[ESBJAVA-4591] [WSO2 ESB Mediation Debugger][Clear Property] Clearing value of property give an error Created: 04/May/16  Updated: 04/May/16  Resolved: 04/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: None
Affects Version/s: 5.0.0 - Alpha
Fix Version/s: 5.0.0-Beta

Type: Bug Priority: Highest
Reporter: Nuwan Pallewela Assignee: Nuwan Pallewela
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Severity: Major
Estimated Complexity: Moderate

 Description   

Preconditions:
1) ESB debug mediation should be started. (Followed: https://nuwanpallewela.wordpress.com/2016/04/10/how-to-debug-wso2-esb-mediation-flow/ )

Steps to reproduce:
1) Added four debugging points (Payload factory mediators and send mediators)
2) When hit the first payload mediator debug point, tried to clear one of synapse property.

Expected Result:

Synapse property value should be cleared.

Actual Result:

Error will be pop up and value will remain as before.

[2016-04-12 15:41:00,905] ERROR - SynapseDebugManager Failed to set or remove property in the scope synapse
org.codehaus.jettison.json.JSONException: JSONObject["property-value"] not found.
at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:387)
at org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:514)
at org.apache.synapse.debug.SynapseDebugManager.addMediationFlowPointProperty(SynapseDebugManager.java:837)
at org.apache.synapse.debug.SynapseDebugManager.processDebugCommand(SynapseDebugManager.java:302)
at org.apache.synapse.debug.SynapseDebugTCPListener.run(SynapseDebugTCPListener.java:57)
[2016-04-12 15:41:00,906] ERROR - SynapseDebugManager Failed to set or remove property in the scope synapse
org.codehaus.jettison.json.JSONException: JSONObject["property-value"] not found.
at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:387)
at org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:514)
at org.apache.synapse.debug.SynapseDebugManager.addMediationFlowPointProperty(SynapseDebugManager.java:837)
at org.apache.synapse.debug.SynapseDebugManager.processDebugCommand(SynapseDebugManager.java:302)
at org.apache.synapse.debug.SynapseDebugTCPListener.run(SynapseDebugTCPListener.java:57)

Note: Added new property within the mediation and tried to clear value of that particular property. It was also failed with the same error.



 Comments   
Comment by Nuwan Pallewela [ 04/May/16 ]

This issue is fixed with following commit
0ecbffb4cbcd47d02ad442be11eb746e71bd42d6





[ESBJAVA-3697] Test and document the process of upgrading from ESB 4.8.1 to ESB 4.9.0 Created: 19/May/15  Updated: 04/May/16  Resolved: 04/May/16

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

Type: Task Priority: High
Reporter: Kasun Indrasiri Assignee: viraj senevirathne
Resolution: Fixed 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   

The content in https://docs.wso2.com/display/ESB490/Upgrading+from+the+Previous+Release can be used as a draft and steps can be added/removed as required while testing the upgrade



 Comments   
Comment by viraj senevirathne [ 04/May/16 ]

The doc https://docs.wso2.com/display/ESB490/Upgrading+from+a+Previous+Release created for migration related details.





[ESBJAVA-4406] File inbound processing fails in a clustered setup at high loads Created: 08/Feb/16  Updated: 03/May/16  Resolved: 03/May/16

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

Type: Bug Priority: Highest
Reporter: Akila Perera Assignee: viraj senevirathne
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image.png    
Severity: Major
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

Environment:
Clustered setup of 1 manager and 2 workers (Ubuntu) with a Samba file share.
1 File inbound service configured with following properties;

<parameter name="transport.vfs.Locking">enable</parameter>
<parameter name="transport.vfs.DistributedLock">true</parameter>
<parameter name=​​"coordination">false</parameter>

Add high number of files, around 700 - 1000 with about 30Kb size each.

While processing the files, ESB throws the following error;

TID: [-1234] [] [2016-01-18 16:25:17,444] ERROR

{org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer} - Error moving file : smb://{location}
/Replay/new/file1.xml to smb://{location}/Replay/tmp/ {org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer}

org.apache.commons.vfs2.FileSystemException: Could not rename "smb://

{location}
/Replay/new/file1.xml" to "smb://{location}

//Replay/tmp/file1.xml".
at org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1117)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.moveOrDeleteAfterProcessing(FilePollingConsumer.java:842)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.directoryHandler(FilePollingConsumer.java:568)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.poll(FilePollingConsumer.java:214)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.execute(FilePollingConsumer.java:134)
at org.wso2.carbon.inbound.endpoint.protocol.file.FileTask.taskExecute(FileTask.java:45)
at org.wso2.carbon.inbound.endpoint.common.InboundTask.execute(InboundTask.java:50)
at org.wso2.carbon.mediation.ntask.NTaskAdapter.execute(NTaskAdapter.java:90)
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:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: jcifs.smb.SmbException: The system cannot find the file specified.
at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
at jcifs.smb.SmbTransport.send(SmbTransport.java:663)
at jcifs.smb.SmbSession.send(SmbSession.java:238)
at jcifs.smb.SmbTree.send(SmbTree.java:119)
at jcifs.smb.SmbFile.send(SmbFile.java:775)
at jcifs.smb.SmbFile.renameTo(SmbFile.java:2076)
at org.apache.commons.vfs2.provider.smb.SmbFileObject.doRename(SmbFileObject.java:187)
at org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1103)
... 14 more
TID: [-1234] [] [2016-01-18 16:25:17,473] WARN

{org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer} - Unable to set file length or last modified date header. {org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer}

org.apache.commons.vfs2.FileSystemException: Could not determine the size of "smb://

{location}

//Replay/new/file1.xml" because it is not a file.
at org.apache.commons.vfs2.provider.DefaultFileContent.getSize(DefaultFileContent.java:131)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.processFile(FilePollingConsumer.java:748)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.directoryHandler(FilePollingConsumer.java:541)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.poll(FilePollingConsumer.java:214)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.execute(FilePollingConsumer.java:134)
at org.wso2.carbon.inbound.endpoint.protocol.file.FileTask.taskExecute(FileTask.java:45)
at org.wso2.carbon.inbound.endpoint.common.InboundTask.execute(InboundTask.java:50)
at org.wso2.carbon.mediation.ntask.NTaskAdapter.execute(NTaskAdapter.java:90)
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:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by Akila Perera [ 08/Feb/16 ]

The file check condition at [1] fails under high concurrency. Physical file locks are not reliable.

[1] https://github.com/wso2/carbon-mediation/blob/carbon-mediation-4.4.10/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/file/FilePollingConsumer.java#L708

Comment by viraj senevirathne [ 03/May/16 ]

Tested with smb share with clustered setup of 1 manager and 2 workers (Ubuntu) on ESB 5.0.0 ALPHA pack.

Windows OS: windows 7
Ubuntu: 14.04 , machine with ESB server

Inbound config:
<inboundEndpoint name="filetask" onError="fault" protocol="file"
sequence="test" suspend="false">
<parameters>
<parameter name="interval">10</parameter>
<parameter name="coordination">false</parameter>
<parameter name="transport.vfs.ContentType">text/xml</parameter>
<parameter name="transport.vfs.LockReleaseSameNode">false</parameter>
<parameter name="transport.vfs.AutoLockRelease">false</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.CreateFolder">true</parameter>
<parameter name="sequential">true</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.FileURI">smb://Administrator:wso2321#qa@192.168.57.188/c$/vfs/in</parameter>
<parameter name="transport.vfs.MoveAfterFailure">smb://Administrator:wso2321#qa@192.168.57.188/c$/vfs/fail</parameter>
<parameter name="transport.vfs.DistributedLock">true</parameter>
<parameter name="transport.vfs.Streaming">false</parameter>
<parameter name="transport.vfs.MoveAfterProcess">smb://Administrator:wso2321#qa@192.168.57.188/c$/vfs/move</parameter>
<parameter name="transport.vfs.Locking">enable</parameter>
<parameter name="transport.vfs.FileSortAscending">true</parameter>
<parameter name="transport.vfs.FileSortAttribute">NONE</parameter>
<parameter name="transport.vfs.Build">false</parameter>
</parameters>
</inboundEndpoint>

Both nodes processed about 10000 files but the issue cannot be reproduced.

Comment by Akila Perera [ 03/May/16 ]

This issue was independently reproduced in a 4 node ESB cluster and a Samba file share.

Comment by viraj senevirathne [ 03/May/16 ]

I tested this for four node cluster, but still the issue mentioned didn't reproduce.





[ESBJAVA-4411] Upgrade Commons-net to 3.4 Created: 09/Feb/16  Updated: 03/May/16  Resolved: 03/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: Cloud Connectors
Affects Version/s: 4.9.0
Fix Version/s: 5.0.0-Beta

Type: Improvement Priority: Highest
Reporter: Malaka Silva Assignee: Nuwan Wimalasekara
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates CARBON-15778 Upgrade Commons-net to 3.4 for ESB Resolved
Severity: Major
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

There are issues when connecting to ftp over proxy when using commons.net 3.3



 Comments   
Comment by Malaka Silva [ 09/Feb/16 ]

Hi,

Find the following prs. Orbit needs to be merged first.

[1] https://github.com/wso2/orbit/pull/172
[2] https://github.com/wso2/carbon-mediation/pull/522
[3] https://github.com/wso2/wso2-commons-vfs/pull/29
[4] https://wso2.org/jira/browse/CARBON-15778

Comment by Nuwan Wimalasekara [ 03/May/16 ]

Updated PR[1] with import version range

[1] https://github.com/wso2/orbit/pull/187





[ESBJAVA-4580] xsi:type support in datamapper engine side Created: 01/May/16  Updated: 03/May/16  Resolved: 03/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: None
Affects Version/s: 5.0.0 - Alpha
Fix Version/s: 5.0.0-Beta

Type: Improvement Priority: High
Reporter: Viraj Rajaguru Assignee: Viraj Rajaguru
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Severity: Major
Estimated Complexity: Moderate
Attachment License: I agree to grant a license to WSO2 for this work for inclusion in WSO2 works as per the WSO2 Contributor License Agreement and the Apache License 2.0

 Comments   
Comment by Viraj Rajaguru [ 03/May/16 ]

Fixed in 5ce52d873357a5f4831aae56842bc3eb7a0040b2 and e5dc9aaab47dc801b59de2cfec23987fc69b6237 in https://github.com/wso2/carbon-mediation





[ESBJAVA-4225] Endpoint re-deployment issue via a CAR while invoking the same endpoint Created: 14/Sep/15  Updated: 03/May/16  Resolved: 03/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: None
Affects Version/s: 4.8.1
Fix Version/s: 5.0.0-Beta

Type: Bug Priority: Highest
Reporter: Asanthi Kulasinghe Assignee: Viraj Rajaguru
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 13.04
JDK 1.7.0


Attachments: Text File reproduced.log    
Severity: Major
Estimated Complexity: Moderate

 Description   

1. Deploy a CAR file with an Endpoint.
2. Continuously invoke an endpoint in the CAR file.
3. Re-deploy the updated CAR file though the management console, without undeploying the already deployed CAR file or stopping the invocation.

The following error occurs.
But the logs indicate that the previously endpoint is undeployed successfully. (Complete log is attached)

( TID: [0] [ESB] [2015-09-11 14:59:39,555] INFO

{org.apache.synapse.deployers.EndpointDeployer} - Endpoint named 'helloep' has been undeployed {org.apache.synapse.deployers.EndpointDeployer}

)

________________________________________________

TID: [0] [ESB] [2015-09-11 14:59:40,586] ERROR

{org.apache.synapse.config.SynapseConfiguration} - Duplicate endpoint definition for key : helloep {org.apache.synapse.config.SynapseConfiguration}

TID: [0] [ESB] [2015-09-11 14:59:40,587] ERROR

{org.wso2.carbon.endpoint.EndpointDeployer} - Endpoint Deployment from the file : /home/kaushie/SUPPORT/1sept2015/BELATRIXPRTNERDEV-2/wso2esb-4.8.1/repository/carbonapps/work/1441963779722RobbinsBrothersCAR_1.0.0.car/helloep_1.0.0/helloep-1.0.0.xml : Failed. {org.wso2.carbon.endpoint.EndpointDeployer}

org.apache.synapse.SynapseException: Duplicate endpoint definition for key : helloep
at org.apache.synapse.config.SynapseConfiguration.handleException(SynapseConfiguration.java:1515)
at org.apache.synapse.config.SynapseConfiguration.assertAlreadyExists(SynapseConfiguration.java:1829)
at org.apache.synapse.config.SynapseConfiguration.addEndpoint(SynapseConfiguration.java:865)
at org.apache.synapse.deployers.EndpointDeployer.deploySynapseArtifact(EndpointDeployer.java:64)
at org.wso2.carbon.endpoint.EndpointDeployer.deploySynapseArtifact(EndpointDeployer.java:36)
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:192)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifacts(SynapseAppDeployer.java:100)
at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:251)
at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:114)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:79)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:124)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
TID: [0] [ESB] [2015-09-11 14:59:40,589] ERROR

{org.apache.synapse.deployers.AbstractSynapseArtifactDeployer} - Deployment of the Synapse Artifact from file : /home/kaushie/SUPPORT/1sept2015/BELATRIXPRTNERDEV-2/wso2esb-4.8.1/repository/carbonapps/work/1441963779722RobbinsBrothersCAR_1.0.0.car/helloep_1.0.0/helloep-1.0.0.xml : Failed! {org.apache.synapse.deployers.AbstractSynapseArtifactDeployer}

org.apache.synapse.deployers.SynapseArtifactDeploymentException: Endpoint Deployment from the file : /home/kaushie/SUPPORT/1sept2015/BELATRIXPRTNERDEV-2/wso2esb-4.8.1/repository/carbonapps/work/1441963779722RobbinsBrothersCAR_1.0.0.car/helloep_1.0.0/helloep-1.0.0.xml : Failed.
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.handleSynapseArtifactDeploymentError(AbstractSynapseArtifactDeployer.java:473)
at org.apache.synapse.deployers.EndpointDeployer.deploySynapseArtifact(EndpointDeployer.java:76)
at org.wso2.carbon.endpoint.EndpointDeployer.deploySynapseArtifact(EndpointDeployer.java:36)
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:192)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifacts(SynapseAppDeployer.java:100)
at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:251)
at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:114)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:79)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:124)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.synapse.SynapseException: Duplicate endpoint definition for key : helloep
at org.apache.synapse.config.SynapseConfiguration.handleException(SynapseConfiguration.java:1515)
at org.apache.synapse.config.SynapseConfiguration.assertAlreadyExists(SynapseConfiguration.java:1829)
at org.apache.synapse.config.SynapseConfiguration.addEndpoint(SynapseConfiguration.java:865)
at org.apache.synapse.deployers.EndpointDeployer.deploySynapseArtifact(EndpointDeployer.java:64)
... 22 more



 Comments   
Comment by Viraj Rajaguru [ 27/Apr/16 ]

Let me explain the reason for this issue..

See the below stack-trace for an endpoint invocation with a send mediator.

org.apache.synapse.config.SynapseConfiguration.getEntryDefinition(SynapseConfiguration.java:869)
org.apache.synapse.endpoints.IndirectEndpoint.reLoadAndInitEndpoint(IndirectEndpoint.java:155)
org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:51)
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:115)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:83)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:49)
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:160)
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:197)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:395)
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

As you can see in the stacktrace, while the endpoint invocation, org.apache.synapse.config.SynapseConfiguration.getEntryDefinition(String key) method is being invoked and it is adding a new "Entry" if the localRegistry.get(key) evaluates to null. See below code snippet.

public Entry getEntryDefinition(String key) {
Object o = localRegistry.get(key);
if (o == null || o instanceof Entry) {
if (o == null) {
// this is not a local definition
synchronized (this) {
o = localRegistry.get(key);
if (o == null)

{ Entry entry = new Entry(key); entry.setType(Entry.REMOTE_ENTRY); addEntry(key, entry); return entry; }

}
}
return (Entry) o;
} else {
if (log.isDebugEnabled())

{ log.debug("There is no local registry entry for key : " + key); }

return null;
}
}

Since we are undeploying the CAR file, there is a possibility to get null value for localRegistry.get(key). So that, when we get a null value for localRegistry.get(key) it will create a new Entry with the key value according to the above code snippet and while the actual endpoint deployment it is failing because there is a entry added with the same key.

Thanks,
Viraj.

Comment by Viraj Rajaguru [ 27/Apr/16 ]

Fixed with e2b55db0fb0174d3962589db165605a6f4233581 commit in https://github.com/wso2/wso2-synapse





[ESBJAVA-4446] [ESB500][JMS 2.0 Feature : JMSXDeliveryCount]Could not reconnect to JMS broker after loosing connection. Created: 26/Feb/16  Updated: 03/May/16  Resolved: 03/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: None
Affects Version/s: 5.0.0 - M1
Fix Version/s: 5.0.0-Beta

Type: Bug Priority: Highest
Reporter: Dilshani Subasinghe Assignee: Viraj Rajaguru
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

pack: ESB 5.0.0 M2
java: jdk1.8.0_72
Dep: Distributed setup
DB: Oracle 12c


Severity: Major
Estimated Complexity: Moderate

 Description   

Steps to reproduce:

1) Follow steps of use case: "JMS 2.0 Feature : JMSXDeliveryCount" - https://docs.google.com/document/d/1kODw_Fru4sVpOAyBfhv3FHyTir0hzb5EKSbXa5LMcSs/edit#heading=h.5gtn7oha43j5

2) After testing the use case, shut down JMS broker.

3) ESB will show an error indicating lost JMS Connection.

4) Restart JMS broker.

4) Even after restarting, ESB do not create JMS connection and give the same error continuously.

TID: [-1234] [] [2016-02-26 10:51:17,736] ERROR {org.wso2.carbon.inbound.endpoint.protocol.jms.factory.JMSConnectionFactory} -  JMS Exception while obtaining session for factory 'QueueConnectionFactory' HQ119001: Failed to create session {org.wso2.carbon.inbound.endpoint.protocol.jms.factory.JMSConnectionFactory}
TID: [-1234] [] [2016-02-26 10:51:17,736] ERROR {org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer} -  Error while receiving JMS message. null {org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer}
java.lang.NullPointerException
	at org.wso2.carbon.inbound.endpoint.protocol.jms.factory.JMSConnectionFactory.createMessageConsumer(JMSConnectionFactory.java:370)
	at org.wso2.carbon.inbound.endpoint.protocol.jms.factory.CachedJMSConnectionFactory.createMessageConsumer(CachedJMSConnectionFactory.java:124)
	at org.wso2.carbon.inbound.endpoint.protocol.jms.factory.CachedJMSConnectionFactory.getMessageConsumer(CachedJMSConnectionFactory.java:116)
	at org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer.poll(JMSPollingConsumer.java:134)
	at org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer.execute(JMSPollingConsumer.java:98)
	at org.wso2.carbon.inbound.endpoint.protocol.jms.JMSTask.taskExecute(JMSTask.java:45)
	at org.wso2.carbon.inbound.endpoint.common.InboundTask.execute(InboundTask.java:44)
	at org.wso2.carbon.mediation.ntask.NTaskAdapter.execute(NTaskAdapter.java:90)
	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)


 Comments   
Comment by Viraj Rajaguru [ 03/May/16 ]

Fixed in commit ad2b06e8ce4a36947eeb73620fa9872eb8117953 in https://github.com/wso2/carbon-mediation





[ESBJAVA-4520] Improve the Kafka Inbound performance Created: 27/Mar/16  Updated: 03/May/16  Resolved: 03/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: Inbound Endpoints
Affects Version/s: None
Fix Version/s: 5.0.0-Beta

Type: Improvement Priority: Highest
Reporter: Kathees Rajendram Assignee: Kathees Rajendram
Resolution: Fixed Votes: 0
Labels: ESB-500
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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

 Comments   
Comment by Kathees Rajendram [ 27/Mar/16 ]

Improved the throughput from 700/s to 1050/s.
https://github.com/wso2/carbon-mediation/pull/553

Comment by Kathees Rajendram [ 27/Mar/16 ]

Need to introduce thread pool to improve the performance further.

Comment by viraj senevirathne [ 03/May/16 ]

Resolving this issue as the fix is tested with the a load test. New Jira [1] is created to track thread pool improvement.

[1] https://wso2.org/jira/browse/ESBJAVA-4589





[ESBJAVA-4582] Null Pointer Exception While running the Salesforce Integration test Created: 02/May/16  Updated: 02/May/16  Resolved: 02/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: None
Affects Version/s: 5.0.0 - Alpha
Fix Version/s: None

Type: Bug Priority: Highest
Reporter: Hariprasath Thanarajah Assignee: Hariprasath Thanarajah
Resolution: Not a bug 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   

Currently ESB 5.0.0 Alpha released with wso2-axis2-1.6.1.wso2v12, But there is a fix for wso2-axis2-v1.6.1-wso2v17 in https://github.com/wso2/wso2-axis2/blob/v1.6.1-wso2v17/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPSender.java

We need to get it fix in ESB 5.0.0 release.



 Comments   
Comment by Chanaka Fernando [ 02/May/16 ]

What is the pack you are testing? WSO2 ESB 5.0.0 Alpha is released with the correct axis2 version (161wso2v17). Please double check.





[ESBJAVA-4387] Mediation debugger failed to set breakpoints for Aggragete mediator inlined sequence. Created: 18/Jan/16  Updated: 02/May/16  Resolved: 02/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0, 5.0.0-Beta

Type: Bug Priority: Normal
Reporter: Kevin Ratnasekera Assignee: Kevin Ratnasekera
Resolution: Fixed 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

 Comments   
Comment by Kevin Ratnasekera [ 18/Jan/16 ]

fixed with [1]
[1] https://github.com/wso2/wso2-synapse/pull/433





[ESBJAVA-4564] ClassCastException when aggregating SOAP Responses with SOAP Headers using Aggregate mediator in Secured Proxy Created: 18/Apr/16  Updated: 02/May/16  Resolved: 02/May/16

Status: Resolved
Project: WSO2 ESB
Component/s: None
Affects Version/s: 4.8.1
Fix Version/s: 5.0.0-Beta

Type: Bug Priority: Highest
Reporter: Jagath Ariyarathne Assignee: Nuwan Pallewela
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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

 Description   

Following exception occurs when Aggregating SOAP response with SOAP Headers available using Aggregate mediator in Secured proxy.

Unexpected error sending message back

{org.apache.synapse.core.axis2.Axis2Sender}

org.apache.axis2.AxisFault: Error in extracting message properties
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:76)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426)
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:163)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:321)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:94)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:268)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:488)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:225)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.rampart.RampartException: Error in extracting message properties
at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:414)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
... 19 more
Caused by: org.apache.ws.security.WSSecurityException: Error in converting SOAP Envelope to Document; nested exception is:
java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMElementImpl cannot be cast to org.apache.axiom.soap.SOAPHeaderBlock
at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:149)
at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:268)
... 21 more
Caused by: java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMElementImpl cannot be cast to org.apache.axiom.soap.SOAPHeaderBlock
at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:99)
... 22 more
Steps to reproduce:
1. Create proxy which aggregates SOAP responses with SOAP Headers
2. Secure the proxy using UT policy
3. Above will be thrown while responses are passed through rampart module.



 Comments   
Comment by Jagath Ariyarathne [ 18/Apr/16 ]

Reason is due to that following code segment in org.apache.synapse.util.MessageHelper.cloneSOAPEnvelope method converts all header elements to instances of OMElement rather than SOAPHeaderBlock which is required by rampart.

if (envelope.getHeader() != null) {
Iterator itr = envelope.getHeader().cloneOMElement().getChildren();
while (itr.hasNext())

{ OMNode node = (OMNode) itr.next(); itr.remove(); newEnvelope.getHeader().addChild(node); }

}

Comment by Nuwan Pallewela [ 02/May/16 ]

This issue is fixed with following commit
https://github.com/wso2/wso2-synapse/pull/517/commits/8274faad3a2b05489f950f52ffb99439fa3e3873





[ESBJAVA-4578] enableMTOM property does not check in SynapseCallBackReceiver when Enabling MTOM Created: 28/Apr/16  Updated: 29/Apr/16  Resolved: 29/Apr/16

Status: Resolved
Project: WSO2 ESB
Component/s: None
Affects Version/s: 5.0.0 - Alpha
Fix Version/s: 5.0.0-Beta

Type: Patch Priority: Normal
Reporter: isuru ranawaka Assignee: Chanaka Fernando
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Estimated Complexity: Moderate
Test cases added: Yes

 Comments   
Comment by isuru ranawaka [ 29/Apr/16 ]

https://github.com/wso2/wso2-synapse/pull/516/commits/28c17be349580ddb1168520d71e55bb861ab89bf





Generated at Wed May 04 19:08:07 IST 2016 using JIRA 6.0.1#6096-sha1:e4a48bd73c6b8a4d99c824976ce5808b4c85857d.