Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 48032 invoked by uid 500); 12 Nov 2002 07:08:23 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 47966 invoked from network); 12 Nov 2002 07:08:10 -0000 Message-ID: From: "Subrahmanya, Noida" To: cocoon-dev@xml.apache.org Subject: RE: Transformer Creates Error in getContentAsSAX Date: Tue, 12 Nov 2002 12:33:54 +0530 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C28A19.A97E7E10" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_000_01C28A19.A97E7E10 Content-Type: text/plain; charset="iso-8859-1" -----Original Message----- From: Gianugo Rabellino [mailto:gianugo@apache.org] Sent: Monday, November 11, 2002 04:24 PM To: cocoon-dev@xml.apache.org Subject: Re: Transformer Creates Error in getContentAsSAX Subrahmanya, Noida wrote: > I have database setup with XMLResource Chani at collection Mytown > University/Student applications/ > Note Statement i is being commented. When request for url > http://localhost:8080/cocoon/demodb/Chani it completely displays > Chani XML on browser. But by being statement 1 uncommented it throws > attched exception. > What could be the reason? I think in first case it looks for transformer > . If it is not there it calls getContent or else getContentAsSAX. > Is there any Idia. Is it possible to use cutomer code to generate XML > enevts for XML:DB pseudo protocol. If yes any idea to how go about it? first of all please try to avoid HTML in your mail, as I (and I think many others out there) have troubles in following you with your current e-mail setup (hint: have a look at http://www.tuxedo.org/~esr/faqs/smart-questions.html). Now for your problem: it's weird. IIUC (but please confirm) when you are using just a generator and a serializer everything works fine, but when you add a transformer you get that exception. This definitely shouldn't happen: from the generator POV a Serializer, just like a Transformer, acts as a ContentHandler, so there should be no difference at all in the way the XMLDB Source works. In both cases getContentAsSAX() is called, so there is no difference in the behaviour of the component. Do you have any sensible information in the Cocoon logs? Let me know, -- Gianugo Rabellino Dear Gianugo Rabellino, We are using xml pseudo protocol for Graduate-Publish demo. Using this we are able to display XML content on browser. But it was giving error for XSLT transformation. we have pointed out the reason for this error. Consider following snippet of code is called by method getContentAsSAX(). public void parse(final DBDocument dbdoc) throws SAXException { if (parseInProgress) { this.error( new SAXParseException("You may not parse again while parse is in progress ", locator)); } if (dbdoc == null) { this.fatalError(new SAXParseException(null, null, new NullPointerException("DBDocument"))); } this.setDocumentLocator(locator);//TO DO: Better understanding of Locator //Statement 1 this.startDocument(); org.w3c.dom.Element documentElement = null; try { documentElement = getElement(dbdoc); } catch (Exception e) { this.fatalError(new SAXParseException(null, locator, e)); .... .... .... } Cocoon 2 XSL transformation makes use of DocumentLocator which might be not be implemented properly in SocratesXML. Statement 1 was giving attached error, passing null to method setDocumentLocator. Commenting this we are able to proceed. Further is there any way to pass username and password to xmldb:protocol as in default it calls org.xmldb.api.DatabaseManager which in tern calls DatabaseImpl.getCollection(uri,username,password) by supplying null and null to username and password respectively?. Suppose i have enhanced DatabaseManager ( say ordbxml.xmldb.DatabaseManager ) which was derived from org.xmldb.api.DatabaseManager to add some extra methods. How could i configure to use this?. With Thanks and Regards, B. Subrahmanya Nayak Member Technical Staff, HCL Technologies Ltd., Net Centric Division, B-41, A-11,Sector 16, Noida - 201301 Ph: 118-4510701/702/813 Extn: 3028 Disclaimer: This document is intended for transmission to the named recipient only. If you are not that person, you should note that legal rights reside in this document and you are not authorized to access, read, disclose, copy, use or otherwise deal with it and any such actions are prohibited and may be unlawful. The views expressed in this document are not necessarily those of HCL Technologies Ltd. Notice is hereby given that no representation, contract or other binding obligation shall be created by this e-mail, which must be interpreted accordingly. Any representations, contractual rights or obligations shall be separately communicated in writing and signed in the original by a duly authorized officer of the relevant company. --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org ------_=_NextPart_000_01C28A19.A97E7E10 Content-Type: text/plain; name="error.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="error.txt" getContentAsSAXMon Nov 11 19:07:59 IST = 2002java.lang.NullPointerException at = org.apache.xalan.transformer.TransformerHandlerImpl.setDocumentLocator(T= ransformerHandlerImpl.java:354) at = org.apache.cocoon.xml.AbstractXMLPipe.setDocumentLocator(AbstractXMLPipe= .java:75) at ordbxml.api.DBSAXHandler.setDocumentLocator(DBSAXHandler.java:563) at ordbxml.api.DBSAXHandler.parse(DBSAXHandler.java:181) at ordbxml.api.DBSAXHandler.parse(DBSAXHandler.java:149) at = ordbxml.xmldb.XMLResourceImpl.getContentAsSAX(XMLResourceImpl.java:312) at = org.apache.cocoon.components.source.XMLDBSource.resourceToSAX(XMLDBSourc= e.java:257) at = org.apache.cocoon.components.source.XMLDBSource.toSAX(XMLDBSource.java:2= 24) at = org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:1= 43) at = org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi= ngEventPipeline.java:250) at = org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach= ingStreamPipeline.java:399) at = org.apache.cocoon.www.sitemap_xmap.matchN40040E(G:\jakarta-tomcat-4.0.6\= work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www\site= map_xmap.java:4707) at = org.apache.cocoon.www.sitemap_xmap.process(G:\jakarta-tomcat-4.0.6\work\= Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_x= map.java:3292) at = org.apache.cocoon.www.sitemap_xmap.process(G:\jakarta-tomcat-4.0.6\work\= Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_x= map.java:3100) at org.apache.cocoon.sitemap.Handler.process(Handler.java:224) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) at = org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154= ) at org.apache.cocoon.Cocoon.process(Cocoon.java:575) at = org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at = org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica= tionFilterChain.java:247) at = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt= erChain.java:193) at = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv= e.java:243) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja= va:566) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4= 72) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at = org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv= e.java:190) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja= va:566) at = org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja= va:246) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja= va:564) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4= 72) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at = org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234= 7) at = org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java= :180) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja= va:566) at = org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa= lve.java:170) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja= va:564) at = org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java= :170) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja= va:564) at = org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468= ) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja= va:564) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4= 72) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at = org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.= java:174) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja= va:566) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4= 72) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at = org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j= ava:1027) at = org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:= 1125) at java.lang.Thread.run(Thread.java:536) ------_=_NextPart_000_01C28A19.A97E7E10 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org ------_=_NextPart_000_01C28A19.A97E7E10--