[
https://issues.apache.org/jira/browse/XALANJ-2365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671176#action_12671176
]
Henk Spaan commented on XALANJ-2365:
------------------------------------
I also got this problem on 2.7.1.
Unfortunately it's not consistent.
After a reboot of the appserver, the problem goes away for a few transforms and
then returns.
So, it's probably a resource problem that's caught by an dysfunctional catch.
Searching the sources I only see a reference to "SystemId Unknown" in
DefaultErrorHandler.
DefaultErrorHandler does not throw TransformerExceptions when an error() is
issued, so I guess that explains the transformer doesn't fail.
However it does throw an exceptions in error(SaxParseException).
So where is the bug?
No idea.
I'll try a custom errorhandler and cross my fingers that we can reproduce it
after a new release in the customer's test environment.
My advice:
A NPE without stacktrace is not informative and there are probably more
examples.
Whenever the cause of a TransformerException is a RuntimeException or Error, it
should be upgraded to fatal.
The question is just: where do check the exception type.
That's for someone else to decide, if anyone still cares to maintain Xalan.
> NPE in DOMSource transformation using xsl:copy-of select
> --------------------------------------------------------
>
> Key: XALANJ-2365
> URL: https://issues.apache.org/jira/browse/XALANJ-2365
> Project: XalanJ2
> Issue Type: Bug
> Components: transformation
> Affects Versions: 2.7
> Environment: Windows XP, running Sun Java 1.5 and IBM Java 1.5
> Reporter: Andrew Hay
> Fix For: The Latest Development Code
>
> Attachments: copy-of_select.xml, XMLValidatorUpdate.xsl
>
>
> We're currently working on moving from Xalan 2.3.1 to Xalan 2.7.0 and have
> encountered a problem with xsl:copy-of. Using StreamSource transformations,
> the code behaves as expected. However when using a DOMSource transformation
> (which we mostly do) a NullPointerException is thrown. The transformation
> is exited at the point reached without any exception being thrown.
> Unfortunately the resulting XML is missing nodes that had not been reached
> in the transformation.
> The XSL stylesheet is very similar to many others that we have, with the
> template causing the problem being :-
> <xsl:template match="/WorkingDocument/Notes/Request" mode="build">
> <Request>
> <xsl:copy-of select = "Message"/>
> <xsl:copy-of select = "Action"/>
> <xsl:copy-of select = "NPQuote"/>
> ......
> Some manipulation of data in the Request node
> .......
> </Request>
> </xsl:template>
> The node /WorkingDocument/Notes/Request/NPQuote does not exist. Xalan
> outputs a warning message "SystemId Unknown; Line #37; Column #37;
> java.lang.NullPointerException" but does not throw an Exception. No node
> after the completion of the previous line appears in the resulting XML.
> I've tried this in Xalan 2.7.0 unsuccessfully and also recreated the same
> problem this week in Xalan 2.7.1.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]