Hi,
I want to get a list of collection in exist db. So, i used the following (which is taken from eXist forum) for $child in xdb:get-child-collections('/db') order by $child return <child> $child </child> when i ran the above xquery in sandbox-exist sample (Orbeon Forms dev-post-3.7.1.200906160530 ) i got the following exception. ERROR XFormsServer - XForms - submission - error while reading response body org.orbeon.oxf.common.OXFException: Stream closed at org.orbeon.oxf.util.NetUtils.prepareFileItemFromInputStream(NetUtils.java:752) at org.orbeon.oxf.util.NetUtils.inputStreamToAnyURI(NetUtils.java:736) at org.orbeon.oxf.xforms.event.events.XFormsSubmitErrorEvent.<init>(XFormsSubmitErrorEvent.java:74) at org.orbeon.oxf.xforms.XFormsModelSubmission.createErrorEvent(XFormsModelSubmission.java:1402) at org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:908) at org.orbeon.oxf.xforms.xbl.XBLContainer.dispatchEvent(XBLContainer.java:897) at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:999) at org.orbeon.oxf.xforms.action.actions.XFormsSendAction.execute(XFormsSendAction.java:61) at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runSingleIteration(XFormsActionInterpreter.java:286) at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runAction(XFormsActionInterpreter.java:246) at org.orbeon.oxf.xforms.action.actions.XFormsActionAction.execute(XFormsActionAction.java:62) at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runSingleIteration(XFormsActionInterpreter.java:286) at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runAction(XFormsActionInterpreter.java:246) at org.orbeon.oxf.xforms.event.XFormsEventHandlerImpl.handleEvent(XFormsEventHandlerImpl.java:153) at org.orbeon.oxf.xforms.xbl.XBLContainer.dispatchEvent(XBLContainer.java:878) at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:999) at org.orbeon.oxf.xforms.XFormsContainingDocument.executeExternalEvent(XFormsContainingDocument.java:983) at org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:399) at org.orbeon.oxf.xforms.processor.XFormsServer.access$000(XFormsServer.java:55) at org.orbeon.oxf.xforms.processor.XFormsServer$1.readImpl(XFormsServer.java:81) at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995) at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350) at org.orbeon.oxf.processor.pipeline.TeeProcessor.access$000(TeeProcessor.java:36) at org.orbeon.oxf.processor.pipeline.TeeProcessor$1.readImpl(TeeProcessor.java:59) at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995) at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsTinyTree(ProcessorImpl.java:377) at org.orbeon.oxf.processor.ProcessorImpl$4.read(ProcessorImpl.java:410) at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:453) at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsTinyTree(ProcessorImpl.java:408) at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:189) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:644) at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:519) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:641) at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:242) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:644) at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:519) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:641) at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:92) at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96) at org.orbeon.oxf.servlet.OrbeonServletDelegate.service(OrbeonServletDelegate.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) 2009-07-02 10:09:51,421 ERROR XFormsServer - XForms - submission - xforms-submit-error throwable: org.xml.sax.SAXParseException: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:899) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at org.orbeon.saxon.event.Sender.sendSAXSource(Sender.java:269) at org.orbeon.saxon.event.Sender.send(Sender.java:144) at org.orbeon.saxon.IdentityTransformer.transform(IdentityTransformer.java:29) at org.orbeon.oxf.xml.TransformerWrapper.transform(TransformerUtils.java:597) at org.orbeon.oxf.xml.TransformerUtils.readDom4j(TransformerUtils.java:347) at org.orbeon.oxf.xml.TransformerUtils.readDom4j(TransformerUtils.java:333) at org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:890) at org.orbeon.oxf.xforms.xbl.XBLContainer.dispatchEvent(XBLContainer.java:897) at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:999) at org.orbeon.oxf.xforms.action.actions.XFormsSendAction.execute(XFormsSendAction.java:61) at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runSingleIteration(XFormsActionInterpreter.java:286) at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runAction(XFormsActionInterpreter.java:246) at org.orbeon.oxf.xforms.action.actions.XFormsActionAction.execute(XFormsActionAction.java:62) at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runSingleIteration(XFormsActionInterpreter.java:286) at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runAction(XFormsActionInterpreter.java:246) at org.orbeon.oxf.xforms.event.XFormsEventHandlerImpl.handleEvent(XFormsEventHandlerImpl.java:153) at org.orbeon.oxf.xforms.xbl.XBLContainer.dispatchEvent(XBLContainer.java:878) at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:999) at org.orbeon.oxf.xforms.XFormsContainingDocument.executeExternalEvent(XFormsContainingDocument.java:983) at org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:399) at org.orbeon.oxf.xforms.processor.XFormsServer.access$000(XFormsServer.java:55) at org.orbeon.oxf.xforms.processor.XFormsServer$1.readImpl(XFormsServer.java:81) at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995) at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350) at org.orbeon.oxf.processor.pipeline.TeeProcessor.access$000(TeeProcessor.java:36) at org.orbeon.oxf.processor.pipeline.TeeProcessor$1.readImpl(TeeProcessor.java:59) at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995) at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsTinyTree(ProcessorImpl.java:377) at org.orbeon.oxf.processor.ProcessorImpl$4.read(ProcessorImpl.java:410) at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:453) at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsTinyTree(ProcessorImpl.java:408) at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:189) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:644) at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:519) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:641) at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:242) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:644) at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:519) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:641) at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:92) at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96) at org.orbeon.oxf.servlet.OrbeonServletDelegate.service(OrbeonServletDelegate.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) Any workaround for this? Your assistance is highly appreciated. Regards, Safraz Hanas |
Is there an solution for this? |
Hi there, Seems no one interested in my query. Anyway, i'll describe this little further. I have set of xml files (each has an xforms interface) which are saved in multiple collections. collection url is given by the users Eg : /exist/rest/db/rulesmanager/rule/beans.xml; /exist/rest/db/rulesmanager/router/beans.xml (rule & router names are given by user) when editing the xml files i have to load all xml files stored in the database. user might select an xml file Eg : rule In order to load xml files stored in eXist db, following code is suggested in the eXist forum. for $child in xdb:get-child-collections('/db') order by $child return <child> $child </child> when i run the same code in sandbox-exist example, ( in latest orbeon version, including nightly builds) i'm getting above exception. I would appreciate someone could assist me. (Actually I've overran my time schedule) Regards, Safraz |
Administrator
|
Safraz,
What we lack the most isn't interest, but time, as there are so many interesting things. You need to define a namespace for xdb. Also instead of $child you need to write {$child} when inside an element, otherwise the literal "$child" will be returned. And finally, you might want to add a root element, as XML must have one root element. This gives: declare namespace xdb="http://exist-db.org/xquery/xmldb"; <children> { for $child in xdb:get-child-collections('/db') order by $child return <child> {$child} </child> } </children> Alex |
Free forum by Nabble | Edit this page |