cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Pirotsky <g...@mercury.co.il>
Subject RE: writing a producer
Date Sun, 28 May 2000 13:52:26 GMT
check your XML file
line :<?xml version="1.0" encoding="UTF-8"?>
must be at the begining
of the file

> -----Original Message-----
> From: Sebastian Hauer [mailto:hauer@uni-freiburg.de]
> Sent: Sunday, May 28, 2000 2:48 PM
> To: cocoon-dev@xml.apache.org
> Subject: writing a producer
> 
> 
> 
> Hi,
> 
> I was trying to write a producer to handle CGI requests with 
> XML output.
> But already in the begining I go a realy weird error from 
> cocoon trying
> to call my producer.
> 
> Always as I restarted apache and tried it out it would work perfectly.
> But as I would try it out again hiting the reload button of my browser
> cocoon would give me this error message:
> 
> ------------------------------------------------------------------
>       The XML declaration may only appear at the very beginning of the
> document. [FATAL ERROR] [File: "file:/whatever.xml" Line: 22 
> Column: 7]
>               at
> org.apache.cocoon.parser.AbstractParser.fatalError(AbstractPar
> ser.java:105)
>               at
> org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1279)
>               at
> org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLE
> rror(XMLDocumentScanner.java:616)
>               at
> org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XML
> DocumentScanner.java:670)
>               at
> org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDis
> patcher.dispatch(XMLDocumentScanner.java:1469)
>               at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDo
> cumentScanner.java:381)
>               at
> org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1138)
>               at
> org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:82)
>               at
> org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83)
>               at xml.cgi.CgiProducer.getDocument(CgiProducer.java:28)
> .
> .
> --------------------------------------------------------------------
> 
> I don't know what is wrong with my producer it is so simple 
> and as said
> before after a restart of apache it will handle "one" request.
> 
> This is how I call it:
> http://localhost/whatever.xml?producer=cgi
> 
> The xml page I'm requesting is not excisting it is just to 
> get the page
> handled my cocoon. The real URL pointing to my CGI script is hardcoded
> right now to keep it simple.
> 
> I'm using cocoon 1.7.0 .
> I have attached my producer code with this message, it is realy short.
> I hope someone can give an advice what I'm doing wrong with this.
> 
> Thanks a lot in advance,
> 	
> 	Sebastian
> 
> 
> 

Mime
View raw message