开发者

what is the URL equivalent of an absolute path in non-windows system?

I am getting following exception while running BIRT from a Linux OS.

Caused by: org.eclipse.datatools.connectivity.oda.OdaException: no protocol: /home/lsingh/reporting/tmp/execution1279514184559/TDReport.xml

where "/home/lsingh/reporting/tmp/execution1279514184559/TDReport.xml" is my XML data file.

When i look开发者_运维问答ed into the code of "org.eclipse.birt.report.data.oda.xml.util.XMLDataInputStreamCreator" class in the BIRT, I saw that the exeception is coming from following piece of code.

catch (MalformedURLException e)
{
  throw new OdaException(e.getLocalizedMessage());
}

It means the code is trying to convert file path specified above into a URL and it fails.

So my question is how a non-windows path is converted into a URL? should it be prefixed with file:/// ?


Windows or not, all URLs to local files start with file://. That's the protocol prefix.

So your file would be:

file:// + /home/lsingh/reporting/tmp/execution1279514184559/TDReport.xml = file:///home/lsingh/reporting/tmp/execution1279514184559/TDReport.xml


You can try using the file URL:

file:///home/lsingh/reporting/tmp/execution1279514184559/TDReport.xml

If you can post the code than invokes BIRT, it will be easier to analyse the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜