  | |  | Error when switching to java 1.5 | Error when switching to java 1.5 2006-10-26 - By Erin Harris
Hi,
I couldn't get this to fail when running from the command line:
java -Djava.endorsed.dirs=d:\xalan-j_2_7_0 org.apache.xalan.xslt.Process -xsl test.xsl -in test.xml
Does it fail for you when running from the command line as well or only when running within Tomcat? Are you using the Tomcat endorsed directory ( <Tomcat_Home>\common\endorsed )?
Did you get a stack trace with the exception?
Thanks.
Erin Harris
footh <footh@(protected)> 25/10/2006 05:47 PM
To xalan-j-users@(protected) cc
Subject Error when switching to java 1.5
I am using an identity template that removes namespaces in a Cocoon application that runs under Tomcat. Previously, I was using Java 1.4.2 but once I switched to Java 1.5 I receive a null pointer TransformerException. Following is the identity template that matches all nodes. The error occurs on the "apply-templates" tag. On the "select" attribute, the presence of the "@*" symbol causes the error. If I remove it, everything is fine. However, then attributes of nodes are not rendered. Has anyone encountered this problem before? Any suggestions?
<xsl:template match="*"> <xsl:element name="{name()}" namespace="{namespace-uri()}"> <xsl:apply-templates select="@*|node()" /> </xsl:element> </xsl:template>
I've tried throwing in different versions of Xalan jars to no avail. Currently, I'm using 2.7.0.
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
<br><font size=2 face="sans-serif">Hi,</font> <br> <br><font size=2 face="sans-serif">I couldn't get this to fail when running from the command line:</font> <br> <br><font size=2 face="Courier">java -Djava.endorsed.dirs=d:\xalan-j_2_7_0 org.apache.xalan.xslt.Process -xsl test.xsl -in test.xml</font> <br><font size=2 face="sans-serif"><br> Does it fail for you when running from the command line as well or only when running within Tomcat? Are you using the Tomcat endorsed directory (</font><font size=2 face="Arial"><Tomcat_Home>\common\endorsed</font> <font size=3> </font><font size=2 face="sans-serif">)?</font> <br> <br><font size=2 face="sans-serif">Did you get a stack trace with the exception ?</font> <br> <br> <br><font size=2 face="sans-serif">Thanks.</font> <br> <br><font size=2 face="sans-serif"><br> Erin Harris<br> <br> </font> <br> <br> <br> <table width=100%> <tr valign=top> <td width=40%><font size=1 face="sans-serif"><b>footh <footh@(protected)>< /b> </font> <p><font size=1 face="sans-serif">25/10/2006 05:47 PM</font> <td width=59%> <table width=100%> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">To</font></div> <td><font size=1 face="sans-serif">xalan-j-users@(protected)</font> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">cc</font></div> <td> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">Subject</font></div> <td><font size=1 face="sans-serif">Error when switching to java 1.5</font>< /table> <br> <table> <tr valign=top> <td> <td></table> <br></table> <br> <br> <br><tt><font size=2>I am using an identity template that removes<br> namespaces in a Cocoon application that runs under<br> Tomcat. Previously, I was using Java 1.4.2 but once I<br> switched to Java 1.5 I receive a null pointer<br> TransformerException. Following is the identity<br> template that matches all nodes. The error occurs on<br> the "apply-templates" tag. On the "select" attribute, <br> the presence of the "@*" symbol causes the error. If<br> I remove it, everything is fine. However, then<br> attributes of nodes are not rendered. Has anyone<br> encountered this problem before? Any suggestions? <br> <br> <xsl:template match="*"><br> <xsl:element name="{name()}"<br> namespace="{namespace-uri()}"><br> <xsl:apply-templates select="@*|node()" /><br> </xsl:element><br> </xsl:template><br> <br> I've tried throwing in different versions of Xalan<br> jars to no avail. Currently, I'm using 2.7.0.<br> <br> __________________________________________________<br> Do You Yahoo!?<br> Tired of spam? Yahoo! Mail has the best spam protection around <br> http://mail.yahoo.com <br> </font></tt> <br>
|
|
 |