Apache Commons VFS - 无法解析文件 [英] Apache Commons VFS - cannot resolveFile

查看:31
本文介绍了Apache Commons VFS - 无法解析文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VFS 方法无法处理在 jboss-beans.xml 中配置的这个 URI ${jboss.server.temp.dir}/local/outgoing 解析为 <代码>C:\下载\jboss-eap-5.1.1\server\default\tmp/local/outgoing" 来自 JBoss.当我尝试解析 URI 并获取文件时,它会引发异常.任何想法可能是什么问题?

The VFS method cannot process this URI ${jboss.server.temp.dir}/local/outgoing configured in jboss-beans.xml which is resolved to "C:\Download\jboss-eap-5.1.1\server\default\tmp/local/outgoing" by JBoss. When I try to resolve the URI and get the file, it throws an exception. Any ideas what could be the problem?

异常

17:35:25,024 ERROR [VfsSynchronizerConfImpl] File FromOutgoing cannot be resolved, FileSystemException:
org.apache.commons.vfs2.FileSystemException: Could not find file with URI "C:Downloadjboss-eap-5.1.1serverdefault	mp/local/outgoing" because it is a relative path, and no base URI was provided.
    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:719)
    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:649)
    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:605)

DefaultFileSystemManager.class 方法

public FileObject resolveFile(final String uri) throws FileSystemException
  -- this method calls the method below

public FileObject resolveFile(final FileObject baseFile, final String uri,
        final FileSystemOptions fileSystemOptions)
        throws FileSystemException
  -- this method cannot process the string and throws
     throw new FileSystemException("vfs.impl/find-rel-file.error", uri);

推荐答案

我认为它需要 file: scheme 因为错误说它被认为是相对的.

I think it needs the file: scheme because the error says it's asumed to be relative.

这篇关于Apache Commons VFS - 无法解析文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆