If i change the initial mapping from: <map:mount src="resource://xxx/myapp.xmap" uri-prefix="" /> into: <map:mount src="WEB-INF/classes/xxx/myapp.xmap" uri-prefix="" /> then this error goes away.... so aparently the resource protocol isn't hooked into the Resolver when doing the entity fetching on xmap loading...... SO BE WARNED: "If using the <!ENTITY to include or inherit fragments into some sub sitemap ; DO NOT USE resource:// to mount the sub.xmap" mvh, Dynnamitt. dynnamitt wrote: > > Help! (2.1.11) > > I love this !ENTITY inheritance "trickery" and it works fine in the root > sitemap.xmap (context://sitemap.xmap that is...) > BUT > in a sub-sitemap (located at resource://xxx/my-app.xmap) the resolver > cannot find my entity file > > "java.net.MalformedURLException: unknown protocol: resource " (more > details from "cocoon.log" below) > > I can not figure out where the resolver is expecting to find the entity > file... > The Entity file is located at resource://xxx, just like the my-app.xmap > file is. > What am I missing ?? > > regards, > Dynnamitt > > ---- cocoon-log : ---- > ERROR (2008-06-26) 13:42.22:110 [sitemap.handled-errors] (/dw3/coll/) > http-8333-Processor25/ErrorHandlerHelper: Failed to load sitemap from > resource://docweb_core/collection.xmap > at <map:mount> - resource://docweb_core/docweb.xmap:229:52 > at <map:mount> - > file:///home/kdm/dev/eclipse-wrkspc/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/cocoon2/sitemap.xmap:841:120 > java.net.MalformedURLException: unknown protocol: resource > at java.net.URL.<init>(URL.java:574) > at java.net.URL.<init>(URL.java:464) > at java.net.URL.<init>(URL.java:413) > at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown > Source) > at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) > at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(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.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315) > at > org.apache.excalibur.xmlizer.DefaultXMLizer.toSAX(DefaultXMLizer.java:128) > at > org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:191) > at > org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:140) > at > org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:367) > at > org.apache.cocoon.components.treeprocessor.TreeProcessor.buildConcreteProcessor(TreeProcessor.java:341) > at > org.apache.cocoon.components.treeprocessor.TreeProcessor.setupConcreteProcessor(TreeProcessor.java:306) > at > org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:252) > at > org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118) > at > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) > at > org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) > at > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) > at > org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:139) > at > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) > at > org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:139) > at > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at > org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) > 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.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118) > at > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) > at > org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) > at > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at > org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) > 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:803) > 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:174) > 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:151) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) > at > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) > at > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) > at > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) > at java.lang.Thread.run(Thread.java:619) > > > > > > Mark Lundquist-2 wrote: >> >> >> I do this all the time too, but there's a "gotcha" to know about. If >> you modify one of the included files, you have to touch the top-level >> sitemap file in order for the sitemap to get reloaded so that you can >> see your changes take effect. >> >> cheers, >> —ml— >> >> On Dec 11, 2006, at 3:57 AM, Janne K. Olesen wrote: >> >>> Hallo Stephen, >>> >>> thanks a lot, its working great. >>> >>> Janne >>> >>>> Hi Janne >>>> >>>> The trick is quite simple, though more like an "include" than >>>> inheritance. You define an XML entity at the beginning of your (sub-) >>>> sitemaps; the entity points at a file which contains the resources >>>> you want to share. You then include the file in your sitemaps by >>>> invoking the entity ("&resources;" below). The stuff in the included >>>> file has to fit the syntactic context where it is included, of course. >>>> >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <!DOCTYPE sitemap [ >>>> <!ENTITY resources SYSTEM "map-resources.xmap"> >>>> ]> >>>> <map:sitemap> >>>> ... >>>> &resources; >>>> ... >>>> </map:sitemap> >>>> >>>> >>>> I use this technique a lot, though I would prefer a solution based on >>>> inheritance from a master sitemap. >>>> >>>> Steve >>>> >>>> >>>> On 8 Dec 2006, at 18:36, Janne K. Olesen wrote: >>>> >>>>> Hallo, >>>>> >>>>> does anybody knowns a workaround to enable resource inheritance >>>>> when using sub-sitemaps? >>>>> >>>>> Problem: >>>>> I'm using cocoon to run quite a lot of applications, each of them >>>>> having their own sub-sitemap, which works fine to me. >>>>> But their is some code-base used in all sitemaps, so what I'm >>>>> looking for is something like resource/pipeline inheritance >>>>> or include-feature for sitemaps. The Idea >>>>> >>>>> <map:mount src="cocoon:/generate-sitemap" check-reload="true" >>>>> reload-method="synchron"/> >>>>> >>>>> and having a pipeline generating the sitemap doesn't work. >>>>> >>>>> Greetings Janne >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> 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 >>>> >>> >>> >>> -- >>> Janne K. Olesen >>> >>> mobi-tech GmbH >>> Glogauer Str. 5 >>> 10999 Berlin Kreuzberg >>> >>> Phone: +49 (0)30-616 757 33 >>> Fax: +49 (0)30-616 757 34 >>> Mobile: +49 (0)179-112 12 65 >>> www: http://www.mobi-tech.com >>> >>> >>> --------------------------------------------------------------------- >>> 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 >> >> >> > > -- View this message in context: http://www.nabble.com/resource-inheritance-when-using-sub-sitemaps-tp7790683p18149328.html Sent from the Cocoon - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org