Apache Commons VFS-无法解析文件 [英] Apache Commons VFS - cannot resolveFile
本文介绍了Apache Commons VFS-无法解析文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
VFS方法无法处理在jboss-beans.xml
中配置的URI ${jboss.server.temp.dir}/local/outgoing
,该URI已被JBoss解析为"C:\\Download\\jboss-eap-5.1.1\\server\\default\\tmp/local/outgoing"
.当我尝试解析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?
Exception
17:35:25,024 ERROR [VfsSynchronizerConfImpl] File FromOutgoing cannot be resolved, FileSystemException:
org.apache.commons.vfs2.FileSystemException: Could not find file with URI "C:\Download\jboss-eap-5.1.1\server\default\tmp/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 methods
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:方案,因为错误表明它是相对的.
I think it needs the file: scheme because the error says it's asumed to be relative.
这篇关于Apache Commons VFS-无法解析文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文