Bug#345116: ant: NullPointerException in XSLT with gij-4.1
Nick Lewycky
nicholas at mxc.ca
Thu Dec 29 05:09:30 UTC 2005
Package: ant
Version: 1.6.5-3
Severity: normal
Tags: experimental
Using libgcj7 4.1-0exp4 (experimental) I experience a
NullPointerException when running the following rule:
<xslt
style="src/soot/options/phase_options_dialog.xsl"
in="src/soot/options/soot_options.xml"
out="eclipse/ca.mcgill.sable.soot/src/ca/mcgill/sable/soot/ui/PhaseOptionsDialog.java"
/>
The interesting part of the exception is:
java.lang.NullPointerException
at gnu.xml.transform.ApplyTemplatesNode.clone (libgcj.so.7)
at gnu.xml.transform.LiteralNode.clone (libgcj.so.7)
at gnu.xml.transform.Template.clone (libgcj.so.7)
at gnu.xml.transform.Stylesheet.clone (libgcj.so.7)
at gnu.xml.transform.TemplatesImpl.newTransformer (libgcj.so.7)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.createTransformer (TraXLiaison.java:228)
where TraXLiaison.java:228 is the following line of code:
transformer = templates.newTransformer();
I've written a simple testcase based on TraXLiaison.java to test
whether the problem is in libgcj7, but for me it worked fine.
Because this involved experimental packages, reproducing the problem
is not entirely trivial. I've attached a full ant.log generated:
$ ant --execdebug -l ant.log -v -d eclipse-plugin
exec "/usr/lib/jvm/java-1.4.2-gcj-4.1-1.4.2.0//bin/java" -classpath "/usr/share/ant/lib/ant-launcher.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/xercesImpl.jar" -Dant.home="/usr/share/ant" -Dant.library.dir="/usr/share/ant/lib" org.apache.tools.ant.launch.Launcher -cp "/home/nicholas/sable/soot/polyglot/trunk/lib/polyglot.jar:/home/nicholas/sable/soot/polyglot/trunk/lib/java_cup.jar:/home/nicholas/sable/soot/jasmin/trunk/lib/jasminclasses-2.1.1.jar:." "-l" "ant.log" "-v" "-d" "eclipse-plugin"
except that because "java-1.4.2-gcj-4.1.../bin/java" is in a custom
package, you'll need to replace it with "gij-wrapper-4.1" which works
just as well and produces the same output.
I'm using libgcj7 because it's the first release after the classpath
0.19 merge. Earlier versions don't have the gnu.xml.transform.Stylesheet
class causing a failure much earlier.
Thanks,
Nick Lewycky
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13.1
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Versions of packages ant depends on:
ii gij [java-virtual-machine] 4:4.0.2-2 The GNU Java bytecode interpreter
ii gij-3.3 [java1-runtime] 1:3.3.6-7 The GNU Java bytecode interpreter
ii gij-4.0 [java1-runtime] 4.0.2-5j2 The GNU Java bytecode interpreter
ii gij-4.1 [java1-runtime] 4.1-0exp4 The GNU Java bytecode interpreter
ii j2re1.4 [java2-runtime] 1.4.1 Sun JDK v1.4.1
ii libxerces2-java 2.6.2-3 Validating XML parser for Java wit
ii sablevm [java1-runtime] 1.11.3-2 Free implementation of Java Virtua
Versions of packages ant recommends:
ii ant-optional 1.6.5-3 Java based build tool like make -
ii gcj-4.1 [java-compiler] 4.1-0exp4 The GNU compiler for Java(TM)
ii jikes 1:1.22-3 Fast Java compiler adhering to lan
ii jikes-sablevm [java-compiler] 1.11.3-2 Wrapper for jikes using classes fr
-- debconf-show failed
-------------- next part --------------
Adding reference: ant.PropertyHelper
Detected Java version: 1.5 in: /usr/lib/jvm/java-1.4.2-gcj-4.1-1.4.2.0/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.5 compiled on October 1 2005
Setting ro project property: ant.file -> /home/nicholas/sable/soot/trunk/build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
More information about the pkg-java-maintainers
mailing list