forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo" <leont...@tstt.net.tt>
Subject org.xml.sax.SAXParseException: Content is not allowed in prolog.
Date Wed, 03 Sep 2003 01:23:25 GMT
Hi folks

The Error:
org.xml.sax.SAXParseException: Content is not allowed in prolog.

Steps being performed:
I have a page store.xsp which attempts
to store a sample document(beet.xml) into the eXist database.

Storing documents works fine in eXist so I know it works
(this is done via xadmin.xsp)

I have copied the relevant code into my document store.xsp.
I know I am connecting to the database, because I have
a drop down list which is built from items in the database.

But I get the following error when attempting
to access the same code that works in eXist directly.
The following Code snippet from store.xsp generates the error.

<xmldb:collection>
	<xmldb:uri>collectionURI</xmldb:uri>
      <xmldb:user>user</xmldb:user>
      <xmldb:password>passwd</xmldb:password>
      <xmldb:store>
               <xmldb:name>fileName</xmldb:name>
               <xmldb:source>source</xmldb:source>
               <xmldb:overwrite>overwrite</xmldb:overwrite>
      </xmldb:store>
      <xmldb:error>
                <error>Error: <xmldb:get-error/></error>
      </xmldb:error>
</xmldb:collection>


I think the source of the problem is:

at
org.apache.cocoon.www.content.xdocs.test.store_xsp.generate(org.apache.cocoo
n.www.content.xdocs.test.store_xsp:997)
	at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:260



See extended stack trace below
2003-09-02 20:49:21,475 [Thread-31] DEBUG (Parser.java [scan]:662) -
validating document Beet.xml ...
2003-09-02 20:49:21,475 [Thread-31] DEBUG (Parser.java [fatalError]:366) -
fatal error at line 1
org.xml.sax.SAXParseException: Content is not allowed in prolog.
	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.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unkn
own Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.exist.Parser.scan(Parser.java:664)
	at org.exist.Parser.parse(Parser.java:483)
	at org.exist.xmldb.LocalCollection.storeResource(LocalCollection.java:421)
	at
org.apache.cocoon.www.content.xdocs.test.store2_xsp.generate(org.apache.coco
on.www.content.xdocs.test.store2_xsp:1115)
	at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:260)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
ipeline(AbstractProcessingPipeline.java:545)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:218)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:489)
	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:150)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)


Regards
Leo


Hi folks

I have been making progress in my quest to have eXist
working inside forrest.

I am able to simple things such as retreive xml documents
and listing of collections.

However when I attempt to add a document: Introduction.xml, which
validates and displays correctly in Forrest
to the database, I get the following error

2003-08-27 05:36:46,324 [main] DEBUG (BrokerPool.java [initialize]:262) -
database engine initialized.
2003-08-27 05:37:15,006 [PoolThread-4] DEBUG (NativeBroker.java
[getCollection]:577) - loading collection /db/recipes
2003-08-27 05:37:15,016 [PoolThread-4] DEBUG (NativeBroker.java
[getCollection]:577) - loading collection /db/shakespeare
2003-08-27 05:37:15,016 [PoolThread-4] DEBUG (NativeBroker.java
[getCollection]:577) - loading collection /db/shakespeare/plays
2003-08-27 05:37:15,136 [PoolThread-4] DEBUG (Parser.java [scan]:662) -
validating document Introduction.xml ...
2003-08-27 05:37:15,166 [PoolThread-4] DEBUG (Parser.java
[fatalError]:366) - fatal error at line 1
org.xml.sax.SAXParseException: Content is not allowed in prolog.
	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.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unkn
own Source)


Regards
Leo



Mime
View raw message