cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gal...@galin.org
Subject Re: coocon with jsp : "SAXParseException: Premature end of file"
Date Thu, 04 Aug 2005 09:50:07 GMT
Hi,

I also just noticed that the jsp examples that come with cocoon don't work
for me :

http://localhost:8080/cocoon/samples/blocks/jsp/welcome.htm

This returns a blank page.

Is it working for anyone ?

thanks,

galpi

> Hi Everyone,
>
> I'm running cocoon-2.1.7 with Tomcat-5.5.9 on MacOSX 10.4.2.
>
> No matter what I do, I can't have JSP files as source docs. I always get :
>
> Message: Premature end of file.
>
> Description: org.apache.cocoon.ProcessingException: SAXException while
> parsing JSPEngine output: org.xml.sax.SAXParseException: Premature end of
> file.
>
> I even converted my jsp docs to using jsp xml syntax, with the same
> resutls.
>
> Here's my jsp :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
>           xmlns:h="http://java.sun.com/j2ee/html_basic/"
>           xmlns:f="http://java.sun.com/jsf/core"
>           version="1.2">
>
> <jsp:useBean id="searchv" class="beans.searchv" scope="session"/>
>
> <f:view>
> <jsp:scriptlet>
>   searchv.setSearchIndex("Books");
> </jsp:scriptlet>
>
> <h:form id="searchForm">
>         <h:inputText id="keywords" value="#{searchv.keywords}" size="40"/>
>         <h:commandButton   value="Go"    action="search_results" />
>
> </h:form>
>
> </f:view>
>
> </jsp:root>
>
> [ Notice that I'm also using JSF, which is why I don't want to convert my
> pages to XSP ]
>
> And this is what I have in my sitemap :
>
>   <map:pipeline>
>    <map:match pattern="search.html">
>      <map:generate src="jsfevent.jsp" type="jsp"/>
>      <map:transform src="doc3html.xsl"/>
>      <map:serialize type="html"/>
>    </map:match>
>   </map:pipeline>
>
> I've removed the transform part and serialized to xml, same thing. The
> problem occurs during generation. Here's the stack trace :
>
> org.apache.cocoon.ProcessingException: SAXException while parsing
> JSPEngine output: org.xml.sax.SAXParseException: Premature end of file.
> 	at
> org.apache.cocoon.generation.JSPGenerator.generate(JSPGenerator.java:97)
> 	at
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:575)
> 	at
> org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:183)
> 	at
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
> 	at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
> 	at org.apache.cocoon.Cocoon.process(Cocoon.java:608)
> 	at
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1123)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> 	at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> 	at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 	at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> 	at java.lang.Thread.run(Thread.java:613)
> Caused by: org.xml.sax.SAXParseException: Premature end of file.
> 	at
> org.apache.excalibur.xml.impl.JaxpParser.fatalError(JaxpParser.java:443)
> 	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.XMLVersionDetector.determineDocVersion(Unknown
> Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:296)
> 	at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
> 	at
> org.apache.cocoon.generation.JSPGenerator.generate(JSPGenerator.java:93)
> 	... 30 more
> org.xml.sax.SAXParseException: Premature end of file.
> 	at
> org.apache.excalibur.xml.impl.JaxpParser.fatalError(JaxpParser.java:443)
> 	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.XMLVersionDetector.determineDocVersion(Unknown
> Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:296)
> 	at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
> 	at
> org.apache.cocoon.generation.JSPGenerator.generate(JSPGenerator.java:93)
> 	at
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:575)
> 	at
> org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:183)
> 	at
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
> 	at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
> 	at org.apache.cocoon.Cocoon.process(Cocoon.java:608)
> 	at
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1123)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> 	at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> 	at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 	at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> 	at java.lang.Thread.run(Thread.java:613)
>
>
> Has anyone been able to run cocoon with JSPs as source files ??
>
> Thanks a lot,
>
> galpi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message