我创建了一个 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>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)