cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-2044) servlet: protocol URIs have to be globally unique for use as cache-keys
Date Wed, 18 Apr 2007 23:47:15 GMT

    [ https://issues.apache.org/jira/browse/COCOON-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489907
] 

Alexander Klimetschek commented on COCOON-2044:
-----------------------------------------------

Well, this is what I get with an URL like servlet:foobar:/xslt/html2html.xsl:

org.apache.cocoon.ProcessingException: Unable to get transformer handler for servlet:foobar:/xslt/html2html.xsl
	at [TransformerException] - servlet:foobar:/xslt/html2html.xsl:28:38
	at  - file:/Users/alex/Mindquarry/hack/mindquarry-meta-system/mindquarry-webapp/mindquarry-webapplication/../../mindquarry-tasks/mindquarry-tasks-block/src/main/resources/COB-INF/sitemap.xmap:117:52
	at  - file:/Users/alex/Mindquarry/hack/mindquarry-meta-system/mindquarry-webapp/mindquarry-webapplication/../../mindquarry-tasks/mindquarry-tasks-block/src/main/resources/COB-INF/sitemap.xmap:79:20
	at  - file:/Users/alex/Mindquarry/hack/mindquarry-meta-system/mindquarry-webapp/mindquarry-webapplication/../../mindquarry-tasks/mindquarry-tasks-block/src/main/resources/COB-INF/sitemap.xmap:67:64
	at  - file:/Users/alex/Mindquarry/hack/mindquarry-meta-system/mindquarry-webapp/mindquarry-webapplication/../../mindquarry-tasks/mindquarry-tasks-block/src/main/resources/COB-INF/sitemap.xmap:53:34
	at  - file:/Users/alex/Mindquarry/hack/mindquarry-meta-system/mindquarry-webapp/mindquarry-webapplication/../../mindquarry-tasks/mindquarry-tasks-block/src/main/resources/COB-INF/sitemap.xmap:99:31
	at  - file:/Users/alex/Mindquarry/hack/mindquarry-meta-system/mindquarry-webapp/mindquarry-webapplication/../../mindquarry-tasks/mindquarry-tasks-block/src/main/resources/COB-INF/sitemap.xmap:54:39
	at  - file:/Users/alex/Mindquarry/hack/mindquarry-meta-system/mindquarry-webapp/mindquarry-webapplication/../../mindquarry-tasks/mindquarry-tasks-block/src/main/resources/COB-INF/sitemap.xmap:894:39
	at org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:313)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:61)
	at $Proxy14.setup(Unknown Source)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:374)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:484)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:429)
	at com.mindquarry.webapp.pipelines.RunningModeDependentPipeline.process(RunningModeDependentPipeline.java:252)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:61)
	at $Proxy12.process(Unknown Source)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:134)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.SwitchSelectNode.invoke(SwitchSelectNode.java:88)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.SelectNode.invoke(SelectNode.java:82)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.SwitchSelectNode.invoke(SwitchSelectNode.java:83)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.ContainerNode.invoke(ContainerNode.java:37)
	at org.apache.cocoon.components.treeprocessor.CategoryNode.invokeByName(CategoryNode.java:65)
	at org.apache.cocoon.components.treeprocessor.sitemap.CallNode.invoke(CallNode.java:83)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.SwitchSelectNode.invoke(SwitchSelectNode.java:88)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.ContainerNode.invoke(ContainerNode.java:37)
	at org.apache.cocoon.components.treeprocessor.CategoryNode.invokeByName(CategoryNode.java:65)
	at org.apache.cocoon.components.treeprocessor.sitemap.CallNode.invoke(CallNode.java:83)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.HandleErrorsNode.invoke(HandleErrorsNode.java:88)
	at org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(ErrorHandlerHelper.java:191)
	at org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(ErrorHandlerHelper.java:138)
	at org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.invokeErrorHandler(ErrorHandlerHelper.java:106)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:165)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:251)
	at org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:357)
	at org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:163)
	at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:540)
	at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:522)
	at org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:237)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy0.service(Unknown Source)
	at org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:109)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:459)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1054)
	at com.mindquarry.user.webapp.AuthenticationFilter.doFilter(AuthenticationFilter.java:253)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
	at com.mindquarry.webapp.servlet.HttpHeaderSpoofingFilter.doFilter(HttpHeaderSpoofingFilter.java:57)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
	at com.mindquarry.webapp.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
	at org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:140)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:358)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
	at org.mortbay.jetty.Server.handle(Server.java:303)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:721)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:509)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:320)
	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception when creating Transformer
from servlet:foobar:/xslt/html2html.xsl
	at org.apache.cocoon.components.xslt.TraxProcessor.getTransformerHandlerAndValidity(TraxProcessor.java:300)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:61)
	at $Proxy16.getTransformerHandlerAndValidity(Unknown Source)
	at org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:305)
	... 81 more
Caused by: javax.xml.transform.TransformerException: Bei folgender Formatvorlagendatei ist
eine E/A-Ausnahmebedingung aufgetreten: contextpath.xsl.
	at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:904)
	at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:947)
	at org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:294)
	at org.apache.xalan.processor.ProcessorInclude.startElement(ProcessorInclude.java:150)
	at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:623)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:196)
	at org.apache.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:204)
	at org.apache.cocoon.core.xml.avalon.DefaultSAXParser.parse(DefaultSAXParser.java:54)
	at org.apache.cocoon.components.xslt.TraxProcessor.sourceToSAX(TraxProcessor.java:309)
	at org.apache.cocoon.components.xslt.TraxProcessor.getTransformerHandlerAndValidity(TraxProcessor.java:241)
	... 88 more
Caused by: java.net.MalformedURLException: unknown protocol: servlet
	at java.net.URL.(URL.java:574)
	at java.net.URL.(URL.java:464)
	at java.net.URL.(URL.java:413)
	at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:284)
	... 105 more

> servlet: protocol URIs have to be globally unique for use as cache-keys
> -----------------------------------------------------------------------
>
>                 Key: COCOON-2044
>                 URL: https://issues.apache.org/jira/browse/COCOON-2044
>             Project: Cocoon
>          Issue Type: Bug
>          Components: - Servlet service framework
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Alexander Klimetschek
>         Assigned To: Grzegorz Kossakowski
>            Priority: Critical
>
> All servlet protocol URIs like servlet:/some/thing or servlet:super:/foo/bar or servlet:myblock:/another/path
have to be globally unique because they are used in the cache, of which there is only one
global with globally acting keys.
> There are two caches in standard Cocoon configuration (the only ones I know of ;-), both
with a different key generation. Here are ideas how to make the keys global:
> a) EHDefaultStore for caching resources of caching pipelines: they use the uriPrefix
of the Enviroment in the key, so providing a uriPrefix (eg. the mount path of the servlet)
works here.
> b) DefaultTransientStore which caches XSLT and JX generator sources (don't know why this
is different from a)): they do not use the uriPrefix and much worse, they need correct URIs
because they are read by the XSLT processor, who does not like things like servlet:uniqueID34:/xsl/stylesheet.xsl
containing arbitrary schemes at the beginning. Appending an ID via a query parameter seems
the only working solution (tried it already): servlet:/xsl/stylesheet.xsl?servlet-services-id=12345
> Another solution would be to have one cache per sitemap, so that the keys don't have
to be unique anymore. But I don't know how to configure that and if this is feasible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message