title: WSo2 EI Error: Port Number missing from URI
body: <p>I have created a file transfer application using Integration Studio for WSo2 EI, it is a bi-directional flow so I am sending and fetching to/from a server. I have done many of these in the past and they are quite simple however I stumbled upon the error below today when deplyoing the application. I dont undersand why I am getting this as the port number is clearly specified and as I mentioned I have done these in the past before and applications with exactly the same URL layout are working so I dont know what could be wrong. Does anyone have an idea of what might be happening?</p>
  <pre><code>INFO {org.apache.synapse.mediators.builtin.LogMediator} - mftError = Date: 2021-06-24 04:44:09 --- TrackingID: 471e401e-e432-4ac4-b23c-f49411ee297c --- TransferName : Transfer --- Error Code :
   0 --- Error Message : Error occured in the mediation of the class mediator --- Error Detail : org.apache.synapse.SynapseException: Error occured in the mediation of the class mediator
          at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:98)
          at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
          at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
          at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:133)
          at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
          at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
          at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
          at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
          at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
          at org.apache.synapse.mediators.eip.Target.mediateMessage(Target.java:255)
          at org.apache.synapse.mediators.eip.Target.mediate(Target.java:110)
          at org.apache.synapse.mediators.eip.splitter.IterateMediator.mediate(IterateMediator.java:260)
          at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
          at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
          at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
          at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectInbound(Axis2SynapseEnvironment.java:469)
          at org.wso2.carbon.inbound.endpoint.protocol.file.FileInjectHandler.invoke(FileInjectHandler.java:167)
          at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.processFile(FilePollingConsumer.java:746)
          at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.directoryHandler(FilePollingConsumer.java:524)
          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:47)
          at org.wso2.carbon.inbound.endpoint.common.InboundTask.execute(InboundTask.java:45)
          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:748)
  Caused by: org.apache.synapse.SynapseException: Unable to copy a file/folder
          at org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:367)
          at org.wso2.carbon.connector.FileCopy.copyFile(FileCopy.java:168)
          at org.wso2.carbon.connector.FileCopy.connect(FileCopy.java:59)
          at org.wso2.carbon.connector.core.AbstractConnector.mediate(AbstractConnector.java:32)
          at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:94)
          ... 30 more
  Caused by: org.apache.commons.vfs2.FileSystemException: Invalid absolute URI &quot;sftp://User:***@sftp.dns.com:22250/Test/&quot;.
          at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:77)
          at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:778)
          at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:658)
          at org.wso2.carbon.connector.FileCopy.copyFile(FileCopy.java:109)
          ... 33 more
  Caused by: org.apache.commons.vfs2.FileSystemException: Port number is missing from URI &quot;sftp://User:***@sftp.dns.com:22250/Test/&quot;.
          at org.apache.commons.vfs2.provider.HostFileNameParser.extractPort(HostFileNameParser.java:223)
          at org.apache.commons.vfs2.provider.HostFileNameParser.extractToPath(HostFileNameParser.java:135)
          at org.apache.commons.vfs2.provider.URLFileNameParser.parseUri(URLFileNameParser.java:45)
          at org.apache.commons.vfs2.provider.AbstractFileProvider.parseUri(AbstractFileProvider.java:179)
          at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:75)
          ... 36 more
  </code></pre>