Arek Kasprzyk wrote:
> 
> On 18 Jan 2007, at 15:19, sneumann wrote:
> 
>> Hi,
>>
>> Biomart as of CVS-today (and already in nov 2006)
>> is causing taverna-1.5 to throw an exception when accessing my
>> own local installation of biomart,
>> even though the "production" www.biomart.org works fine.
>>
>> org.biomart.martservice.MartServiceException: Error getting
>> configuration from http://lathan.ipb-sub.ipb-halle.de/biomart/martservice
>>         at
>> org.biomart.martservice.MartServiceUtils.getDatasetConfig(MartServiceUtils.java:269)
>>
>>         at
>> org.biomart.martservice.MartService.getDatasetConfigFromCache(MartService.java:350)
>>
>>         at
>> org.biomart.martservice.MartService.getDatasetConfig(MartService.java:305)
>>
>>         at
>> org.biomart.martservice.config.ui.MartServiceQueryConfigUIFactory05.getDatasetConfig(MartServiceQueryConfigUIFactory05.java:177)
>>
>>         at
>> org.biomart.martservice.config.ui.MartServiceQueryConfigUIFactory05$1.run(MartServiceQueryConfigUIFactory05.java:228)
>>
>> Caused by: org.ensembl.mart.lib.config.ConfigurationException:
>> org.jdom.input.JDOMParseException: Error on line 2: The processing
>> instruction target matching "[xX][mM][lL]" is not allowed.
>>         at
>> org.ensembl.mart.lib.config.DatasetConfigXMLUtils.getDocumentForXMLStream(DatasetConfigXMLUtils.java:162)
>>
>>         at
>> org.biomart.martservice.MartServiceUtils.getDatasetConfig(MartServiceUtils.java:260)
>>
>>         ... 4 more
>> Caused by: org.jdom.input.JDOMParseException: Error on line 2: The
>> processing instruction target matching "[xX][mM][lL]" is not allowed. 
>>       at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468)
>>         at
>> org.ensembl.mart.lib.config.DatasetConfigXMLUtils.getDocumentForXMLStream(DatasetConfigXMLUtils.java:158)
>>
>>         ... 5 more
>> Caused by: org.xml.sax.SAXParseException: The processing instruction
>> target matching "[xX][mM][lL]" is not allowed.
>>         at
>> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
>> Source)
>>         at
>> org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
>>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>>         at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
>> Source)
>>         at org.apache.xerces.impl.XMLScanner.scanPIData(Unknown Source)
>>         at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknown
>> Source)
>>         at org.apache.xerces.impl.XMLScanner.scanPI(Unknown Source)
>>         at
>> org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown
>> Source)
>>         at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>>         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>>         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>>         at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
>>         ... 6 more
>>
>> It turns out that the returned XML had an empty first line, cuasing
>> the error:
>>     ___________________--
>>     <?xml version="1.0" encoding="UTF-8"?>
>>     <!DOCTYPE DatasetConfig>
>>     <DatasetConfig dataset="xcms" datasetID="2"
>>
>> The following patch fixes that. It might be worthwile
>> to do something like grep 'print "\n.*xml'
>> to find other instances of this problem lurking in the code.
>>
>> Yours,
>> Steffen
>>
>> Index: martservice.PLS
>> ===================================================================
>> RCS file: /cvsroot/CVSmaster/biomart-web/cgi-bin/martservice.PLS,v
>> retrieving revision 1.18
>> diff -r1.18 martservice.PLS
>> 389c389
>> <       print  "\n$xmlTree\n";
>> ---
>>>       print  "$xmlTree\n";
>>
> 
> Hi Steffen,
> as I suspected I had already fixed this problem a while back. I just
> double checked
> with the latest branch and the head code:
> 
> bigmac: ~/temp[arek] grep "\$xmlTree"  biomart-perl/cgi-bin/martservice.PLS
>     my $xmlTree;
>     $xmlTree = $dset->getConfigurationTree($interface)->toXML() if ($dset);
>     if ($xmlTree){
>         print  "$xmlTree\n";
> bigmac: ~/temp[arek] grep "\$xmlTree" 
> biomart-perl-branch/cgi-bin/martservice.PLS
>     my $xmlTree;
>     $xmlTree = $dset->getConfigurationTree($interface)->toXML() if ($dset);
>     if ($xmlTree){
>         print  "$xmlTree\n";
> 
> so the only explanation for your problem is that your biomart-plib is
> not up to date
> 
> a.
> 
> PS. Cc'ing this mail to mart-dev so David Withers can confirm that this
> should no longer
> cause any problems with taverna 1.5

The dataset configuration stream returned by the martservice is handled
by the MartJ method DatasetConfigXMLUtils.getDocumentForXMLStream().
Blank lines at the begining of the stream will cause the
JDOMParseException seen above.

While we're on the subject of blank lines, I noticed today that when I
send a query that has count="1" the result starts with a blank line.

David.
-- 
David Withers
School of Computer Science, University of Manchester,
Oxford Road, Manchester, M13 9PL, UK.
Tel: +44(0)161 275 0145

Reply via email to