Java method is not calling from XSLT for SAP PO

548 views Asked by At

Following is my XSLT code for SAP PO interface:

<SEGMENT id="test">
    <FIELD>
        <ID>STAT</ID>
        <xsl:choose>
            <xsl:when test="check = 'I0002'">

                <xsl:param name="param1">
                                PTS
                </xsl:param>

                <xsl:param name="param2">
                                PLANT_WHSE
                </xsl:param>
                <xsl:param name="param3">
                    <xsl:value-of select="P002" />
                </xsl:param>


                <xsl:variable name="status">
                    <xsl:value-of
                                    select="javamap:JAVA_METHOD($param1,$param2,$param3,$inputparam)" />
                </xsl:variable>


                <VALUE>
                    <xsl:value-of select="normalize-space($status)"/>
                </VALUE>
            </xsl:when>
            <xsl:otherwise>
                <VALUE>CRTD</VALUE>
            </xsl:otherwise>
        </xsl:choose>
    </FIELD>
</SEGMENT>

Getting following error:

avax.xml.transform.TransformerException: com.sap.engine.lib.xsl.xslt.XSLException: -> com.sap.engine.lib.xsl.xpath.XPathException: Could not execute operation on Java Object. -> java.lang.reflect.InvocationTargetException
        at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:250)
        at com.sap.aii.ib.server.mapping.execution.AbstractMappingTransformer.transform(AbstractMappingTransformer.java:174)
        at com.sap.aii.ib.server.mapping.execution.XSLTMapping.executeStep(XSLTMapping.java:104)
        at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60)
        at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87)
        at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:54)
        at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:139)
        at com.sap.aii.ibrep.server.mapping.exec.ExecuteIfMapCommand.execute(ExecuteIfMapCommand.java:33)
        at com.sap.aii.ib.server.mapping.exec.CommandManager.execute(CommandManager.java:43)
        at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:40)
        at com.sap.aii.ibrep.server.mapping.MapServiceBean.execute(MapServiceBean.java:40)
        at sun.reflect.GeneratedMethodAccessor882.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
        at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
        at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50)
        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
        at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:37)
        at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:21)
        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
        at com.sap.engine.services.ejb3.runtime.impl.Interceptors_MethodRetry.invoke(Interceptors_MethodRetry.java:46)
        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191)
        at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23)
        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
        at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)
        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
        at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)
        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
        at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)
        at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:172)
        at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:99)
        at com.sun.proxy.$Proxy3652.execute(Unknown Source)

i think there is issue in XSLT. other methods from JAVA are working fine but getting error for this one.

0

There are 0 answers