DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23848>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23848 NullPointerException with large merges Summary: NullPointerException with large merges Product: XalanJ2 Version: 2.5 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Xalan-Xsltc AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I am encountering a nullpointer exception when merging 2 external documents via xsltc The command I am using is as follows (relevant files are at the end of the message) C:\j2sdk1.4.1\bin\java -mx128m -Xmx128m - Xbootclasspath/p:D:\utilities\work\savedxml\xalan-j_2_5_1\bin\xml- apis.jar;D:\utilities\work\savedxml\xalan-j_2_5_1 \bin\xercesImpl.jar;D:\utilities\work\savedxml\xalan-j_2_5_1\bin\xalan.jar - classpath D:\utilities\work\savedxml\xalan-j_2_5_1\bin\xml- apis.jar;D:\utilities\work\savedxml\xalan-j_2_5_1 \bin\xercesImpl.jar;D:\utilities\work\savedxml\xalan-j_2_5_1\bin\xalan.jar org.apache.xalan.xslt.Process -IN mergeController.xml -XSL merge.xsl -OUT result.xml -XSLTC -XX -EDUMP The mergeController file contains a sourcefile and mergefile. The sourcefile is iterated over and elements from the mergefile are either merged or appended to the current output. When the sourcefile is too large, I get the following exception (I haven't been able to track down line number yet). ERROR: 'java.lang.NullPointerException' javax.xml.transform.TransformerException: org.apache.xalan.xsltc.TransletExcepti on: java.lang.NullPointerException at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl .java:660) at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl .java:298) at org.apache.xalan.xslt.Process.main(Process.java:1025) --------- org.apache.xalan.xsltc.TransletException: java.lang.NullPointerException at org.apache.xalan.xsltc.dom.LoadDocument.documentF(LoadDocument.java:1 53) at merge.template$dot$1() at merge.applyTemplates() at merge.applyTemplates() at merge.template$dot$0() at merge.applyTemplates() at merge.transform() at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTra nslet.java:533) at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl .java:655) at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl .java:298) at org.apache.xalan.xslt.Process.main(Process.java:1025) The problem only occurs when using the -XSLTC option. Also, it is not Process.java that has the problem - I encountered it in my own code first and tried to track it using the command-line tool. Both ways give the same error. If I manually edit the sourcefile and remove the last <term> element, the process completes without error. In fact, any term element that appears here causes the problem. The same process has been used to merge dozens of other files without error, it just seems to happen when the sourcefile gets too big. I have tested in jdk1.3 and java 1.4.1_02. Same result.
