Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 70733 invoked from network); 4 Nov 2009 15:33:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Nov 2009 15:33:57 -0000 Received: (qmail 36865 invoked by uid 500); 4 Nov 2009 15:33:57 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 36766 invoked by uid 500); 4 Nov 2009 15:33:56 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 36758 invoked by uid 99); 4 Nov 2009 15:33:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 15:33:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 15:33:53 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7DA7B234C052 for ; Wed, 4 Nov 2009 07:33:32 -0800 (PST) Message-ID: <331495616.1257348812512.JavaMail.jira@brutus> Date: Wed, 4 Nov 2009 15:33:32 +0000 (UTC) From: "Christopher Schultz (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Commented: (COCOON-2270) Cocoon fails to find files when deployed into a directory containing a '#' character In-Reply-To: <761095172.1257348212520.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COCOON-2270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773522#action_12773522 ] Christopher Schultz commented on COCOON-2270: --------------------------------------------- I can confirm that changing the # symbol to a - (minus) enabled Cocoon to work correctly. This is a reasonable workaround for us in the short-term, but it should be possible to use file paths (on a disk) containing # marks as deployment directories for Cocoon. > Cocoon fails to find files when deployed into a directory containing a '#' character > ------------------------------------------------------------------------------------ > > Key: COCOON-2270 > URL: https://issues.apache.org/jira/browse/COCOON-2270 > Project: Cocoon > Issue Type: Bug > Components: - Components: Sitemap > Affects Versions: 2.1.11 > Reporter: Christopher Schultz > > I have been using Cocoon 2.1.10 and 2.1.11 for quite some time with a handful of modest pipelines using XSLTs on the local disk. > Recently, I've been building a development server to be shared among several developers on our team. In order to share HTTP ports and URL spaces, we've chosen to use URL spaces like "/[username]/[appname]" rather than simply "/[appname]" as we've used in the past. > We use Apache Tomcat 5.5 as our app server, and the proper way to deploy a web application with a / in its context name is to use either a WAR file such as [username]#[appname].war, or a directory with the same name (minus the ".war", of course). > When we do this, we find that Cocoon gets tripped-up, apparently confused by the # symbol in the path name. It can't find our templates on the disk (maybe?) and it's also failing to find its own "exception2html.xslt" file. > Cocoon has been deployed into this directory: > /home/cschultz/projects/cocoon/app/webapps/cschultz#chadis > Our top-level sitemap has the default exception handler configuration: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > When we try to execute our transformers, we get the following error: > Message: /home/cschultz/.webapps/cocoon/8225/webapps/stylesheets/system/exception2html.xslt (No such file or directory) > If you notice, this path is not correct. It should be: > /home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/stylesheets/system/exception2html.xslt > Note that the path element after "webapps" has been removed. > I have tried changing the path to the exception stylesheet in the top-level sitemap to: > > But this results in the following error: > Message: /home/cschultz/.webapps/cocoon/8225/webapps/cschultz (No such file or directory) > Note the path is truncated at the '#' symbol. > Finally, I tried changing the path to: > > Message: Did not find the stylesheet root! > Description: org.apache.cocoon.ProcessingException: Unable to get transformer handler for file:///home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/stylesheets/system/exception2html.xslt at - file:///home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/sitemap.xmap:736:45 at - file:///home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/sitemap.xmap:731:133 at - file:///home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/sitemap.xmap:730:43 > full exception chain stacktrace > org.apache.cocoon.ProcessingException: Unable to get transformer handler for file:///home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/stylesheets/system/exception2html.xslt > at - file:///home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/sitemap.xmap:736:45 > at - file:///home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/sitemap.xmap:731:133 > at - file:///home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/sitemap.xmap:730:43 > at org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:339) > at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:398) > at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:718) > at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:501) > at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:453) > at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:144) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.SwitchSelectNode.invoke(SwitchSelectNode.java:99) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.HandleErrorsNode.invoke(HandleErrorsNode.java:90) > at org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(ErrorHandlerHelper.java:182) > at org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(ErrorHandlerHelper.java:135) > at org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.invokeErrorHandler(ErrorHandlerHelper.java:108) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:157) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177) > at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254) > at org.apache.cocoon.Cocoon.process(Cocoon.java:699) > at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) > at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) > at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) > at java.lang.Thread.run(Thread.java:595) > Caused by: org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception when creating Transformer from file:///home/cschultz/.webapps/cocoon/8225/webapps/cschultz#chadis/stylesheets/system/exception2html.xslt > at org.apache.cocoon.components.xslt.TraxProcessor.getTransformerHandlerAndValidity(TraxProcessor.java:300) > at org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:331) > ... 36 more > Caused by: javax.xml.transform.TransformerException: Did not find the stylesheet root! > at org.apache.xalan.processor.StylesheetHandler.endDocument(StylesheetHandler.java:494) > at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) > at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) > at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) > at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) > at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) > at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) > at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315) > at org.apache.excalibur.xmlizer.DefaultXMLizer.toSAX(DefaultXMLizer.java:128) > at org.apache.cocoon.components.xslt.TraxProcessor.sourceToSAX(TraxProcessor.java:311) > at org.apache.cocoon.components.xslt.TraxProcessor.getTransformerHandlerAndValidity(TraxProcessor.java:241) > ... 37 more > Caused by: javax.xml.transform.TransformerException: Did not find the stylesheet root! > at org.apache.xalan.processor.StylesheetHandler.endDocument(StylesheetHandler.java:474) > ... 53 more > This webapp works perfectly fine if deployed as, say, "chadis.war" (without the # symbol). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.