You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jens-Christoph Brendel <Je...@web.de> on 2002/07/04 13:37:01 UTC

strange sitemap problem

Hi!

As a cocoon newbie I have the following relative strange problem - at least
from my point of view.
I would highly appreciate any hint or help to put me in the right
direction.

First I created a simple XML document and a XSLT stylesheet and placed
these documents in
one of the cocoon sample subdirectories ("protected"). I edited the
subsitemap under
$COCOON_HOME/protected and added the following entry as a reference to my
documents:

<map:match pattern="start">
        <map:generate src="docs/index.xml"/>
        <map:transform src="stylesheets/spage.xsl"/>
        <map:serialize/>
 </map:match>

I tested this with in my browser with
http://localhost/cocoon/protected/start and all worked
fine.

Then I duplicated the protected subdirectory under the new name "logbook"
with

cp -pr protected logbook.

I also duplicated the entry in the root sitemap that redirects the URI and
maps the
subsitemap. I exchanged the word "protected" with "logbook"  in these
lines. The result was

<!-- logbook webapp example pipeline -->
<map:pipeline>
    <map:match pattern="logbook/**">
    <map:mount uri-prefix="logbook" src="logbook/" check-reload="yes"/>
    </map:match>
</map:pipeline>

I would now expect that 'http://localhost/cocoon/logbook/start' will work
as well.

But what I got instead is a
" org.apache.avalon.framework.configuration.ConfigurationException:
 Error in sitemap configuration :" (!?!):

Original exception : java.lang.ClassNotFoundException:
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:46)
at
org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.java:220)
at
org.apache.cocoon.www.logbook.sitemap_xmap$Configurer.configGenerators(sitemap_xmap.java:197)
at
org.apache.cocoon.www.logbook.sitemap_xmap.configure(sitemap_xmap.java:142)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:172)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:84)
at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:135)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addCompiledComponent(ProgramGeneratorImpl.java:356)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:334)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:282)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:196)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:228)
at java.lang.Thread.run(Thread.java:496)


I haven't the slightest idea why this happens. The sitemaps under
"protected" and "logbook" are
identical. The two entries for "protected" and "logbook" in the root
sitemap differ only in the name
of the respective directories.

If someone knows what I'm doing wrong, please mail me a correction.

Many thanks in advance

Jens-Christoph Brendel

P.S: I use cocoon 2.0.1 under Mac OS X 10.1.5 (build 5S66) together with
Tomcat 3.2.2 and Apache 1.3.



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


NullPointerException during xsl transformation

Posted by Olivier Chicha <ol...@wanadoo.fr>.
Hi,

i'm trying to use a xsl generated by cocoon to transform an xml file to an
html one :

      <map:match pattern="**/*.htm">
        <map:aggregate element="pageData">
          <map:part src="xml/{1}/site.xml"/>
          <map:part src="xml/{1}/{2}.xml"/>
        </map:aggregate>
        <map:transform src="cocoon:/en/input.xsl"/>
        <map:serialize/>
      </map:match>
      <map:match pattern="**/*.xsl">
        <map:generate src="xsl/{2}.xsl"/>
        <map:serialize type="xml"/>
      </map:match>

Is this supposed to be allowed?

When i try to connect to browse my page (localhost:8080/myapp/en/index.htm),
I receive a NullPointerException
If i replace
        <map:transform src="cocoon:/en/input.xsl"/>
with
        <map:transform src="http://localhost:8080/myapp/en/input.xsl">
It works fine

I'm working with a cocoon 2.1 dev version that I updated 2 or 3 days ago.
here is the Exception StackTrace

java.lang.NullPointerException
	at
org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline.setupPi
peline(CachingProcessingPipeline.java:550)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:493)
	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:142)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:160)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:157)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:152)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:327)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
	at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:131)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:160)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:157)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:152)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:327)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:585)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	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.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1027)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
	at java.lang.Thread.run(Thread.java:536)




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>