You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Vijayaratha Vijayasingam (Created) (JIRA)" <ji...@apache.org> on 2012/02/29 10:57:58 UTC

[jira] [Created] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
---------------------------------------------------------------------------------------

                 Key: SYNAPSE-847
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
             Project: Synapse
          Issue Type: Bug
          Components: Transports
            Reporter: Vijayaratha Vijayasingam
            Priority: Blocker
             Fix For: FUTURE


When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]


The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
Attached the patch with this workaround..
Please review and commit


[1]
2012-02-15 14:34:53,066 [-] [vfs-Worker-2] ERROR VFSTransportListener Error closing stream
org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://sonat\eman:***@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true".
       at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
       at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
       at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
       at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
       at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
       at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
       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)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://sonat\eman:***@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true".
       at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
       at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
       at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
       at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
       at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
       ... 9 more
2012-02-15 14:34:53,067 [-] [vfs-Worker-2] ERROR VFSTransportListener Error processing File URI : ftp://sonat\eman:Someniller.,.,@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true
org.apache.axis2.AxisFault: Error closing stream
       at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
       at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
       at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
       at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
       at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
       at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
       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) 

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Issue Comment Edited] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

Posted by "Vijayaratha Vijayasingam (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227430#comment-13227430 ] 

Vijayaratha Vijayasingam edited comment on SYNAPSE-847 at 3/12/12 11:06 AM:
----------------------------------------------------------------------------

Thanks sadeep for the input..I have updated the patch...
We can use the AutoCloseInputstream implementation, which is available in commons.io library to close all the input streams...Anyway at transport listener, we need to close the file object..
Where, commons-vfs lib tries to close inputstream and detach the file..So, there is a warning comes to synapse end when vfs lib tries to close the stream..

Since we handover the inputstream closing job to another process at synapse end , I think we can avoid this warning coming from commons-vfs library..

                
      was (Author: ratha):
    Thanks sadeep for the input..I have updated the patch...
We can use the AutoCloseInputstream implementation, which is available in commons.io library to close all the input streams...Anyway In transport listener, we need to close the file object..
Where, commons-vfs lib tries to close inputstream and detach the file..So, there is a warning comes to synapse end when vfs lib tries to close the stream..

Since we handover the inputstream closing job to another process at synapse end , I think we can avoid this warning coming from commons-vfs library..

                  
> VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
> ---------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-847
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Vijayaratha Vijayasingam
>            Assignee: Udayanga Wickramasinghe
>            Priority: Blocker
>             Fix For: FUTURE
>
>         Attachments: vfsTransport.patch
>
>
> When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]
> The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
> Attached the patch with this workaround..
> Please review and commit
> [1]
> r the specified or optional timeout
> [2012-02-29 15:39:19,321] ERROR - VFSTransportListener Error closing stream
> org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
>         at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
>         ... 9 more
> [2012-02-29 15:39:19,324] ERROR - VFSTransportListener Error processing File URI : ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true
> org.apache.axis2.AxisFault: Error closing stream
>         at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passi
> ve=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         ... 8 more
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Updated] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

Posted by "Vijayaratha Vijayasingam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vijayaratha Vijayasingam updated SYNAPSE-847:
---------------------------------------------

    Attachment: vfsTransport.patch

Attaching updated one
                
> VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
> ---------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-847
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Vijayaratha Vijayasingam
>            Assignee: Udayanga Wickramasinghe
>            Priority: Blocker
>             Fix For: FUTURE
>
>         Attachments: vfsTransport.patch
>
>
> When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]
> The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
> Attached the patch with this workaround..
> Please review and commit
> [1]
> r the specified or optional timeout
> [2012-02-29 15:39:19,321] ERROR - VFSTransportListener Error closing stream
> org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
>         at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
>         ... 9 more
> [2012-02-29 15:39:19,324] ERROR - VFSTransportListener Error processing File URI : ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true
> org.apache.axis2.AxisFault: Error closing stream
>         at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passi
> ve=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         ... 8 more
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Updated] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

Posted by "Vijayaratha Vijayasingam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vijayaratha Vijayasingam updated SYNAPSE-847:
---------------------------------------------

    Attachment:     (was: vfsListenerPatch.patch)
    
> VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
> ---------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-847
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Vijayaratha Vijayasingam
>            Assignee: Udayanga Wickramasinghe
>            Priority: Blocker
>             Fix For: FUTURE
>
>         Attachments: vfsTransport.patch
>
>
> When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]
> The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
> Attached the patch with this workaround..
> Please review and commit
> [1]
> r the specified or optional timeout
> [2012-02-29 15:39:19,321] ERROR - VFSTransportListener Error closing stream
> org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
>         at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
>         ... 9 more
> [2012-02-29 15:39:19,324] ERROR - VFSTransportListener Error processing File URI : ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true
> org.apache.axis2.AxisFault: Error closing stream
>         at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passi
> ve=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         ... 8 more
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Assigned] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

Posted by "Udayanga Wickramasinghe (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Udayanga Wickramasinghe reassigned SYNAPSE-847:
-----------------------------------------------

    Assignee: Udayanga Wickramasinghe
    
> VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
> ---------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-847
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Vijayaratha Vijayasingam
>            Assignee: Udayanga Wickramasinghe
>            Priority: Blocker
>             Fix For: FUTURE
>
>         Attachments: vfsListenerPatch.patch
>
>
> When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]
> The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
> Attached the patch with this workaround..
> Please review and commit
> [1]
> r the specified or optional timeout
> [2012-02-29 15:39:19,321] ERROR - VFSTransportListener Error closing stream
> org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
>         at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
>         ... 9 more
> [2012-02-29 15:39:19,324] ERROR - VFSTransportListener Error processing File URI : ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true
> org.apache.axis2.AxisFault: Error closing stream
>         at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passi
> ve=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         ... 8 more
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Commented] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

Posted by "Sadeep Jayasumana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222213#comment-13222213 ] 

Sadeep Jayasumana commented on SYNAPSE-847:
-------------------------------------------

Hi,

This issue has been around for long time (see [1]). It's good to see that the root cause of the issue has been found.

However, I'm not quite sure whether the attached patch should be checked in. With this patch, each message is forced to build within the memory, defeating the streaming nature of Syanpse. With this patch VFS transport can drive Synpase out of memory, if large files are picked and/or a large number of files are picked concurrently.

There should be another method to prevent the transport listener from closing the stream before it's completely read. Maybe we can wrap the input stream we get from Commons VFS to add auto closing functionality (IIRC a similar concept is implemented in Axis2 Servlet Transport). 

[1] http://markmail.org/message/zphmtx3bi7mzbwzq

Thanks,
Sadeep
                
> VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
> ---------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-847
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Vijayaratha Vijayasingam
>            Assignee: Udayanga Wickramasinghe
>            Priority: Blocker
>             Fix For: FUTURE
>
>         Attachments: vfsListenerPatch.patch
>
>
> When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]
> The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
> Attached the patch with this workaround..
> Please review and commit
> [1]
> r the specified or optional timeout
> [2012-02-29 15:39:19,321] ERROR - VFSTransportListener Error closing stream
> org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
>         at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
>         ... 9 more
> [2012-02-29 15:39:19,324] ERROR - VFSTransportListener Error processing File URI : ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true
> org.apache.axis2.AxisFault: Error closing stream
>         at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passi
> ve=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         ... 8 more
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Commented] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

Posted by "Vijayaratha Vijayasingam (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219055#comment-13219055 ] 

Vijayaratha Vijayasingam commented on SYNAPSE-847:
--------------------------------------------------

Sample proxy;
<proxy name="StockQuoteProxy" transports="vfs" startOnLoad="true" trace="disable">
        <target faultSequence="fault">
            <inSequence>
                <property name="OUT_ONLY" value="true"/>
                <send>
                    <endpoint>
                        <address uri="vfs:file:C:\Users\TOSHIBA\Desktop\out1"/>
                    </endpoint>
                </send>
            </inSequence>
        </target>
        <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
        <parameter name="transport.PollInterval">15</parameter>
        <parameter name="transport.vfs.MoveAfterProcess">file:C:\Users\TOSHIBA\Desktop\original</parameter>
        <parameter name="transport.vfs.FileURI">vfs:ftp://anonymous@localhost/in?vfs.passive=true</parameter>
        <parameter name="transport.vfs.MoveAfterFailure">file:C:\Users\TOSHIBA\Desktop\error</parameter>
        <parameter name="transport.vfs.FileNamePattern">.*</parameter>
        <parameter name="transport.vfs.ContentType">text/plain</parameter>
        <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
        <parameter name="serviceType">proxy</parameter>
    </proxy>
                
> VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
> ---------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-847
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Vijayaratha Vijayasingam
>            Priority: Blocker
>             Fix For: FUTURE
>
>         Attachments: vfsListenerPatch.patch
>
>
> When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]
> The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
> Attached the patch with this workaround..
> Please review and commit
> [1]
> 2012-02-15 14:34:53,066 [-] [vfs-Worker-2] ERROR VFSTransportListener Error closing stream
> org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://sonat\eman:***@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true".
>        at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>        at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>        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)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://sonat\eman:***@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true".
>        at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
>        at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
>        at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
>        at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
>        at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
>        ... 9 more
> 2012-02-15 14:34:53,067 [-] [vfs-Worker-2] ERROR VFSTransportListener Error processing File URI : ftp://sonat\eman:Someniller.,.,@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true
> org.apache.axis2.AxisFault: Error closing stream
>        at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>        at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>        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) 

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Updated] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

Posted by "Vijayaratha Vijayasingam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vijayaratha Vijayasingam updated SYNAPSE-847:
---------------------------------------------

    Attachment: vfsListenerPatch.patch
    
> VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
> ---------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-847
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Vijayaratha Vijayasingam
>            Priority: Blocker
>             Fix For: FUTURE
>
>         Attachments: vfsListenerPatch.patch
>
>
> When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]
> The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
> Attached the patch with this workaround..
> Please review and commit
> [1]
> 2012-02-15 14:34:53,066 [-] [vfs-Worker-2] ERROR VFSTransportListener Error closing stream
> org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://sonat\eman:***@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true".
>        at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>        at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>        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)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://sonat\eman:***@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true".
>        at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
>        at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
>        at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
>        at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
>        at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
>        ... 9 more
> 2012-02-15 14:34:53,067 [-] [vfs-Worker-2] ERROR VFSTransportListener Error processing File URI : ftp://sonat\eman:Someniller.,.,@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true
> org.apache.axis2.AxisFault: Error closing stream
>        at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>        at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>        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) 

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Updated] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

Posted by "Vijayaratha Vijayasingam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vijayaratha Vijayasingam updated SYNAPSE-847:
---------------------------------------------

    Description: 
When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]


The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
Attached the patch with this workaround..
Please review and commit


[1]
r the specified or optional timeout
[2012-02-29 15:39:19,321] ERROR - VFSTransportListener Error closing stream
org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
        at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
        at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
        at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
        at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
        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:619)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
        at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
        at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
        at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
        at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
        at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
        ... 9 more
[2012-02-29 15:39:19,324] ERROR - VFSTransportListener Error processing File URI : ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true
org.apache.axis2.AxisFault: Error closing stream
        at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
        at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
        at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
        at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
        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:619)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passi
ve=true".
        at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
        at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
        ... 8 more
Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
        at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)

  was:
When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]


The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
Attached the patch with this workaround..
Please review and commit


[1]
2012-02-15 14:34:53,066 [-] [vfs-Worker-2] ERROR VFSTransportListener Error closing stream
org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://sonat\eman:***@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true".
       at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
       at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
       at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
       at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
       at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
       at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
       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)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://sonat\eman:***@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true".
       at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
       at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
       at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
       at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
       at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
       ... 9 more
2012-02-15 14:34:53,067 [-] [vfs-Worker-2] ERROR VFSTransportListener Error processing File URI : ftp://sonat\eman:Someniller.,.,@ftp.sonat.se/IPS/Shp_110201_050048.txt?vfs.passive=true
org.apache.axis2.AxisFault: Error closing stream
       at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
       at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
       at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
       at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
       at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
       at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
       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) 

    
> VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
> ---------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-847
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Vijayaratha Vijayasingam
>            Priority: Blocker
>             Fix For: FUTURE
>
>         Attachments: vfsListenerPatch.patch
>
>
> When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]
> The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
> Attached the patch with this workaround..
> Please review and commit
> [1]
> r the specified or optional timeout
> [2012-02-29 15:39:19,321] ERROR - VFSTransportListener Error closing stream
> org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
>         at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
>         ... 9 more
> [2012-02-29 15:39:19,324] ERROR - VFSTransportListener Error processing File URI : ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true
> org.apache.axis2.AxisFault: Error closing stream
>         at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passi
> ve=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         ... 8 more
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Commented] (SYNAPSE-847) VFS transport throws exception, when try to pull large (>150kb) file from FTP location

Posted by "Vijayaratha Vijayasingam (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227430#comment-13227430 ] 

Vijayaratha Vijayasingam commented on SYNAPSE-847:
--------------------------------------------------

Thanks sadeep for the input..I have updated the patch...
We can use the AutoCloseInputstream implementation, which is available in commons.io library to close all the input streams...Anyway In transport listener, we need to close the file object..
Where, commons-vfs lib tries to close inputstream and detach the file..So, there is a warning comes to synapse end when vfs lib tries to close the stream..

Since we handover the inputstream closing job to another process at synapse end , I think we can avoid this warning coming from commons-vfs library..

                
> VFS transport throws exception, when try to pull large (>150kb) file from FTP location 
> ---------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-847
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-847
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Vijayaratha Vijayasingam
>            Assignee: Udayanga Wickramasinghe
>            Priority: Blocker
>             Fix For: FUTURE
>
>         Attachments: vfsTransport.patch
>
>
> When try to pull larger file from an ftp location , i face the following issue[1]..I used following proxy configuration[2]
> The  issue is here,  vfs transport listener closes the stream before the vfs transport sender reads it.. As a workaround, i added a Stringbuffer @ listener with a limited buffer size to read the soap envelope..
> Attached the patch with this workaround..
> Please review and commit
> [1]
> r the specified or optional timeout
> [2012-02-29 15:39:19,321] ERROR - VFSTransportListener Error closing stream
> org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:140)
>         at java.io.BufferedInputStream.close(BufferedInputStream.java:451)
>         at org.apache.commons.vfs2.util.MonitorInputStream.close(MonitorInputStream.java:130)
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:608)
>         ... 9 more
> [2012-02-29 15:39:19,324] ERROR - VFSTransportListener Error processing File URI : ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true
> org.apache.axis2.AxisFault: Error closing stream
>         at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:568)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:306)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:157)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:106)
>         at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>         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:619)
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the input stream for file "ftp://anonymous@localhost/in/textfile.txt?vfs.passi
> ve=true".
>         at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:612)
>         at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:566)
>         ... 8 more
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not get FTP file "ftp://anonymous@localhost/in/textfile.txt?vfs.passive=true".
>         at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:731)

--
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org