小编Dar*_*ara的帖子

文件上传到SFTP失败(Apache VFS)

我有一个SFTP(Windows与WinSSHD)的问题.我尝试用Apache Commons VFS在一个文件夹中写一个文件.在本地SFTP上我没有上传的问题但在第二个SFTP上我总是得到以下错误.

FTP看起来像这样: 在此输入图像描述

我需要上传到文件夹"alis".奇怪的是它没有User/Group和770权限.但是,使用FileZilla文件上传工作正常(使用相同的登录).

在文件夹"alis"上执行"manager.resolveFile()"(我尝试上传到此文件夹)并打印".getType()"我获取信息"文件"而不是预期的"文件夹".

有没有人知道为什么VFS会将文件夹识别为文件或为什么上传不起作用?

将文件上载到SFTP时的例外情况:

Exception in thread "main" java.lang.RuntimeException: org.apache.commons.vfs2.FileSystemException: Could not copy "file:///D:/Test/test.txt" to "sftp://user:***@host/.../alis/test.txt".
    at test.Test.upload(Test.java:77)
    at test.Test.main(Test.java:22)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not copy "file:///D:/Test/test.txt" to "sftp://user:***@host/.../alis/test.txt".
    at org.apache.commons.vfs2.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:1062)
    at test.Test.upload(Test.java:73)
    ... 1 more
Caused by: org.apache.commons.vfs2.FileSystemException: Could not create folder "sftp://user:***@host/.../alis" because it already exists and is a file.
    at org.apache.commons.vfs2.provider.AbstractFileObject.createFolder(AbstractFileObject.java:968)
    at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1424)
    at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:461)
    at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:441)
    at org.apache.commons.vfs2.FileUtil.copyContent(FileUtil.java:111)
    at org.apache.commons.vfs2.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:1053)
    ... 2 more
Run Code Online (Sandbox Code Playgroud)

源代码:(运行示例,您需要"jsch-0.1.50.jar")

import java.io.File;
import org.apache.commons.vfs2.FileObject; …
Run Code Online (Sandbox Code Playgroud)

java sftp vfs apache-commons-vfs

7
推荐指数
1
解决办法
2万
查看次数

WSO2业务流程bpel,带有"if"组件的gui错误

我目前正在使用Eclipse Developer Studio中的wso2 Bu​​siness Process Server处理一个简单的业务流程.我创建了一个带有"if"条件的小bpel过程.我让它在服务器上工作没有问题.但是,我必须在源代码中创建"if"条件,我无法按照gui配置if组件.当我点击"if"组件的"Details"选项卡时,我总是收到以下错误:

An error has occurred. See error log for more details.
org.eclipse.ui.internal.EditorReference.<init>(Lorg/eclipse/ui/internal/EditorManager;Lorg/eclipse/ui/IEditorInput;Lorg/eclipse/ui/internal/registry/EditorDescriptor;)V
Run Code Online (Sandbox Code Playgroud)

有谁知道如何避免这个错误?为演示配置每个GUI的"if"条件会很棒...

我使用的是Developer Studio 3.2.0

这是我的bpel源代码:

<!-- Befunde BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Mon Mar 05 12:13:11 IST 2012 -->
<bpel:process name="Befunde"
         targetNamespace="http://avintis.com/befunde"
         suppressJoinFailure="yes"
         xmlns:tns="http://avintis.com/befunde"
         xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
         xmlns:ns1="urn:hl7-org:v2xml" 
         xmlns:hl7="http://wso2.org/hl7" 
         xmlns:ns="http://ws.apache.org/axis2">

    <!-- Import the client WSDL -->
    <bpel:import location="BefundeArtifacts.wsdl" namespace="http://avintis.com/befunde" importType="http://schemas.xmlsoap.org/wsdl/" />

    <!-- ================================================================= -->         
    <!-- PARTNERLINKS                                                      -->
    <!-- List of services participating in this BPEL process               -->
    <!-- ================================================================= …
Run Code Online (Sandbox Code Playgroud)

eclipse wso2 bpel

5
推荐指数
1
解决办法
589
查看次数

标签 统计

apache-commons-vfs ×1

bpel ×1

eclipse ×1

java ×1

sftp ×1

vfs ×1

wso2 ×1