[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xml-dev] calling java function from xsl throws NullPointerException
- From: Haresh Gujarathi <gharesh@vsnl.com>
- To: Xml-Dev <xml-dev@lists.xml.org>
- Date: Thu, 18 Oct 2001 23:53:04 +0530
Hi,
I need some help in identifying cause of the following exception.
Hope somebody can give me some clue...thanks in advance.
regards
Haresh
I am trying to call a java function from xsl;
a.
I have added
xmlns:java_func="XSLUtil" extension-element-prefixes="java_func"
in <xsl:stylesheet>
b.
I have added
<lxslt:component prefix="java_func" functions="processSearchPagesLinks">
<lxslt:script lang="javaclass" src="xalan://com.emantra.util.XSLUtil"/>
</lxslt:component>
c.
I am trying to call a java function as follows;
<xsl:value-of select="java_func:processSearchPagesLinks('aaaaa')" />
d. I have the XSLUtil class in the path. The xsl transformation code is in
JSP
e. I am using
Xalan-Java 2.0.D07
f.
Following is the stack trace I get.
javax.xml.transform.TransformerException: TRaX Transform Throwable at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1175) at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2811)
at java.lang.Thread.run(Thread.java:484) ---------
java.lang.NullPointerException at
org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:252) at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2083) at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
711) at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2083) at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
711) at
org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja
va:495) at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
a:193) at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2083) at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
711) at
org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja
va:495) at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
a:193) at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2083) at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
711) at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2083) at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
711) at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2083) at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:1981) at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1151) at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2811)
at java.lang.Thread.run(Thread.java:484)