You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Phil Blake <ph...@tcp.net.au> on 2001/10/17 09:29:59 UTC

[Request] Improved error reporting

I've just come across a NullPointerException that is driving me crazy :) 
because there is only a hint as to where the problem might be. ie.

DEBUG   (2001-10-17) 17:14.58:297   [cocoon  ] (/vm/news/content.html) 
HttpProcessor[8080][4]/URLFactoryImpl: Making URL from 
file:/Library/WebServer/Tomcat/jakarta-
tomcat-4.0/webapps/vm/Style/News.xsl
ERROR   (2001-10-17) 17:14.58:313   [cocoon  ] (/vm/news/content.html) 
HttpProcessor[8080][4]/TraxTransformer: Problem in getTransformer:
org.apache.cocoon.ProcessingException: Error in creating Transform 
Handler: java.lang.NullPointerException


So... I'm guessing that there is a NullPointerException somewhere in 
News.xsl... I've been looking for ages and it all looks fine.

Is it possible to add 'context' information to the error reporting - 
specifically what was being transformed at the time of the error. This 
is appropriate for almost ALL transformation errors.

eg.

DEBUG   (2001-10-17) 17:14.58:297   [cocoon  ] (/vm/news/content.html) 
HttpProcessor[8080][4]/URLFactoryImpl: Making URL from 
file:/Library/WebServer/Tomcat/jakarta-
tomcat-4.0/webapps/vm/Style/News.xsl
ERROR   (2001-10-17) 17:14.58:313   [cocoon  ] (/vm/news/content.html) 
HttpProcessor[8080][4]/TraxTransformer: Problem in getTransformer:
ERROR   (2001-10-17) 17:14.58:313   [cocoon  ] (/vm/news/content.html) 
HttpProcessor[8080][4]/TraxTransformer: Null Pointer in News.xsl at line 
229 - <xsl:variable name="newsStories" 
select="document('news.xml',.)/story"/>
org.apache.cocoon.ProcessingException: Error in creating Transform 
Handler: java.lang.NullPointerException


As time goes by and I become more familiar with the 'feel' of errors 
(ie. when I get an error that looks like this, it actually means that 
I've left out a comma or something...) it'll become easier to solve 
problems. However, while I'm at the idiot stage, I want to be as self 
sufficient as possible, meaning good, human readable,  error reporting. 
It's also takes some time to get your head around the java classes that 
actually represent your xml. Understanding them is helping a little find 
out why errors occur... but nothing beats easy to read error reports.

Thanks. Have fun,

Phil


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

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