Error running a process with custom XPath functions.

Error running a process with custom XPath functions.

book

Article ID: KB0093984

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:
Error running a process with custom XPath functions. The following error is thrown.

"<CausedBy> org.genxdm.processor.xpath.v20.err.XPST0017: [XPST0017] The expanded QName ({http://custom.abcd.com}sayHello) and number of arguments (1) of the function call does not match the name and arity of a function signature in the static context."

Symptoms:
Error with custom function. When running the process, the engine does not start in Eclipse and throws the following error.

13:10:48.266 ERROR [Job_Executor0] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-600026: Failed to start BW Application [TestXPathFunctions:1.0]. Reason: TIBCO-BW-CORE-500102: Failed to install BW Module [TestXPathFunctions.module:1.0.0.qualifier], DeploymentUnit [TestXPathFunctions:1.0].
   <CausedBy> com.tibco.bx.core.faults.BxException: BX-600025: Create module failed for module [TestXPathFunctions.module] version [1.0.0.qualifier] application [TestXPathFunctions 1.0].
   <CausedBy> com.tibco.bx.core.faults.BxException: BX-600028: Adding definition failed for process [testxpathfunctions.module.Process].
   <CausedBy> com.tibco.bx.core.faults.BxException: BX-600059: Exception processing activity [Log], path [Process/Scope/Flow/ExtensionActivity2].
   <CausedBy> com.tibco.pvm.dataexch.xml.util.exceptions.PmxException: PVM-XML-106018: Expression Creation Error: '<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tns="http://www.tibco.com/pe/WriteToLogActivitySchema" xmlns:isb="http://custom.abcd.com" version="2.0"><xsl:template name="Log-input" match="/"><tns:ActivityInput><message><xsl:value-of select="isb:sayHello(&quot;Domingo&quot;)"/></message></tns:ActivityInput></xsl:template></xsl:stylesheet>'.
   <CausedBy> com.tibco.pvm.dataexch.xml.util.exceptions.PmxException: PVM-XML-106026: Transformation preparation failed for XSLT input '<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tns="http://www.tibco.com/pe/WriteToLogActivitySchema" xmlns:isb="http://custom.abcd.com" version="2.0"><xsl:template name="Log-input" match="/"><tns:ActivityInput><message><xsl:value-of select="isb:sayHello(&quot;Domingo&quot;)"/></message></tns:ActivityInput></xsl:template></xsl:stylesheet>'.
   <CausedBy> org.genxdm.processor.xpath.v20.err.XPST0017: [XPST0017] The expanded QName ({http://custom.abcd.com}sayHello) and number of arguments (1) of the function call does not match the name and arity of a function signature in the static context.

Cause:
Missing custom XPath function in dependencies folder in " Application -> includes" and in <xpath functions> Module ->Module Descriptors->  dependencies. 

Issue/Introduction

Error running a process with custom XPath functions.

Resolution

Add custom XPath function in dependencies folder in " Application -> includes" and in <xpath functions> Module ->Module Descriptors->  dependencies. 

Additional Information

https://docs.tibco.com/pub/activematrix_businessworks/6.3.0/doc/pdf/TIB_BW_bindings_palettes_reference.pdf -> Creating Custom XPath Functions & Making Custom XPath Function Available at Run Time