You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jorg Heymans <jh...@domek.be> on 2004/05/03 16:39:17 UTC

cocoon freeze: nullpointer exception during moderate load testing

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


Re: cocoon freeze: nullpointer exception during moderate load testing

Posted by Jorg Heymans <jh...@domek.be>.
and another exception that happens *sometimes* :(

Can anyone shed light on this ??


Original exception : java.lang.NullPointerException
	at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.comment(SAX2DTM.java:2486)
	at 
org.apache.xalan.transformer.TransformerHandlerImpl.comment(TransformerHandlerImpl.java:933)
	at org.apache.cocoon.xml.AbstractXMLPipe.comment(AbstractXMLPipe.java:265)
	at org.apache.cocoon.xml.AbstractXMLPipe.comment(AbstractXMLPipe.java:265)
	at 
org.apache.cocoon.components.profiler.ProfilingSAXConnector.comment(ProfilingSAXConnector.java:226)
	at 
org.apache.cocoon.xml.ContentHandlerWrapper.comment(ContentHandlerWrapper.java:304)
	at org.apache.xerces.parsers.AbstractSAXParser.comment(Unknown Source)
	at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanComment(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.DTDConfiguration.parse(Unknown Source)

Jorg Heymans wrote:
> 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


Re: cocoon freeze: nullpointer exception during moderate load testing

Posted by Jorg Heymans <jh...@domek.be>.
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