Hi,

There is something in the archives that looks similar - could it be the same problem?

http://mail-archives.apache.org/mod_mbox/xerces-j-users/200412.mbox/[EMAIL PROTECTED]


Erin Harris




footh <[EMAIL PROTECTED]>

27/10/2006 03:15 PM

To
xalan-j-users@xml.apache.org
cc
Subject
Re: Error when switching to java 1.5





Erin,

Thanks for the response.

I just tried doing it via the command line and it
worked fine.

So, it appears that the problem is somewhere with the
Tomcat/Cocoon setup.  I've tried running it with the
xalan library in the Tomcat endorsed directory and
that didn't help.  As it stands, the libraries are in
the WEB-INF directory for the application.  Below is
the relevant portion of the stack trace (i've ommited
the lines above which are cocoon-related:

Caused by: javax.xml.transform.TransformerException:
java.lang.NullPointerException
                at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2416)
                at
org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:339)
                at
org.apache.xalan.templates.ElemElement.execute(ElemElement.java:288)
                at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
                at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
                at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
                at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
                at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
                at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
                at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
                at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
                at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
                at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
                at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
                at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
                at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
                at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
                at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
                at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3458)
                at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:406)
                at
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:55)
                at
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:585)
                ... 52 more
Caused by: java.lang.NullPointerException
                at
org.apache.xml.serializer.SerializerBase.getPrefix(SerializerBase.java:867)
                at
org.apache.xalan.templates.ElemAttribute.resolvePrefix(ElemAttribute.java:131)
                at
org.apache.xalan.templates.ElemElement.execute(ElemElement.java:241)
                at
org.apache.xalan.templates.ElemAttribute.execute(ElemAttribute.java:108)
                at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
                at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
                at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
                ... 73 more

--- Erin Harris <[EMAIL PROTECTED]> wrote:

> 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 <[EMAIL PROTECTED]>
> 25/10/2006 05:47 PM
>
> To
> xalan-j-users@xml.apache.org
> 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
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply via email to