cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alcoff, Samuel" <salc...@blackrock.com>
Subject Cocoon 1.8, NullPointerException, and Xerces...
Date Mon, 25 Sep 2000 23:18:15 GMT
Hello All,

	I'm having a bit of a problem with a freshly installed Cocoon 1.8.
I've taken a look through the FAQ and the mailing list, but haven't seen a
solution to this problem...

	It seems I'm getting a NullPointerException from the depths of
Xerces in certain cases during an XML->XSL translation.  See stack trace #1
below.

	What's odd is I don't get an error the first time I load a
particular XML document.  I'll load a document (about 50-60K xml), it will
render fine, then attempt to load another similar XML document, using the
same XSL (again about 50-60K), and I'll get this error.  From then on, any
XML->XSL translation fails, even the samples (which work fine when I freshly
restart tomcat).

	My thought is that this may have something to do with caching...
When I disable cocoon caching, I generate a NullPointerException the very
first time a page is translated - in the same method/different file, but
with a different stack trace.  See Stack Trace #2 below.  I only get this
stack trace once, any further XML->XSL transformations result in Stack Trace
#1.

	I'm pretty sure my classpath is set correctly (it's below as well),
and that the document's I'm translating are valid.  Even if it is an issue
with the documents (which it may be) why would they translate properly once,
then cause all other documents to fail?  Also, a malformed document
shouldn't prevent the rest of the system from functioning properly (at least
not when it's just straight XML->XSL).

	So, before I start diving into the depths of tomcat/cocoon/xerces,
does anyone have a hint as to what's up?  Any help appreciated...

			Thanks,
			  Sam

** Stack Trace #1:
java.lang.NullPointerException
                   at
org.apache.xerces.dom.DeferredDocumentImpl.synchronizeChildren(DeferredDocum
entImpl.java:1402)
                   at
org.apache.xerces.dom.ParentNode.getChildNodes(ParentNode.java:237)
                   at org.apache.cocoon.Utils.getFirstPI(Utils.java:116)
                   at
org.apache.cocoon.processor.ProcessorFactory.getType(ProcessorFactory.java:7
9)
                   at
org.apache.cocoon.processor.ProcessorFactory.getProcessor(ProcessorFactory.j
ava:70)
                   at org.apache.cocoon.Engine.handle(Engine.java:355)
                   at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
                   at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
                   at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
                   at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
                   at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHan      at java.lang.Thread.run(Thread.java:479)

** Stack Trace #2:
          java.lang.NullPointerException
                   at
org.apache.xerces.dom.ChildAndParentNode.synchronizeChildren(ChildAndParentN
ode.java:909)
                   at
org.apache.xerces.dom.DeferredElementNSImpl.synchronizeChildren(DeferredElem
entNSImpl.java:174)
                   at
org.apache.xerces.dom.ChildAndParentNode.getFirstChild(ChildAndParentNode.ja
va:237)
                   at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getNodeData(XMLParserLiai
sonDefault.java:1502)
                   at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getNodeData(XMLParserLiai
sonDefault.java:1474)
                   at
org.apache.xalan.xpath.XNodeSet.getStringFromNode(XNodeSet.java:151)
                   at org.apache.xalan.xpath.XNodeSet.str(XNodeSet.java:170)
                   at
org.apache.xalan.xslt.ElemValueOf.execute(ElemValueOf.java:203)
                   at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:661)
                   at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
                   at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateEl
ement.java:661)
                   at
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement
.java:1199)
                   at
org.apache.xalan.xslt.ElemTemplateElement.processLocatedNode(ElemTemplateEle
ment.java:1061)
                   at
org.apache.xalan.xpath.SimpleNodeLocator.findSelf(SimpleNodeLocator.java:613
)
                   at
org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java:406)
                   at
org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.java
:321)
                   at
org.apache.xalan.xpath.XPath.locationPath(XPath.java:964)
                   at org.apache.xalan.xpath.XPath.execute(XPath.java:1385)
                   at org.apache.xalan.xpath.XPath.execute(XPath.java:1354)
                   at org.apache.xalan.xpath.XPath.exect.java:896)
                   at
org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java:176
)
                   at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:661)
                   at
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement
.java:1199)
                   at
org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemp
lateElement.java:962)
                   at
org.apache.xalan.xslt.ElemForEach.execute(ElemForEach.java:127)
                   at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:661)
                   at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
                   at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:661)
                   at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
                   at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:661)
                   at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
                   at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:661)
                   at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
                   at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:661)
                   at
org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
                   at
org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:443)
                   at
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:647)
                   at
org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransformer.ja
va:101)
                   at
org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:11
0)
                   at org.apache.cocoon.Engine.handle(Engine.java:359)
                  ava:865)
                   at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
                   at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
                   at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
                   at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
                   at java.lang.Thread.run(Thread.java:479)

** System Details and classpath:
	This is running on Solaris 2.6, JVM 1.2.2, Tomcat 3.1.  

	Here's the classpath:
classPath="/opt/httpd/servlet/bin/../lib/ant.jar:/opt/httpd/servlet/bin/../l
ib/bsf.jar:/opt/httpd/servlet/bin/../lib/bsfengines.jar:/opt/httpd/servlet/b
in/../lib/cocoon.jar:/opt/httpd/servlet/bin/../lib/fop_0_13_0.jar:/opt/httpd
/servlet/bin/../lib/jasper.jar:/opt/httpd/servlet/bin/../lib/servlet_2_2.jar
:/opt/httpd/servlet/bin/../lib/test:/opt/httpd/servlet/bin/../lib/turbine-po
ol.jar:/opt/httpd/servlet/bin/../lib/webserver.jar:/opt/httpd/servlet/bin/..
/lib/xalan_1_2_D02.jar:/opt/httpd/servlet/bin/../lib/xerces_1_2.jar:/opt/htt
pd/servlet/bin/../lib/xml.jar:/usr/local/java/jdk1.2.2/lib/tools.jar:/u1/sal
coff/dev.sol/lib/java/1.2:/u1/build/dev/lib/java/1.2:/usr/local/java/ext1.2:
/usr/local/java/xalan_1_1/bsf.jar:/usr/local/java/xalan_1_1/bsfengines.jar:/
opt/httpd/servlet/lib/fop_0_12_1.jar:/opt/httpd/servlet/lib/cocoon.jar:/usr/
local/bfm/lib/java/1.2"


Mime
View raw message