BIRT:无法检索XML数据源。 XML数据源文件无效或文件不存在 [英] BIRT: XML data source cannot be retrieved. XML data source file is invalid or the file doesn't exist

查看:194
本文介绍了BIRT:无法检索XML数据源。 XML数据源文件无效或文件不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个从本地应用程序获取XML数据的XML数据源。当创建数据集时,我收到以下错误。

  org.eclipse.datatools.connectivity.oda.OdaException:XML数据源无法检索。 XML数据源文件无效或文件不存在。 
在org.eclipse.datatools.enablement.oda.xml.ui.wizards.XPathChoosePage.populateXMLTree(XPathChoosePage.java:482)
在org.eclipse.datatools.enablement.oda.xml.ui。 wizards.XPathChoosePage.createPageCustomControl(XPathChoosePage.java:121)
在org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage.createControl(DataSetWizardPage.java:123)
在org。 eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:174)
在org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
在org.eclipse.jface。 wizard.WizardDialog.setWizard(WizardDialog.java:1182)
在org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1241)
在org.eclipse.jface.wizard.WizardDialog。访问$ 4(WizardDialog.java:1238)
在org.eclipse.jface.wizard.WizardDialog $ 8.run(WizardDialog.java:1227)
在org.eclipse.swt.custom.BusyIndi​​cator.showWhile( BusyIndi​​cator.java:70)
在org.eclipse.jface。 wizard.WizardDialog.showPage(WizardDialog.java:1225)
在org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:915)
在org.eclipse.jface.wizard.WizardDialog。 buttonPressed(WizardDialog.java:428)

XML URL重新调用以下数据:

 < table> 
< row>
< marketName> dd< / marketName>
< goodsName>黑色大麦< / goodsName>
< priceType>批发< / priceType>
< pricePerQtl> 58.0< / pricePerQtl>
< date> 2014-07-03 15:18:21< / date>
< / row>
< / table>


解决方案

我只能在一个场景中再现开始前有空格标签。所以确保没有空格。

 <?xml version =1.0encoding =UTF-8? > 
< table>
< row>
< marketName> dd< / marketName>
< goodsName>黑色大麦< / goodsName>
< priceType>批发< / priceType>
< pricePerQtl> 58.0< / pricePerQtl>
< date> 2014-07-03 15:18:21< / date>
< / row>
< / table>


I created an XML data source that fetches XML data from a local application. when creating a data set I get the following error.

org.eclipse.datatools.connectivity.oda.OdaException: XML data source cannot be retrieved. XML data source file is invalid or the file doesn't exist.
    at org.eclipse.datatools.enablement.oda.xml.ui.wizards.XPathChoosePage.populateXMLTree(XPathChoosePage.java:482)
    at org.eclipse.datatools.enablement.oda.xml.ui.wizards.XPathChoosePage.createPageCustomControl(XPathChoosePage.java:121)
    at org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage.createControl(DataSetWizardPage.java:123)
    at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:174)
    at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
    at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1182)
    at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1241)
    at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1238)
    at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1227)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1225)
    at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:915)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:428)

The XML URL retuns the following data:

<table>
  <row>
    <marketName>dd</marketName>
    <commodityName>Black Barley</commodityName>
    <priceType>Wholesale</priceType>
    <pricePerQtl>58.0</pricePerQtl>
    <date>2014-07-03 15:18:21</date>
  </row>
</table>

解决方案

I can only reproduce this in only in one scenario i.e there is whitespace before start tag. So make sure that there are no whitespaces.

<?xml version="1.0" encoding="UTF-8"?>
<table>
  <row>
    <marketName>dd</marketName>
    <commodityName>Black Barley</commodityName>
    <priceType>Wholesale</priceType>
    <pricePerQtl>58.0</pricePerQtl>
    <date>2014-07-03 15:18:21</date>
  </row>
</table>

这篇关于BIRT:无法检索XML数据源。 XML数据源文件无效或文件不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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