cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Hauer <ha...@uni-freiburg.de>
Subject writing a producer
Date Sun, 28 May 2000 12:47:59 GMT

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(AbstractParser.java:105)
              at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1279)
              at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:616)
              at
org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanner.java:670)
              at
org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispatch(XMLDocumentScanner.java:1469)
              at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.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