cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: cocoon freeze: nullpointer exception during moderate load testing
Date Mon, 03 May 2004 15:25:12 GMT
I just got a NPE at another place :

org.apache.cocoon.ProcessingException: Exception during processing of 
file:/opt/jakarta-tomcat-5.0.19/webapps/cocoon/app/gfx/sitemap.xmap: 
java.lang.NullPointerException
	at 
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:205)
	at

Looking at this method

public void toSAX(ContentHandler handler)
throws SAXException, ProcessingException {

         SAXParser parser = null;
         try {
             parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);

Under which circumstances can the lookup *sometimes* return null here?
This is my xml parser config

<xml-parser class="org.apache.excalibur.xml.impl.JaxpParser" 
logger="core.xml-parser" pool-grow="4" pool-max="32" pool-minj="8">
     <parameter name="validate" value="false"/>
     <parameter name="namespace-prefixes" value="false"/>
     <parameter name="stop-on-warning" value="true"/>
     <parameter name="stop-on-recoverable-error" value="true"/>
     <parameter name="reuse-parsers" value="true"/>
   </xml-parser>

If it's a pool issue why is my jmeter script not getting similar errors 
returned?

Thoughts?
Jorg

Jorg Heymans wrote:

> Hi,
> 
> I have a jmeter script with 3 threads firing off requests to cocoon.
> After a while, when I try to access the cocoon instance through my 
> browser and loading the simplest of pages (read file, xslt, serialize 
> html) i get a nullpointerexception during XSLT transformation. The funny 
> thing is that this only happens *sometimes*. The only constant thing is 
> that when a request fails it always fails during the xslt transformation 
> with a nullpointerexception.
> 
> I first thought that this was due to undersized pools, but i've set a 
> pool-size of 200 with pool-min 20 and pool-grow 10 on all sitemap 
> components and it still happens. The pool seems to be managing component 
> instances correctly because from debugging statements, the number of 
> components received from and returned to the pool are identical.
> 
> Thoughts?
> 
> 
> Example stacktrace:
> 
> org.apache.cocoon.ProcessingException: Exception during processing of 
> file:/opt/jakarta-tomcat-5.0.19/webapps/cocoon/app/common/stylesheets/remove_namespaces.xsl:

> java.lang.NullPointerException
> at 
> org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:205)

> 
> at 
> org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:275)

> 
> at 
> org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:240)

> 
> at 
> org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:313) 
> 
> at 
> org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:204)

> 
> at 
> org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:290)

> 
> at 
> org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:180)

> 
> at 
> org.apache.cocoon.components.profiler.ProfilingCachingEventPipeline.process(ProfilingCachingEventPipeline.java:122)

> 
> at 
> org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:412)

> 
> at 
> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:148)

> 


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


Mime
View raw message