XI custom lookup function in mapping - error

Hi,
I created custom function to do RFC lookup with ECC. We are on PI 7 with service pack level 14. The custom function takes value of 4 attributes from source and does RFC call to do lookup.
The below is the import of classes I used in the function
javax.xml.parsers.DocumentBuilder;java.io.*;
org.xml.sax.*;
javax.xml.transform.dom.DOMSource;
javax.xml.parsers.*;
org.w3c.dom.*;
com.sap.aii.mappingtool.tf3.rt.ResultList;
com.sap.aii.mapping.*;
com.sap.aii.mapping.lookup.*;
com.sap.aii.mapping.lookup.Payload;
javax.xml.transform.stream.StreamResult;
javax.xml.transform.*;
in the code  I put warning trace as below -
trace.addWarning("INSIDE");
    //determine the communication channel
   Channel channel = LookupService.getChannel("DE1CLNT301", "RFC_O_FPATH" );
trace.addWarning("CHANNEL LOOKUP DONE");
  //get RFC Accessor for the channel
  accessor = LookupService.getRfcAccessor(channel);
trace.addWarning("ACESSOR LOOKUP DONE");
when I test run I get the below error:
Compilation of MM_O_MQ_I_SAP successful
INSIDE
CHANNEL LOOKUP DONE
Errorjava.lang.StringIndexOutOfBoundsException: String index out of range: -1
Can anyone help?
Thanks in advance

Thanks Amit. It worked. below is the trace error
CHANNEL LOOKUP DONE RFC_O_FPATH (Party: , Service: DE1CLNT301, Object ID: f9f592e7e0b3316480afcaa8d462a140)
BEFORE ACCESSOR GET CHANNEL
Exception is at : java.lang.String.substring(String.java:1444)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.extractCookieValue(HmiHttpClientImpl.java:318)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.extractCookie(HmiHttpClientImpl.java:307)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.getCookies(HmiHttpClientImpl.java:292)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.sendRequestAndReceiveResponseViaHttp(HmiHttpClientImpl.java:207)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.sendRequestAndReceiveResponse(HmiHttpClientImpl.java:108)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiClientAdapter.invokeMethod(HmiClientAdapter.java:88)
Exception is at : com.sap.aii.ibrep.server.lookup.SystemAccessorHmiClient.<init>(SystemAccessorHmiClient.java:64)
Exception is at : com.sap.aii.ibrep.server.lookup.SystemAccessorHmiClient.getInstance(SystemAccessorHmiClient.java:112)
Exception is at : com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:99)
Exception is at : com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:89)
Exception is at : com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClient.getSystemAccessor(LookupServiceProvider.java:76)
Exception is at : com.sap.aii.mapping.lookup.LookupService.getRfcAccessor(LookupService.java:249)
Exception is at : com.sap.xi.tf._MM_O_MQ_I_SAP_.RFC_GET_FILE$(_MM_O_MQ_I_SAP_.java:95)
Exception is at : sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Exception is at : sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Exception is at : sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Exception is at : java.lang.reflect.Method.invoke(Method.java:324)
Exception is at : com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:76)
Exception is at : com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:60)
Exception is at : com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:40)
Exception is at : com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:266)
Exception is at : com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326)
Exception is at : com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:415)
Exception is at : com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142)
Exception is at : com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118)
Exception is at : com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431)
Exception is at : com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169)
Exception is at : com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52)
Exception is at : com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301)
Exception is at : com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146)
Exception is at : com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319)
Exception is at : com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200)
Exception is at : com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136)
Exception is at : com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
Exception is at : com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
Exception is at : com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
Exception is at : java.security.AccessController.doPrivileged(Native Method)
Exception is at : com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
Exception is at : com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
ACCESSOR GET CHANNEL DONE
INPUTSTREAM CREATED
PAYLOAD XML
Errorjava.lang.NullPointerException

Similar Messages

  • Custom lookup

    hello every body
    I just begin siebel CRM ondemand and i don't know a lot about it.
    I want to create custom lookup functionality to populate custom fields on an On demand page. For example Lookup a Partner Account to the Opportunity Detail Page using the custom lookup. Do anywone know how to do that ?
    Maurice

    thank, but i don't understand very well how is the web service working.
    What i anderstand is that for using web-services to integrate with a website things i need to do:
    1. must send
    username = xxxx
    password = xxxx
    to the url = https://secure-ausomxapa.crmondemand.com/Services/Integration?command=login
    2. Then i will receive a sessionID
    3. Then using session id i should be using the web-service WSDL's
    But how to do this. You must build a program with what ?

  • Java Error in RFC Lookup in XSLT Mapping usinf Java helper class

    Hi All,
    I am doing RFC Lookup in XSLT Mapping using Java Helper class.
    The Lookup works fine when called one RFC at a time However my requirement is I want to do 2 Lookups.
    Both Lookups works when done individually however when I call both lookups in one mapping I get following error "javax.xml.transform.TransformerException: DOMSource whose Node is null."
    Following is the code I have written in XSLT for the lookup:
         <xsl:template name="Lookup_1">
              <xsl:param name="STDPN"/>
                   <rfc:RFC_READ_TABLE>
                        <QUERY_TABLE>KNA1</QUERY_TABLE>
                        <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$STDPN"/>
                             </TEXT></item>
                        </OPTIONS>
                        <FIELDS>
                             <item>
                                  <FIELDNAME>KUNNR</FIELDNAME>
                             </item>
                        </FIELDS>
                   </rfc:RFC_READ_TABLE>
              </xsl:variable>
              <xsl:variable name="response" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request, 'BS_D, 'cc_RfcLookup', $inputparam)"/>
              <xsl:element name="STDPN">
                   <xsl:value-of select="$response//DATA/item/WA"/>
              </xsl:element>
         </xsl:template>
         <xsl:template name="Lookup_2">
              <xsl:param name="BELNR"/>
                   <xsl:variable name="Query">AGMNT = '<xsl:value-of select="$BELNR"/>'</xsl:variable>
                   <xsl:variable name="request1">
                        <rfc:RFC_READ_TABLE>
                             <QUERY_TABLE>ZTABLE</QUERY_TABLE>
                             <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$Query"/>
                                  </TEXT></item>
                             </OPTIONS>
                             <FIELDS>
                                  <item>
                                       <FIELDNAME>KUNAG</FIELDNAME>
                                  </item>
                             </FIELDS>
                        </rfc:RFC_READ_TABLE>
                   </xsl:variable>
                   <xsl:variable name="response1" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request1, 'BS_D','cc_RfcLookup', $inputparam)"/>
                   <xsl:element name="BELNR">
                        <xsl:value-of select="$response1//DATA/item/WA"/>
                   </xsl:element>
         </xsl:template>
    My Question: Am I doing anything wrong? Or Is it possible to call multiple lookups in one XSLT?
    Thanks and Regards,
    Atul

    Hi Atul,
    I had the same problem like you had.
    The main Problem is that with the example code the request variable is created as NodeList object. In XSLT a variable is somekind of a constant and can't be changed. As the request object is empty after the first request the programm fails at the following line:
    Source source = new DOMSource(request.item(0));
    So I've created a workaround for this problem.
    In the call of the template I've put the request as a parameter object at the template call:
    <xsl:with-param name="req">
    <rfc:PLM_EXPLORE_BILL_OF_MATERIAL xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <APPLICATION>Z001</APPLICATION>
      <FLAG_NEW_EXPLOSION>X</FLAG_NEW_EXPLOSION>
      <MATERIALNUMBER><xsl:value-of select="value"/></MATERIALNUMBER>
      <PLANT>FSD0</PLANT>
      <VALIDFROM><xsl:value-of select="//Recordset/Row[name='DTM-031']/value"/></VALIDFROM>
      <BOMITEM_DATA/>
    </rfc:PLM_EXPLORE_BILL_OF_MATERIAL>
    </xsl:with-param>
    With this change the request will be provided as a String object and not as a NodeList object.
    Afterwards the RfcLookup.java has to be changed to the following:
    package com.franke.mappings;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.lookup.Channel;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.lookup.RfcAccessor;
    import com.sap.aii.mapping.lookup.LookupService;
    import com.sap.aii.mapping.lookup.XmlPayload;
    * @author Thorsten Nordholm Søbirk, AppliCon A/S
    * Helper class for using the XI Lookup API with XSLT mappings for calling RFCs.
    * The class is generic in that it can be used to call any remote-enabled
    * function module in R/3. Generation of the XML request document and parsing of
    * the XML response is left to the stylesheet, where this can be done in a very
    * natural manner.
    * TD:
    * Changed the class that request is sent as String, because of IndexOutOfBound-exception
    * When sending multiple requests in one XSLT mapping.
    public class RfcLookup {
         * Execute RFC lookup.
         * @param request RFC request - TD: changed to String
         * @param service name of service
         * @param channelName name of communication channel
         * @param inputParam mapping parameters
         * @return Node containing RFC response
         public static Node execute( String request,
                 String service,
                 String channelName,
                 Map inputParam)
              AbstractTrace trace = (AbstractTrace) inputParam.get(StreamTransformationConstants.MAPPING_TRACE);
              Node responseNode = null;
              try {
                  // Get channel and accessor
                  Channel channel = LookupService.getChannel(service, channelName);
                  RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   // Serialise request NodeList - TD: Not needed anymore as request is String
                   /*TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer();
                   Source source = new DOMSource(request.item(0));
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   StreamResult streamResult = new StreamResult(baos);
                   transformer.transform(source, streamResult);*/
                    // TD: Add xml header and remove linefeeds for the request string
                    request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+request.replaceAll("[\r\n]+", ""); 
                    // TD: Get byte Array from request String to send afterwards
                    byte[] requestBytes = request.getBytes();
                   // TD: Not used anymore as request is String
                    //byte[] requestBytes = baos.toByteArray();
                    trace.addDebugMessage("RFC Request: " + new String(requestBytes));
                    // Create input stream representing the function module request message
                    InputStream inputStream = new ByteArrayInputStream(requestBytes);
                    // Create XmlPayload
                    XmlPayload requestPayload =LookupService.getXmlPayload(inputStream);
                    // Execute lookup
                    XmlPayload responsePayload = accessor.call(requestPayload);
                    InputStream responseStream = responsePayload.getContent();
                    TeeInputStream tee = new TeeInputStream(responseStream);
                    // Create DOM tree for response
                    DocumentBuilder docBuilder =DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Document document = docBuilder.parse(tee);
                    trace.addDebugMessage("RFC Response: " + tee.getStringContent());
                    responseNode = document.getFirstChild();
              } catch (Throwable t) {
                   StringWriter sw = new StringWriter();
                   t.printStackTrace(new PrintWriter(sw));
                   trace.addWarning(sw.toString());
              return responseNode;
         * Helper class which collects stream input while reading.
         static class TeeInputStream extends InputStream {
               private ByteArrayOutputStream baos;
               private InputStream wrappedInputStream;
               TeeInputStream(InputStream inputStream) {
                    baos = new ByteArrayOutputStream();
                    wrappedInputStream = inputStream;
               * @return stream content as String
               String getStringContent() {
                    return baos.toString();
              /* (non-Javadoc)
              * @see java.io.InputStream#read()
              public int read() throws IOException {
                   int r = wrappedInputStream.read();
                   baos.write(r);
                   return r;
    Then you need to compile and upload this class and it should work.
    I hope that this helps you.
    Best regards
    Till

  • SSRS countrow Aggregate error(Aggregate and lookup functions cannot be used in query parameter expressions.)

    Below expression works fine with text box but gives error in dataset expression.
    ="SET FMTONLY OFF select  "+ join(Parameters!Column.Value,",") +" FROM pamcustom.dbo.vw_HFL_HFD_HotfileData INNER JOIN pamcustom.dbo.HFL_HFB_HotFileBatch  on BatchID = HFB_intBatchID where BatchID ="+Parameters!BatchId.Value+"
    and "+Parameters!cmbTranType.Value+" "+ iif(CountRows("DS_Aml_Mnr_Iss_Desc")=Parameters!Mnr_Iss_Desc.count," "," and aml_mnr_iss_desc in "+"('" & join(Parameters!Mnr_Iss_Desc.Value,"','")
    & "')")+iif(CountRows("ds_ReportingCategory")=Parameters!ReportingCategory.count," "," and ReportingCategory in "+"('" & join(Parameters!ReportingCategory.Value,"','") & "')")+iif(CountRows("ds_NAICSubGroup")=Parameters!NAICSubGroup.count,"
    "," and naicsubgroup in "+"('" & join(Parameters!NAICSubGroup.Value,"','") & "')")+iif(CountRows("ds_PortTrading")=Parameters!PortTrading.count," "," and porttrading in "+"('"
    & join(Parameters!PortTrading.Value,"','") & "')")+iif(CountRows("ds_GL_LE")=Parameters!GL_LE.count," "," and gl_le in "+"('" & join(Parameters!GL_LE.Value,"','") &
    "')")+iif(CountRows("ds_coagroup")=Parameters!cmbCoaGrp.count," "," and coagroup in "+"('" & join(Parameters!cmbCoaGrp.Value,"','") & "')")+iif(CountRows("Portfolio")=Parameters!cmbPort.count,"
    "," and portfolio in "+"('" & join(Parameters!cmbPort.Value,"','") & "')")+IIf(IsNothing(Parameters!txtSecID.Value)," "," and secid in ('"+Replace(Parameters!txtSecID.Value,",","','")+"')")+iif(IsNothing(Parameters!minPortFilter.Value)
    and IsNothing(Parameters!MinPort.Value)," "," and portfolio "+Parameters!minPortFilter.Value+Parameters!MinPort.Value)+iif(IsNothing(Parameters!maxPortFilter.Value) and IsNothing(Parameters!MaxPort.Value)," ","
    and portfolio "+Parameters!maxPortFilter.Value+Parameters!MaxPort.Value)+iif(IsNothing(Parameters!minCoaFilter.Value) and IsNothing(Parameters!txtMinCoa.Value)," "," and portfolio "+Parameters!minCoaFilter.Value+Parameters!txtMinCoa.Value)+iif(IsNothing(Parameters!maxCoaFilter.Value)
    and IsNothing(Parameters!txtMaxCoa.Value)," "," and portfolio "+Parameters!maxCoaFilter.Value+Parameters!txtMaxCoa.Value)
    I guess the error " Aggregate and lookup functions cannot be used in query parameter expressions." is because I am using CountRow to ensure that if all values of multi select all selected i will not use that filter in where clause.
    Pls. guide...

    Hi, Include your parameter total count in the dataset for parameter and instead of using countrows() function use the count from dataset in the expression.
    Hope this helps.........
    Ione

  • Error while creating Custom Defined Functions in Essbase

    <p>Hi All,<br>I am trying to create CDF(Custom Defined Functions) in Essbase. Iwant to create a function which take list of child member andreturn the first child. For this, i have created a java file called"ChildAccess.java" which contains the following code:<br>public class ChildAccess<br>{<br>public static char GetFirstMember(char [] members)<br>{<br>return members[0];<br>}<br>}<br>I have compiled and made jar file called"ChildAccess.jar" and pasted it at"ARBORPATH/java/udf". Then i restarted the Essbase Serverand run the following MaxL command to register the function<br>create or replace function '@ChildAccess' as<br>'ChildAccess.GetFirstMember'<br>spec '@ChildAccess(memberRange)'<br>comment 'adds list of input members'.<br>Till here i am not getting any error but when i am using thisfunction in my calc script as given below<br><br>FIX(@ChildAccess(@CHILDREN("Abc")))<br><br>it gives the following error<br>"Error:1200414 Error parsing formula for [FIX STATEMENT]<br>(line 2)"argument[1] may not have size[6] in function[@CHILDREN]"<br>NOTE: The SIZE[6] is giving the no. of child in member"ABC".<br><br>Thanks in Advance<br>Arpit</p>

    If you want to use the CDF in a FIX statement you need to make sure that it returns a member name rather than a number:<BR><i><BR>public class ChildAccess<BR>{<BR>    public static String GetFirstMember(String[] members)<BR>    {<BR>        return members[0];<BR>    }<BR>}<BR></i><BR>I prefer to define the function against a specific application rather than globally because you only need to restart the application in order to pick-up any modifications to the .jar file. So the MaxL function definition would be:<BR><i><BR>    create or replace function appname.'@_GETFIRSTMEMBER' as<BR>        'ChildAccess.GetFirstMember(String[])';<BR></i><BR>and in the calculation script the FIX statement would become:<BR><i><BR>    fix ( @member( @_GetFirstMember( @name( @children( "Abc" ) ) ) ) )<BR></i><BR>This looks a little messy so you can use a macro to simplify it:<BR><i><BR>    create or replace macro appname.'@GETFIRSTMEMBER'(single) <BR>        as '@member( @_GETFIRSTMEMBER( @name( @@1 ) ) )' <BR>        SPEC "@GETFIRSTMEMBER(memberRange)";<BR></i><BR>and then the FIX statement could be written:<BR><i><BR>    fix( @getfirstmember( @children( "PRODUCT" ) ) )<BR></i>

  • RFC Lookup mapping error in PI 7.1

    Hi Experts,
    I´m getting mapping error when executing interface SOAP -> WS (SAP ECC) . The message mapping call RFC Lookup to SAP ECC.
    When test the message mapping in Integration Builder the interface calls communication channel by RFC Lookup and works fine.
    That interface was imported from QAS environment and was working fine, but in PRD it doesn´t works.
    I checked the Interface Determination and the parameter is filled correctly with communication channel. The same communication channel was used on message mapping test.
    The Interface Determination in SXI_CACHE has no value assigned to parameter in PRD environment, otherwise, the same interface determination in SXI_CACHE in QAS environment there is value (CC ID).
    The problem persists after Cache Refresh in SXI_CACHE and CPA Cache.
    Can anyone help me ?
    Thanks in advance,
    Regis Ferrato
    Bellow the trace of error ocurred:

    Hi Regis,
    Please check my reply in your other thread:
    Re: RFC Lookup error cache in PI 7.1
    Regards,
    ---Satish

  • How does one create LOV Map between 2 fields for custom lookup mapping

    Hi there
    In Internet Expenses, Expense Report Line Detail we have two unrelated fields; namely Expense Location & Tax Code.
    The requirement is to map a default tax code to locations; basically when a user enters Expense Location then the mapped tax code value should default into field Tax Code.
    The location-tax code mapping is stored in a custom lookup (FND_LOOKUP_VALUES).
    My question is how does one go about implementing this?  For example is it possbile to create a new (hidden) LOV based on the lookup mapping & then create a Personalization LOV Mapping between the 3 LOV...  Or is it necessary to modify the Tax Code drop down Message Choice in JDeveloper?  Of course details are appreciated!
    FYI below is the relevant Personalization Structure from "Personalize Stack Layout: (NormalDetails)".
    Message Lov Input: Expense Location
    - Lov Mappings
    -- Lov Map: (lovMap1)
    -- Lov Map: (lovMap2)
    -- Lov Map: (lovMap3)
    - Message Text Input: Expense Location
    - Message Styled Text: Transaction Location
    - Message Text Input: Merchant Name Yes
    - Message Styled Text: Description
    - Message Check Box: Original Receipt Missing Yes
    - Message Choice: Tax Code
    - Message Check Box: Amount Includes Tax
    - Message Choice: Tax Code
    Many thanks
    G

    Hello all
    The correct & supported method is this:
    Extend the location LOV in JDeveloper & add a "default tax" attribute, this could be derived from a new location DFF storing the default tax code for each location. Now simply create a location Personalization LOV Map which takes this new location lov tax attribute & target it to the tax message choice field.
    That's my 2c worth anyway, so please give comment if you feel there is a better way.
    There is just one more little problem however... The requirement has changed! Now we require the tax code to default according to not one location field, but other fields too. For example if the user selects Expense Type of Beverage & Location of Netherlands then Tax Code should be NL19%, for Expense Type of Hotel then it should be NL6%; if the user ticks "Missing Receipt" field then it should over ride all others & set the code to NL0%.
    Any ideas?
    Many thanks
    G
    Edited by: user13363208 on 11-Aug-2010 06:51

  • Custom XPath Function not working - ORABPEL-09503 error

    I wrote a simple date conversion custom xpath function.
    1. Implemented IXPathFunction as mentioned in Clemens and Antony Reynolds blog.
    2. Also changed the xpath-functions.xml kept at C:\product\10.1.3.1\OracleAS_1\bpel\system\config\xpath-functions.xml and also at C:\product\10.1.3.1\OracleAS_1\bpel\domains\default\config\xpath-functions.xml (Not sure why this xml is in two places)
    3. Placed my class file at C:\product\10.1.3.1\OracleAS_1\bpel\system\classes and also made a jar and placed in C:\product\10.1.3.1\OracleAS_1\j2ee\home\applib.
    But when I run the process which uses this custom function, it is throwing the following error
    <Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>env:Server</faultcode>
    <faultstring>ORABPEL-09503 Invalid xpath expression. Error while parsing xpath expression "o2c:formatDateString('10/30/2007', 'MM/DD/yyyy', 'YYYY-MM-DD');", the reason is Error in expression: 'o2c:formatDateString('10/30/2007', 'MM/DD/yyyy', 'YYYY-MM-DD');'.. Please verify the xpath query "o2c:formatDateString('10/30/2007', 'MM/DD/yyyy', 'YYYY-MM-DD');" which is defined in BPEL process. </faultstring>
    </Fault>
    Can somebody help me to resolve this.

    My bad. I had a semi-colon after the expression. Now I am getting a different error
    <Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>env:Server</faultcode>
    <faultstring>ORABPEL-09500 XPath expression failed to execute. Error while processing xpath expression, the expression is "o2c:formatDateString('10/30/2007', 'MM/DD/YYYY', 'YYYY-MM-DD')", the reason is FOTY0001: type error. Please verify the xpath query. </faultstring>
    </Fault>

  • Error in Debugging a Custom Planning Function

    Hi All,
    I have a custom Planning function which is an ABAP code. I wanted to test the planning function and hence i set a breakpoint at the first line of the code. But when i execute the program RSPLS_PLSEQ_EXECUTE to debug my planning function, once i give the planning sequence and press F8, it gives an error instead of pointing to the breakpoint i set. Please help me out. Any pointers over this are greatly appreciated.
    Thanks
    Swaroop

    Hi Swaroop,
    take a look at RSPLS_PLSEQ_EXECUTE in transaction SE38. You will see the following line of code
    PERFORM execute_plseq  TABLES g_t_return USING seqnm variant.
    . Set a break-point here and execute the report. The debugger will stop at the above mentioned line. Press F6 to execute the statement and than double click on g_t_return. This table contains the messages. Please take a look at them. You can see the technical name of the message. To see them in a more readable format you can use transaction SE91.
    Regards Matthias Nutt
    SAP Consulting Switzerland

  • There is an error in the process of validating the lookup function in NW

    Hi,
    I got an error in the script logic validation.
    I  write a lookup function and validate the logic, In this one error occurred "Invalid lookup strecture: Invalid appl name"
    The logic code:
    *LOOKUP Staff_Additions                
    *DIM Salary="Salary_redis"     
    *DIM Category="Budget"     
    *DIM Client_Group="1010"     
    *DIM DataSrc="Input"     
    *DIM Intco="Non_Interco"     
    *DIM RptCurrency="LC"     
    *DIM Time="2011.MAR"
    *DIM Account="41000"
    *ENDLOOKUP
    *When Category.ID
    *Is = "Budget"
    *WHEN INTCO.ID
    *Is = "NON_INTERCO"
    *When JOB_TITLE.ID
    *Is = "NO_JOBTITLE"
    *When SALARY.ID
    *Is = "SALARY_REDIS"
    *When RptCurrency
    *Is = "LC"
    *When DATASRC
    *Is = "INPUT"
    REC(Expression=ROUND(.07692 Lookup(Staff_Additions),0),Time="2010.APR",SALARY="SALARY_MO")
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    Could you please send a solution for this as early as possible.
    Thanks and Regards,
    Krishna.

    Hi,
    I think you have confused in your syntax "Model" and "Lookup ID".
    The syntax of Lookup is this:
    *LOOKUP
    *DIM [:]="Value" | [.]
    So when you reference your lookup variable in the *REC statement it should look something like this:
    REC(Expression=ROUND(.07692 Lookup(<LOOKUP ID>),0),Time="2010.APR",SALARY="SALARY_MO")
    whereas now you have:
    REC(Expression=ROUND(.07692 Lookup(<MODEL>),0),Time="2010.APR",SALARY="SALARY_MO")
    HTH
    Matthias

  • Error using custom xpath function with XSL transformations in BPM

    Hi,
    We have created a custom xpath function for use with SOA Suite and BPM. This has been built as per specified within the http://docs.oracle.com/cd/E29597_01/dev.1111/e10224/bp_appx_functs.htm#SOASE11100. We have also reviewed the Oracle Sample for mapper-107-ExtensionFunctions (sample demonstrates the use of user-defined extension functions). This has been registered with jDeveloper and SOA within the oracle.soa.ext_11.1.1 (run ant to include in oracle.soa.ext.jar)
    We ideally want to use this is BPM within an xsl. However when consuming this function is either BPEL or BPM using an xsl, the xsl fails with an error such as:
    XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc("xsl/Transformation_1.xsl", $inputVariable.payload). The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: oramds:/deployed-composites/default/gwCustomXpathUtil_rev1.0/xsl/Transformation_1.xsl<Line 9, Column 113>: XML-22043: (Error) Extension function error: Method not found 'getWeekDayDate'. Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
    In an Assign it operates fine and returns the expected result. We have included a combination of both of the Config files (ext-mapper-xpath-functions-config.xml and ext-soa-xpath-functions-config.xml) in the META-INF folder, however neither allow the use of this function in the XSL.
    I believe there may be an issue getting the custom xpath functions within XSL files. Hence I have also raised an SR. Has anyone experiences of this?
    Our SOA / BPM suite environment is using 11.1.1.6.4 and has the following patches applied:
    13801175
    14406487 (11.1.1.6.4 SOA Bundle)
    13896993
    13088538
    Regards Dave
    Edited by: DavidGaskell on Mar 14, 2013 10:08 PM

    Hi All,
    I am also facing the same issue...Experts can you please help us.
    hi DavidGaskell, did you find any resolution, if so can you share it with me.....
    Thanks,
    RR

  • Bpel Server Does Not Catch Exceptions Thrown By Custom Xpath Functions

    Hi.
    I am using some custom xpath functions in a bpel process and whenever they fail I get an XPathExecutionError with summary:
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "<my function>", the reason is FOTY0001: type error.
    Please verify the xpath query.
    I am forcing my function to fail by giving a wrong input, which should result in an XPathFunctionException("Input does not respect format").
    There is a note on Metalink with ID 458434.1 on this subject which says that patch 5926809 should fix my problem.
    Patch 5926809 fixes Bug 5926809 - ORA:PARSEESCAPEDXML XPATH EXPRESSION FAILED TO EXECUTE FOTY0001: TYPE ERROR.
    I am using it, but it does not work :(
    I am using version 10.1.3.3.0 of App Server with various patch sets, including fix for bug 5926809.
    Has anyone suggestions on how to overcome this problem?
    Thanks

    Hello,
    I am trying to add a custom xpath function to the BPEL server, and I see that you made it work. I am using Oracle SOA Suite 10.1.3.3 and jDeveloper 10.1.3.4. I am using this function inside an xsl mapping file, although I am able to compile and deploy the Bpel Process to the server, it stops mapping where I placed the function and I have not seen any meaningful message from the domain/log/ files.
    Can you tell me how you did it?
    I think you will tell me faster than Oracle support, I already placed an SR but they just give me superficial advice.
    I appretiate your time and advice,
    Guillermo

  • Custom code in SSRS gives error when uploaded to report in CRM online

    Hi All;
    Below is my custom code 
    Function SumLookup(ByVal items As Object()) As Decimal
    If items Is Nothing Then
    Return Nothing
    End If
    Dim suma As Decimal = New Decimal()
    Dim ct as Integer = New Integer()
    suma = 0
    ct = 0
    For Each item As Object In items
    suma += Convert.ToDecimal(item)
    ct += 1
    Next
    If (ct = 0) Then return 0 else return suma
    End Function
    and this code is used in 
    =Code.SumLookup(LookupSet(Fields!new_mainprogrammeid.Value & "," &
    Fields!new_subprogrammeid.Value & "," &
    Fields!new_outputs.Value & "," &
    Fields!new_claimmonthid.Value,
    Fields!new_mainprogrammeid.Value & "," &
    Fields!new_subprogrammeid.Value & "," &
    Fields!new_outputs.Value & "," &
    Fields!new_claimmonthid.Value,
    Fields!new_fte.Value, "JobOutcome"))
    when this code is uploaded in CRM online report it gives an error 
    below is the error from the log file 
    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again. If this problem persists, contact your system administrator.Detail:
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
    <ErrorCode>-2147188072</ErrorCode>
    <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again. If this problem persists, contact your system administrator.</Message>
    <Timestamp>2014-10-07T14:21:25.5823821Z</Timestamp>
    <InnerFault i:nil="true" />
    <TraceText i:nil="true" />
    </OrganizationServiceFault>
    but when i remove the custom code and upload the lookup as below i dont get any error
    =(LookupSet(Fields!new_mainprogrammeid.Value & "," &
    Fields!new_subprogrammeid.Value & "," &
    Fields!new_outputs.Value & "," &
    Fields!new_claimmonthid.Value,
    Fields!new_mainprogrammeid.Value & "," &
    Fields!new_subprogrammeid.Value & "," &
    Fields!new_outputs.Value & "," &
    Fields!new_claimmonthid.Value,
    Fields!new_fte.Value, "JobOutcome"))
    I need to calculate the sum of fte hence needed the custom code
    Any help on this much appreciated
    Thanks
    Pradnya07

    Hi Simran08,
    According to your description, you fail to add your report to CRM due to the custom code. Right?
    In this scenario, based on my knowledge, I find two issues in your custom code.
    You pass the array Items as argument to the function. This array is from the LookupSet() function. However, it returns an concatenated string with commas. When you convert it into decimal, it will throw error.
    In your For Each loop part, we should follow the format below:
    For Each element In group
    [statements]
    [Exit For]
    [statements]
    Next [element]
    It seems you miss Item after Next.
    If you still have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • OSB: class not found in custom xpath function

    Hi,
    This week I was struggling with custom xpath functions in OSB. First I created a jar file that contained the class and the complete functionality including logging. It contains a class that does a DVM Lookup from the database. As a standalone function, called from JUnit test cases it functions perfectly. I use Apache commons logging with the libraries from the Weblogic installation.
    But when I put this OSB Util Services jar in the osb-home/config/xpath-function, it turns out that somehow the Weblogic Console gets a conflict with the commons-logging libraries. So I deployed it just as an application library in weblogic console, to solve this breakage.
    Then I created a simple separate class that only calls the method in the deployed library. I packaged that as a custom-osb-functions.jar for the osb-home/config/xpath-function. I managed to get if visible in OEPE. But when I test the xquery transformation resource on the server, I get:
    Error executing the XQuery transformation: {http://www.bea.com/wli/common/xquery}XQueryException: Error invoking custom xquery java function: java.lang.reflect.InvocationTargetException
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.wli.sb.stages.functions.XQueryExternalFunction.execute(XQueryExternalFunction.java:111)
    at com.bea.wli.sb.stages.functions.XQueryExternalFunction.init(XQueryExternalFunction.java:61)
    at weblogic.xml.query.iterators.FirstOrderIterator.open(FirstOrderIterator.java:169)
    at weblogic.xml.query.runtime.typing.SeqTypeMatching.open(SeqTypeMatching.java:129)
    at weblogic.xml.query.iterators.FirstOrderIterator.open(FirstOrderIterator.java:167)
    at weblogic.xml.query.runtime.core.ExecutionWrapper.open(ExecutionWrapper.java:58)
    at com.bea.wli.common.xquery.iterators.XQueryVariableMapper.getObjects(XQueryVariableMapper.java:459)
    at com.bea.wli.common.xquery.iterators.XQueryVariableMapper.getObjects(XQueryVariableMapper.java:447)
    at com.bea.wli.sb.test.transform.XQueryProcessor.invoke(XQueryProcessor.java:165)
    at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
    at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(Unknown Source)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:252)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Caused by: java.lang.NoClassDefFoundError: nl/darwin-it/osb/dvm/DomainValueMap
    at nl.darwin-it.osb.xpath.DomainValueMapLookup.lookupDVM(DomainValueMapLookup.java:35)
    ... 28 more
    Caused by: java.lang.ClassNotFoundException: nl.darwin-it.osb.dvm.DomainValueMap
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    ... 29 more
    Can any one explain to me how I can get the OSB Util Services jar library in the same classpath as the custom-xpath-functions jar, without having it put along the custom-xpath-functions jar in the osb-home/config/xpath-functions folder (since that somehow breaks the weblogic console)?
    How does the OSB classpath/classloading mechanisms work in this?
    Thanks in advance,
    Regards,
    Martien

    I am running the plugin registration utility but it generates the error mentioned below. I have verified the structure of my zip file and the structure of zip file is:
    -> SelfRegisterUserCustomValidator.zip
    ->Plugin.xml
    ->/lib/SelfRegisterUserCustomValidator.jar
    ->/resources/
    Following our contents of plugin.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.request.plugins.RequestDataValidator">
    <plugin pluginclass= "com.infotech.tra.CustomValidator.SelfRegisterUserCustomValidator" version="1.0.0" name="SelfRegisterUserCustomValidator">
    </plugin>
    </plugins>
    </oimplugins>
    Following is the error being generated:
    Enter name (complete file name with path) of the plugin file:
    /u01/oracle/Middleware/Oracle_IDM1/server/plugin_utility/SelfRegisterUserCustomValidator.zip
    [java] Java Result: 1
    [echo] Exception in thread "main" java.lang.NoClassDefFoundError: oracle/iam/platformservice/utils/PluginUtility
    [echo] Caused by: java.lang.ClassNotFoundException: oracle.iam.platformservice.utils.PluginUtility
    [echo] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    [echo] at java.security.AccessController.doPrivileged(Native Method)
    [echo] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    [echo] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    [echo] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    [echo] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    [echo] Could not find the main class: oracle.iam.platformservice.utils.PluginUtility. Program will exit.

  • FUNCTION NOT IMPLEMENTED error when calling C# method from SAP, why?

    Hi,
    I've build a server stub in order to get SAP calling my own methods that exist in the C# world, for that I developed several methods in a class that extends SAPServer and then implemented them...
    I added the special custom properties needed (Abap Name, length, etc) to the function and to its parameters, I've made the ABAP code required to call it...
    I've checked, every parameters that I place in ABAP (importing, exporting and tables) are also defined in C# (its 53 parameters) with the same name (in C# they are in capital letters and in a diferent order but I tried this before and it didn't matter)...
    The name of the function is the same...
    How can I get the 'FUNCTION NOT IMPLEMENT' error in SAP?
    What's going wrong when I get this error?
    Can anyone tell me?
    Is there any place in this site that has a error description and possible reasons?
    When I get a parameter wrong I get a different error (I tried to make smaller functions and they work fine).
    Thanks for the help,
    Nuno Felino
    Message was edited by: Nuno Felino

    Hi,
    I'll explain what I'm doing:
    - we have a set of services made in a C and VB that are available using an API in C#, these services must be available to SAP. So I have a program that will see what parameters the API service requires and makes a proxy so that SAP can call these services.
    To do this I must map SAP types with C#, build the function signature and then implement it. So I cannot use the wizard to do this
    Now, back to the question, what kind of customer attributes I got wrong to get that exception? The most logic is the AbapName of the function but they are equal (the one called in SAP and the one in the customer attributes of the function)...
    Thanks for the answer, can you give me any more hint?

Maybe you are looking for

  • HOW CAN I DOWNGRADE TO IOS 6.1.3 ON MY IPHONE 4S??????

    Look. I don't care how much time and effort apple put into the creation of iOS 7. If I wanted an Android device, I could've gone out to the store and bought one. iOS 7 ***** ***. I friggin' hate it. It's eating away at my battery and the color scheme

  • German umlaut in idoc to file scenario

    Hi, in our scenario we send MATMAS idocs to XI, map them and create a file using file adapter. Settings in file receiver communication channel: file type = text and  file encoding = UTF8. I also tried file encoding = ISO-8859-1 - both with the same r

  • Call a special function in the dll using Call Library Function Node????

    Dear all,       I am calling a special function in the dll using call library function node. There is a input parameter that it is a enum type in this function. I don't know how to deal this parameter for calling this function.Has anybody solved this

  • How to use session object in windows application

    hi, I am programming in jdeveloper. i need to know that while i m making a web application i can use a session object for the particular session. now i m builiding a windows application for my final semester and i need to insert product id and then i

  • Delivery Completed

    Dear All I have a Purchase Order, where I have put a tick on delivery completed check box on particular line item.But system still allows me to create a GR. Altough I do not have any tolerance maintained in info record. Please guide me Regards Manoj