on 08-10-2011 4:05 AM
Hi Experts,
I have an issue when doing the xslt mapping as below code, it shows up exception as "XSLT 1.0 Debugging Error: Error in XPath expression (Java execution error : java.lang.NoClassDefFoundError: com/test/Counter)"...
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:javamap="java:com.test.Counter">
<xsl:param name="FName">
<xsl:value-of select="//FirstName"/>
</xsl:param>
<xsl:param name="LName">
<xsl:value-of select="//LastName"/>
</xsl:param>
<xsl:template match="/">
<ns0:Target_Member_MT xmlns:ns0="http://test.com/xi/testing">
<xsl:for-each select="//Employee">
<CompanyMember>
<SeqID>
<xsl:if test="function-available('javamap:index')">
<xsl:value-of select="javamap:index()"/>
</xsl:if>
</SeqID>
<Name><xsl:value-of select="concat($FName,$LName)"/></Name>
<EmpNo><xsl:value-of select="EmpID"/></EmpNo>
<ContactInformation><xsl:value-of select="Contact"/></ContactInformation>
</CompanyMember>
</xsl:for-each>
</ns0:Target_Member_MT>
</xsl:template>
</xsl:stylesheet>
any help would be much appreciated !!!
Hi Rajesh,
disable JAVA functions/ code in XSLT and execute your mapping,it seems problem with JAVA functions.
<xsl:if test="function-available('javamap:index')">
<xsl:value-of select="javamap:index()"/>
</xsl:if>
test your mapping in XMLP spy first.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, i have disabled the java function and i confirm it's cozed by the java function,my java function code as below:
package com.test.Counter;
public class Counter{
public static int iSeq = 0;
public static String iCounter()
{
iSeq++;
return String.valueOf(iSeq);
}
}
anyone tell me what's the issue?
thanks in advance.
Hi Rajesh,
check below link and follow the same steps.
http://cafeconleche.org/books/xmljava/chapters/ch17s03.html
Regards,
Raj
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.