[英]BIRT: XML data source cannot be retrieved. XML data source file is invalid or the file doesn't exist
我創建了一個從本地應用程序獲取 XML 數據的 XML 數據源。 創建數據集時出現以下錯誤。
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)
XML URL 返回以下數據:
<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>
我只能在一種情況下重現這一點,即開始標記前有空格。 因此,請確保沒有空格。
<?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>
當我單擊此^ next 時,這發生在我身上。
如您所見,它說Use the XML file defined in datasource
但是在您的數據源上,您為其提供了一個url
因此解決方案是:
對數據源使用 XML 文件,直到完成報表設計。
然后一旦你完成你的設計,將你的數據源指向你的url
。
要么
您的url
需要身份驗證,並且在嘗試訪問該 url 時,安全過濾器會將您重定向到登錄頁面。
所以你可能需要:
跳過對 url 的身份驗證或以某種方式對報告引擎請求進行身份驗證。
我在 Eclipse 2019-03 上使用 BIRT 4.7.0 也遇到了這個問題。
解決方法是不在數據源中提供 XML 架構 (XSD)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.