0

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?

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 "sftp://User:***@sftp.dns.com:22250/Test/".
        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 "sftp://User:***@sftp.dns.com:22250/Test/".
        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
Community
  • 1
  • 1
Jefledge
  • 39
  • 9
  • Apache VFS does not like something in your URI. You can try to start the java WSO2 process in debug mode (https://wso2.com/library/225/). Clone apache commons vfs synapse project (https://github.com/wso2/wso2-commons-vfs) and using your favorite IDE, include a breakpoint here (https://github.com/wso2/wso2-commons-vfs/blob/2cf6926d28a482f34e6bb2ff94cdd5b9e87dac2a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java#L223). As this is the line from the logs. My EI is using commons-vfs2_2.2.0.wso2v9.jar (check your lib folder from the EI installation). – usuario Jun 25 '21 at 12:16
  • I think maybe its the password it doesn't like. I removed it from the URI and started getting a different error - Auth fail as expected. There are # ! ? and ^ characters within the actual password. Would I need to escape these by using \ before each one? – Jefledge Jun 25 '21 at 13:34

0 Answers0