Alexander Suraphel
Alexander Suraphel

Reputation: 10623

BIRT: XML data source cannot be retrieved. XML data source file is invalid or the file doesn't exist

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>

Upvotes: 3

Views: 1501

Answers (2)

Abhijit Gaikwad
Abhijit Gaikwad

Reputation: 3162

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>

Upvotes: 2

dsharew
dsharew

Reputation: 10675

enter image description here This happened to me when I click this^ next.

As you can see it is saying Use the XML file defined in datasource
but on your datasource you are providing it a url so the solution:
Use XML file on your data source till you finish your report design.

Then once you are done with your design point your data source to your url.

OR
Your url needs authentication and the security filter is redirecting you to login page when trying to access the url.
So you may need to:
skip authenticating the url or somehow authenicate the report engine request.

Upvotes: 1

Related Questions