【发布时间】:2010-07-19 07:08:40
【问题描述】:
我在从 Linux 操作系统运行 BIRT 时遇到以下异常。
原因:org.eclipse.datatools.connectivity.oda.OdaException:无协议:/home/lsingh/reporting/tmp/execution1279514184559/TDReport.xml
“/home/lsingh/reporting/tmp/execution1279514184559/TDReport.xml”是我的 XML 数据文件。
当我查看 BIRT 中“org.eclipse.birt.report.data.oda.xml.util.XMLDataInputStreamCreator”类的代码时,我看到异常来自以下代码。
catch (MalformedURLException e)
{
throw new OdaException(e.getLocalizedMessage());
}
这意味着代码试图将上面指定的文件路径转换为 URL 并且它失败了。
所以我的问题是如何将非 Windows 路径转换为 URL? 是否应该以 file:/// 为前缀?
【问题讨论】: