on 12-17-2014 2:51 PM
Hi Experts,
I am getting the below error while executing XSLT mapping. I am trying to set file name dynamically in mapping(this would be used in receiver file adapter).
Transformer Configuration Exception occurred when loading XSLT Concur_TransformToFile.xsl; details: The first argument to the non-static Java function 'put' is not a valid object reference.
this is the XSLT mapping
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:map="java:java.util.Map" xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration" xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
<xsl:template match="/">
<xsl:variable name="FileName" select="//FileName"/>
<xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')"/>
<xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/File', 'FileName')"/>
<xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $FileName)" />
</xsl:template>
</xsl:stylesheet>
Any idea why it is throwing this error.
Thanks,
Sandeep Maurya.
Did you ever find the cause of this error? I'm facing the exact same issue in PI 7.4.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://sap.com/xi/SFIHCM01"
xmlns="urn:fault.sfapi.successfactors.com"
xmlns:ns2="urn:sfobject.sfapi.successfactors.com"
xmlns:map="java:java.util.Map"
xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:param name="sessionId">
<xsl:value-of select="//sessionId"/>
</xsl:param>
<xsl:param name="inputparam"/>
<xsl:template match="/*">
<!-- change dynamic configuration -->
<xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')"/>
<xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/System/HTTP', 'Cookie')"/>
<xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $sessionId)"/>
<ns2:upsert>
<xsl:apply-templates select="upsert/type"/>
<xsl:apply-templates select="upsert/sfobject"/>
<xsl:apply-templates select="upsert/processingParam"/>
</ns2:upsert>
</xsl:template>
<xsl:template match="sfobject">
<ns2:sfobject>
<xsl:apply-templates select="*"/>
</ns2:sfobject>
</xsl:template>
<xsl:template match="processingParam">
<ns2:processingParam>
<xsl:apply-templates select="*"/>
</ns2:processingParam>
</xsl:template>
<!-- filter -->
<xsl:template match="id"/>
<xsl:template match="*">
<xsl:element name="ns2:{local-name()}" namespace="urn:sfobject.sfapi.successfactors.com">
<xsl:apply-templates select="@*|*|text()"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
There is a problem about
xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey"
The error is :
Transformer Configuration Exception occurred when loading XSLT upsert_mapping.xsl; details: The first argument to the non-static Java function 'put' is not a valid object reference.
It is working on 7.4 but it is not working on 7.5
Hi,
I have exactly the same problem. When I have SAP XML Toolkit acticated, I run into the problem mentioned here:
https://scn.sap.com/thread/3928151
SAP Note 2338800 tells to deactivate the SAP XML Toolkit. Now I am coming into that new issue ;-(
Any ideas how to solve?
Regards
Helmut
I have modified ur XSLT -
Copy/paste below code and test.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:map="java:java.util.Map" xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration" xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
<xsl:output indent="no"/>
<xsl:param name="inputparam"/>
<xsl:template match="/">
<xsl:variable name="FileName" select="//FileName"/>
<xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')"/>
<xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/File','FileName')"/>
<xsl:variable name="dynamic-value" select="dyn:get($dynamic-conf, $dynamic-key)"/>
<xsl:variable name="new-value" select="concat($dynamic-value, $FileName)"/>
<xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $new-value)"/>
</xsl:template>
</xsl:stylesheet>
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandeep,
Follow the steps pointed out by Former Member in this thread http://scn.sap.com/message/4886813#4886813
It worked for me.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Inputparam parameter declaration is missing? Add the same and then check.
XSLT Mapping of Adapter-Specific Message Attributes - Enterprise Services Repository - SAP Library
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.