Illegal Input exception in lookup Api

Hi all,
We have a custom scheduled task to populate the lookup values. The task was working fine. But as per my observation whenever we are getting any values need to go in decode contains *<,>,--* like values "*dummy <ch>*","*the org -- organization*" it throws illegal input exception. The same values when we tried to put through design console was accepted. Does lookup operations api doing some validation? if so is there any way to off this as we cannot ensure about the data containing these special chars. TIA

You would have to edit conf/xlconfig.xml to contain this:
<AppFirewall>
<SecurityLevel>0</SecurityLevel>
</AppFirewall>
(starting at 9.1 this defaults to 1)
However, be aware that this will turn off all sql injection checking in all inputs (api calls, recon data, etc.)
The web ui might still do its own checking on top of that, I actually cannot remember off the top of my head.

Similar Messages

  • Exception when calling SOAP Lookup-API async

    Hello,
    i'm calling a SOAP-Comunication Channel (Lookup-API) out of my MessageMapping. The WebService Called is <u>asynchron</u> because i just send some data and i don't care about the result. The WebService itselfs is implemented on our XI. In other words: we call us self.
    In order to call my WebService asynchronous, i added <i>&QualityOfService=ExactlyOnce</i> at the end of the URL. The SOAP-Action is:
    <i>http://sap.com/xi/WebService/soap1.1</i>
    The problem is: the WebService works perfekt! But: in my mapping i get
    nevertheless the following exception:
    Errorcom.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel SOAP_Receiver_SetIdocStatusAsync (Party: , Service: SetIdocStatus, Object ID: f6b1ce38e9fa332cba4eb1a6f0a3e17f) null com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel SOAP_Receiver_SetIdocStatusAsync (Party: , Service: SetIdocStatus, Object ID: f6b1ce38e9fa332cba4eb1a6f0a3e17f) null at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:96) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.af.service.api.AFException at com.sap.aii.af.service.api.AdapterAccess.call(AdapterAccess.java:122) at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:87) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    The problem is: i don't know how to check for the HTTP-Header, because
    my call
    <i>SOAPOutPayload = accessor.call(payload);</i>
    throws the mentioned exception, even though it works behind the scene.
    Is it possible to check for the HTTP-Response-Code in the catch block?
    We want to avoid an synchronous scenario because we don't need the result and the WebService is rather slow.

  • Help on Lookup API

    Hi,
      While I was searching for stuff on Lookup API, I came across the two good blogs talking about different ways to do Lookups.
    RFC Look up - Use this crazy piece for any RFC Mapping Lookups!
    RFC lookup with communication channel - The specified item was not found.
    But  I couldnt find an answer for the below questions.Would appreciate if  anyone can let me know,
    1)  Which method has a good performance - Lookup using JCo or Lookup using RFC adapter(using communication channel)
    2)  Is there any guideline to decide between JCo and RFC adapter method.
    2)  If  I am using the JCo method to do the lookup, how can I provide the  connection details(host,username,password) at runtime.
    Thanks in advance!

    I think he is asking as to how we can pass the values dynamically using JCO.
    Try creating a .properties file and store it in each instance of XI in a specific folder and code the JCO as follows.
    try {
                    properties = new Properties();
                    properties.load(new FileInputStream(("/usr/sap/properties/xiprop.properties")));
                    client = properties.getProperty("jco.client.client");
                    user = properties.getProperty("jco.client.user");
                    passwd = properties.getProperty("jco.client.passwd");
                    ashost = properties.getProperty("jco.client.ashost");
                    sysnr = properties.getProperty("jco.client.sysnr");
                    // Change the logon information to your own system/user
                    mConnection = JCO.createClient(client, user, passwd, "EN", ashost, sysnr );
                    // connect to SAP
                    mConnection.connect();
                    // create repository
                    mRepository = new JCO.Repository( "SAPLookup", mConnection );
                    // Create function
                    JCO.Function function = null;
                    //write your code here
                    IFunctionTemplate ft = mRepository.getFunctionTemplate("FunctionModuleName");
                    function = ft.getFunction();
                    // Obtain parameter list for function
                    JCO.ParameterList input = function.getImportParameterList();
                    // Pass function parameters
                    input.setValue( a , "importValuetoFM" );
                    mConnection.execute( function );
                    ret = function.getExportParameterList().getString( "exportValueofFM" );
            } catch (Exception e) {
                    e.printStackTrace();
                    //Disconnect the connection
            } finally {
                    if (mConnection != null) {
                                    try {
                                                    mConnection.disconnect();
                                            } catch (Exception ex) {
                                                    ex.printStackTrace();
    return ret;
    BR

  • RFC Lookup API error in PI 7.1?

    Hi Guys,
    The RFC lookup which has been developed in PI 7.0 using the lookup API is unable to find the CC defined in the directory for a business system. after upgrading to PI 7.1. We are getting the error as below. This look up works perfectly fine in Dev(PI 7.1) and QA(PI 7.1) but in Prod(PI 7.1). We are on PI 7.1 EHP1 SP03.
    Errorcom.sap.aii.mapping.lookup.LookupException: Plain exception:Error when calling an adapter by using the communication channel In_RFC_SAPLookUp (Party: , Service: Test, Object ID: 74e5e47336133351bebcb8c6a6bc68c8) The channel with object ID 74e5e47336133351bebcb8c6a6bc68c8 could not be found in the Integration Server Java Cache. Check if the channel exists in the Integration Builder Directory and execute a refresh of the Java Cach.
    We did the cache refresh and also restarted the prod server but the error still persists. We have tried connecting to the prod receiver sap system from QA and the lookup works perfectly fine. We dont understand why it dosent work in prod.
    any help or suggestions would be really appreciated.
    Thanks,
    Srini

    Hi Rajesh,
    The CC has the correct business system. We have also tried even by creating a new cc and it always says it cannot find the defined cc from the RFC lookup. We are passing this value as a constant value to the RFC lookup.
    I could not understand why it is not finding only this CC? Is this something that RFC lookup is unable to find the CC?
    any help would be appreciated
    Thanks,
    Srini

  • Lookup API - asynchonous SOAP Adapter Queue

    Hi,
    I have a question about the queue handling, when you use the Lookup API of the SAP PI. ([Sap Help Lookup API|http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm])
    When I call a synchronous Web Service via SOAP within a message mapping via the Lookup API, the synchronous web service is called via the "SOAP_http://sap.com/xi/XI/SystemSend" adapter queue. But "SOAP_http://sap.com/xi/XI/SystemSend" is the asynchronous SOAP sender adapter queue. The threads which handle the calls are not made for handling synchronous calls. If the synchonous web service has a high response time (10 seconds for example). The thread is blocked for this time.
    Synchronous threads are not blocked that long.
    Is there a way to configure which adapter queue has to be used by the lookup API?
    Regards,
    Torsten

    Hello,
    Regarding the error in the trace:
    nested exception is: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5070] Already started operation with application sap.com/com.sap.aii.adapter.soap.app in the cluster. No other operation with this application is allowed at the moment, because it is locked in the enqueue server or the lock from there has been manually removed. at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.startApp(DefaultContainerRepository.java:236) at
    please see note
    1339258 PI Adapter applications locked during start up
    You could try restarting the SOAP Adapter applications :
    com.sap.aii.adapter.soap.app
    com.sap.aii.adapter.soap.lib
    from the JEE NWA
    -> Operation Management
      -> Systems
       -> Start and Stop
        -> Java EE Applications
    http://wiki.sdn.sap.com/wiki/display/XI/start_stop_applications
    Regards,
    Sarah

  • "illegal threadstate exception"

    Hello
    I have 2 panels
    1.1st panel
    2.2nd panel
    Firstly I have created thread using new keyword at the start of the program
    In the 2nd panel my thread is running.When i go back to the 1st panel i kill the thread by making the boolen flag true that breaks out of the thread(as no thread.kill API available in Java2). Now my problem is that when i move to the 2nd panel and doing thread.start(), it is giving "illegal threadstate exception".
    I want to know that after killing will i can not start the thread with the same object that i have created once at the beginning.
    If i am doing new i.e. creating object everytime it is working fine but i wonder whether the previous thread object is garbage collecting or not as i m not keeping reference to that object.
    Any help will be appericiated.
    Thanks
    Kapil

    A given Thread can only be start()ed once.
    If i am doing new i.e. creating object everytime it
    is working fine but i wonder whether the previous
    thread object is garbage collecting or not as i m not
    keeping reference to that object.Just like any other object: If you keep a reference to it around, it won't get GCed. If you don't, it will be eligible for GC.for (...) {
        Thread t = new Thread(...);
        t.start();
    } In the above loop, we create many Thread objects, but our references to each one goes away when that loop iteration ends. The only references left are the ones the VM holds, and those go away when the thread dies.

  • af:attribute Illegal state exception on tomcat

    I am getting Illegal state exception, when I use <af:attribute> referencing a row variable in treeTable :
    java.lang.IllegalStateException
         com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:382)
         com.sun.faces.context.FacesContextImpl.getApplication(FacesContextImpl.java:120)
         oracle.adfinternal.view.faces.taglib.AttributeTag.doStartTag(AttributeTag.java:94)
         org.apache.jsp.ObjectList2_jspx._jspx_meth_af_attribute_0(ObjectList2_jspx.java:767)
         org.apache.jsp.ObjectList2_jspx._jspx_meth_af_commandLink_4(ObjectList2_jspx.java:749)
         org.apache.jsp.ObjectList2_jspx._jspx_meth_af_column_3(ObjectList2_jspx.java:543)
         org.apache.jsp.ObjectList2_jspx._jspx_meth_af_treeTable_0(ObjectList2_jspx.java:232)
         org.apache.jsp.ObjectList2_jspx._jspx_meth_af_form_0(ObjectList2_jspx.java:206)
         org.apache.jsp.ObjectList2_jspx._jspx_meth_afh_body_0(ObjectList2_jspx.java:188)
         org.apache.jsp.ObjectList2_jspx._jspx_meth_afh_html_0(ObjectList2_jspx.java:152)
         org.apache.jsp.ObjectList2_jspx._jspx_meth_f_view_0(ObjectList2_jspx.java:126)
         org.apache.jsp.ObjectList2_jspx._jspService(ObjectList2_jspx.java:97)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:134)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:266)
         oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:164)
         oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         oracle.adfinternal.view.faces.webapp.FacesFilter.doFilter(FacesFilter.java:89)
    If I use f:attribute, there is no exception, but also the attribute is not created. If I use f:attribute or af:atribute with a string value, it works OK.
    Here is my page:
    <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/EA14/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/EA14" >
    <jsp:directive.page contentType="text/html;charset=utf-8"/>
    <f:view>
         <afh:html>
         <afh:head title="Main">
              <meta http-equiv="Content-Type"
                   content="text/html; charset=windows-1250"></meta>
         </afh:head>
         <afh:body>
              <af:form>
    <af:treeTable var="row" value="#{s.userObjectTreeModel}">
         <f:facet name="nodeStamp">
              <af:column>
                   <f:facet name="header">
                        <af:outputText value="User Objects" />
                   </f:facet>
                   <af:outputText value="#{row.item.userObjectName}" />
              </af:column>
         </f:facet>
         <af:column>
              <f:facet name="header">
                   <af:outputText value="Type" />
              </f:facet>
                   <af:outputText value="Micromart" rendered="#{row.item.micromart}" />
                   <af:outputText value="Group" rendered="#{row.item.userGroup}" />
                   <af:outputText value="Object" rendered="#{row.item.userObject}" />
         </af:column>
         <af:column>
              <f:facet name="header">
                   <af:outputText value="Status" />
              </f:facet>
                   <af:outputText value="#{row.item.status}" />
         </af:column>
         <af:column>
              <f:facet name="header">
                   <af:outputText value="Actions" />
              </f:facet>
              <af:commandLink text="Edit" actionListener="#{s.selectUserObject}"
                   rendered="#{row.item.userObject}">
                   <af:attribute name="item" value="#{row.item.userObjectName}" />
              </af:commandLink>          
         </af:column>
    </af:treeTable>
              </af:form>
         </afh:body>
         </afh:html>
    </f:view>
    </jsp:root>
    and here is server.xml :
    <?xml version = '1.0' encoding = 'ISO-8859-1'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <!-- Faces API parameter -->
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    <!--param-value>server</param-value-->
    </context-param>
    <!-- ADF Faces by default uses an optimized client-side state saving
    mechanism. To disable that, uncomment the following -->
    <!--context-param>
    <param-name>oracle.adf.view.faces.CLIENT_STATE_METHOD</param-name>
    <param-value>all</param-value>
    </context-param-->
    <!-- Whether or not to turn on Oracle DMS metrics -->
    <!-- set to "true" to enable DMS metrics in an OC4J environment. -->
    <!-- Then you can go to
    http://<hostname>:<port>/<context-root>/servlet/Spy -->
    <context-param>
    <param-name>oracle.adf.view.faces.ENABLE_DMS_METRICS</param-name>
    <param-value>false</param-value>
    </context-param>
    <!-- Faces Filter -->
    <filter>
    <filter-name>faces</filter-name>
    <filter-class>oracle.adfinternal.view.faces.webapp.FacesFilter</filter-class>
    <init-param>
    <param-name>faces-servlet-url-pattern</param-name>
    <param-value>/faces/*</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    <!-- Faces Filter Mappings -->
    <filter-mapping>
    <filter-name>faces</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <servlet-name>facesS</servlet-name>
    </filter-mapping>
    <!-- Faces Servlet -->
    <servlet>
    <servlet-name>facesS</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <!-- On some version of OC4J, the following is needed when using jsf 1.0 -->
    <!--servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>oracle.jsp.runtimev2.JspServlet</servlet-class>
    <init-param>
    <param-name>tags_reuse_default</param-name>
    <param-value>none</param-value>
    </init-param>
    </servlet-->
    <!-- Faces Servlet Mappings -->
    <servlet-mapping>
    <servlet-name>facesS</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <!-- Welcome Files -->
    <welcome-file-list>
    <welcome-file>index.jspx</welcome-file>
    </welcome-file-list>
    <!-- ADF Faces Tag Library -->
    <taglib>
    <taglib-uri>http://xmlns.oracle.com/adf/faces/EA14</taglib-uri>
    <taglib-location>/WEB-INF/af.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://xmlns.oracle.com/adf/faces/EA14/html</taglib-uri>
    <taglib-location>/WEB-INF/afh.tld</taglib-location>
    </taglib>
    <!-- Faces Core Tag Library -->
    <taglib>
    <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
    <taglib-location>/WEB-INF/jsf_core.tld</taglib-location>
    </taglib>
    <!-- Faces Html Basic Tag Library -->
    <taglib>
    <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
    <taglib-location>/WEB-INF/html_basic.tld</taglib-location>
    </taglib>
    <!-- Survey Demo (Custom) Tag Library -->
    <taglib>
    <taglib-uri>http://xmlns.oracle.com/adf/faces/EA14/demo</taglib-uri>
    <taglib-location>/WEB-INF/survey.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://xmlns.oracle.com/adffacesdemo</taglib-uri>
    <taglib-location>/WEB-INF/uixdemo.tld</taglib-location>
    </taglib>
    </web-app>
    I use Tomcat 5.0.18 (embeded in Eclipse for web) and ADF Faces ea14 (with ea13 was the same problem.)
    Thanks for any hints...

    When I refresh the page after this exception, the content is displayed correctly. When I make new request on this page, I get new Illegal state exception, after the refresh the content is displayed correctly again ...

  • Value mapping performance using LookUp API

    All,
    We are using Value mapping look up from an external table using JDBC adapter and Lookup API. The scenario works good, but the performance is a hit for us as it is taking 7 seconds for the first step and the subsequent steps are taking much longer. In the performance header it shows that the steps "DB ENTRY QUEUING" and "DB SPLITTER QUEUING" are taking 90% of the time even though mapping execution is real quick.
    We tried the below things which did not help us analyze or isolate the problem.
    1. We increased the number of dialog processes from 3 to 8. (Optimal value should be 5)
    2. We tested the scenario using Value mapping in ID instead of external table. But it is almost taking the same time in the above two steps mentioned.
    I would like to know whether any kind of configuration settings to be done on the server like "specifying connection pool capabilities" etc...
    Any pointers would be really appreciated.
    Thanks and Regards,
    GP

    Hi,
    Have you seen this weblogs by Prasad recently:
    /people/prasad.illapani/blog/2007/03/08/performance-tuning-checks-in-sap-exchange-infrastructure
    /people/prasad.illapani/blog/2007/04/20/performance-tuning-checks-in-sap-exchange-infrastructurexi-part-ii
    Also are you doing multiple lookups or a single lookup? If you are using multiple lookup for multiple fields which has the same logic then try to use global variables.
    ---Satish

  • Character translation error in Mapping Lookup API (RFC)

    Dear all,
    I am new to XI and got a question concerning XI Mapping Lookup API - I send an RFC Request, which comes back as RFC Response(XML), that I fill in a String to map on.
    My problem is, characters such as "Ä,ä,Ü,ß" and so on come back pretty weird and I also got a lot of quotes in my String. Could somebody please give me a hint how to move on with this..
    thanx in advance
    P.S. Is it usefull to handle this problem using the DOM Parser instead holding the response in a string? 
    Info: called system is R/3 4.6b, XI runs on 6.4 SR 16

    Dear all - thanks for your very fast help but I still have problem with the wrong character...
    @Michal - Using this coding (the easiest way, I found from the WebLog) to convert the Payload type to String, delivers the result I have  shown at the end,  so could you give me please some approach how to handle this
                   Payload resultOfCall = accessor.call(payload);
                   InputStream in = resultOfCall.getContent();
                   out = new ByteArrayOutputStream(1024);
                   byte[] buffer = new byte[1024];
                   for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
                        out.write(buffer, 0, read);
                   content = out.toString();
                   return content;
    Result:
    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;rfc:Z_GETFTXC108TXTFROMFILE2.Response xmlns:rfc=&quot;urn:sap-com:document:sap:rfc:functions&quot;&gt;&lt;SCENOEDITXTSTRUCT&gt;&lt;MANDT&gt;030&lt;/MANDT&gt;&lt;SCENARIOID&gt;TVPN&lt;/SCENARIOID&gt;&lt;FILENAME&gt;/usr/sap/text3.txt&lt;/FILENAME&gt;&lt;FILETYPE&gt;ASC&lt;/FILETYPE&gt;&lt;TEXT1&gt;Kleines Regengesicht  aaLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#132;äÃ&#156;ü2 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#132;äÃ&#156;ü3 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678906 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#132;äÃ&#156;ü3 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;8 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#156;üÃ&#150;ö9 Ã&#132;äBbCcDdEeFfGgÃ&#150;öIxxSTRINGENDE&lt;/TEXT1&gt;&lt;TEXT2&gt;2 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#132;äÃ&#156;ü1234567890123456789012345678901234567890123456789012345678903 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#132;äÃ&#156;ü7 Ã&#132;äBbCcDdEeFfGgHhIiJjKkLlMmNnÃ&#150;öPpQqRrSsTtÃ&#156;üVvWwXxYyZzÃ&#159;Ã&#159;Ã&#150;öÃ&#156;ü8 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#156;üÃ&#150;ö9 Ã&#132;äBbCcDdEeFfGgÃ&#150;öIxxSTRINGENDE&lt;/TEXT2&gt;&lt;TEXT3&gt;3 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Kleines Regengesicht  aaLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#132;äÃ&#156;ü3 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678906 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#132;äÃ&#156;ü7 Ã&#132;äBbCcDdEeFfGgHhIiJjKkLlMmNnÃ&#150;öPpQqRrSsTtÃ&#156;üVvWwXxYyZzÃ&#159;Ã&#159;Ã&#150;öÃ&#156;ü8 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#156;üÃ&#150;ö9 Ã&#132;äBbCcDdEeFfGgÃ&#150;öIxxSTRINGENDE&lt;/TEXT3&gt;&lt;TEXT4&gt;7 Ã&#132;äBbCcDdEeFfGgHhIiJjKkLlMmNnÃ&#150;öPpQqRrSsTtÃ&#156;üVvWwXxYyZzÃ&#159;Ã&#159;Ã&#150;öÃ&#156;ü7 Ã&#132;äBbCcDdEeFfGgHhIiJjKkLlMmNnÃ&#150;öPpQqRrSsTtÃ&#156;üVvWwXxYyZzÃ&#159;Ã&#159;Ã&#150;öÃ&#156;ü2 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#132;äÃ&#156;ü123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890Kleines Regengesicht  aaLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#132;äÃ&#156;ü1234567890123456789012345678901234567890123456789012345678908 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÃ&#159;Ã&#159;Ã&#156;üÃ&#150;ö9 Ã&#132;äBbCcDdEeFfGgÃ&#150;öIxxSTRINGENDE&lt;/TEXT4&gt;&lt;TEXT5&gt;&lt;/TEXT5&gt;&lt;/SCENOEDITXTSTRUCT&gt;&lt;/rfc:Z_GETFTXC108TXTFROMFILE2.Response&gt;
    Thnaks in advance!

  • Lookup API - SPRAS value returned is not correct

    Hi All
    We are using the lookup API of XI to make a lookup in the SAP system and return values such as LAND1, and SPRAS. SPRAS has 2 kindoff value, one is the display value which is a 2 character value, and then the actual value which is a single character value. Internally a conversion routine takes care of converting this 2 character value to single character. For instance the countrykey of Poland is PL and its display SPRAS value is PL and actual value is L.
    While unit testing we get the correct value of 'L', but when we do the integration testing we get the display value of 'PL'. This is a problem we face when we use the Lookup API. But when I use a JCO call to make a lookup, I get the correct value being returned.
    This is a weird behavior, I am not sure if I overlooked something while using the lookup API. I even tried changing the function module to return a single char value, but still the wrong value is being returned with the lookup API. Could it be an issue with the Lookup API ??
    I used the code given in the following weblog,
    /people/francesco.bersani/blog/2007/03/05/data-lookup-optimized
    Any suggestion friends.
    regards
    Sameer

    Sameer,
    Using a single Function Module should not be an issue at all.
    Maybe there is some problem with,
    A) Either the logic of the Function Module written in R3
    B) Logic of your LookUp Code.
    It would be very difficult to say why you are facing this issue without looking at the code and the RFC but the way I see look up's if the FM code is valid and the Lookup Code is as per the corresponding Logic there should be no issue at all.
    I would suggest that you use the same test data that is causing the issue to test the FM in your R3 system and check what it returns . Is the output as expected. If yes, then time to look into your LookUP code.
    Add Trace statements and use this for debugging. Have found that they really help in real time to understand what is going wrong and why.
    Regards
    Bhavesh
    PS : Thanks for those encouraging words . It is also nice to see detailed questions on SDN that make life easy for everyone.

  • Illegal state exception in filters can any help me plzzzzzzz

    i want to check the clients status i mean whether the request is coming from new client or already using client , if clients request is new one then the filter has to redirect to some other login page and also if the request is asked to access the authenticated resource then also he want to force to redirect to login page.If the user is logged in and his session is not expired and if session is valid then he can access the requested url as per his role....can any one suggest the code plzzzzzzzzz
    here is my code but iam getting the illegal state exception as shown below...
    package uk.co.lex.interactive.authentication.action;
    import java.io.IOException;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class AuthenticationFilter implements Filter {
    private FilterConfig filterConfig=null;
    HttpSession session=null;
         public void init(FilterConfig filterConfig) throws ServletException {
              //TODO Auto-generated method stub
              this.filterConfig=filterConfig;
              System.out.println("---Authentication filter initialized---");
         public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
              // TODO Auto-generated method stub
              HttpServletRequest req=(HttpServletRequest)request;
              HttpServletResponse res=(HttpServletResponse)response;
                   String reqSessId=req.getRequestedSessionId();
              if(reqSessId!=null)
                   {System.out.println("-------session is valid and the same client is using the resource111---");
                         if(req.isRequestedSessionIdValid())
                            System.out.println("-------session is valid and the same client is using the resource222---");
                            System.out.println("---requested sessid"+reqSessId);
                           if(req.isRequestedSessionIdFromCookie()||req.isRequestedSessionIdFromURL())
                                System.out.println("-------session is valid and the same client is using the resource333---");
              }else
              res.sendRedirect(req.getContextPath()+"/"+"checkUser.do");
                        System.out.println("------it is new session so it redirected to loginpage from authentication filter-------");
              else
                   res.sendRedirect(req.getContextPath()+"/"+"checkUser.do");
                   System.out.println("------it is new session so it redirected to loginpage from authentication filter-------");
              chain.doFilter(request,response);
         public void destroy() {
              // TODO Auto-generated method stub
              this.filterConfig=null;
              System.out.println("-----authentication filter destroyed---");
    11:03:18,693 ERROR [[action]] Servlet.service() for servlet action threw exception
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
         at org.apache.catalina.connector.Request.doGetSession(Request.java:2195)
         at org.apache.catalina.connector.Request.getSession(Request.java:2017)
         at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:822)
         at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
         at org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:621)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:177)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at uk.co.lex.interactive.authentication.action.AuthenticationFilter.doFilter(AuthenticationFilter.java:63)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:595)

    I don't know that this is the root cause of your problem, but it certainly could be. When comparing two strings, you need to use the .equals() method, not ==.
    (except in the null case, where checking for null with == is perfectly okay).
    if (ViewProtectedPage.getValue("trycount").equals("1")
    ..etc
    Some other notes... use if/else if/else rather than a whole bunch of ifs, since all your statements are mutually exclusive. Maybe even put those lower ifs inside your outer "else" since you're obviously not going to reach them after a sendRedirect(). On that same note, place a return; after the sendRedirect() to state that the rest of the page need not be loaded/executed.

  • Illegal State Exception in JSP login

    I had a working log in/check password systems for a low security application. User types in username and password and this is sent to the checkpassword.jsp. Using Server variables I counted the number of attempts and if it was more than three, they were not allowed to try again that session. When I moved this page to newer version of Tomcat running in Apache rather than over IIS, my simple counting function no longer works and I can't for the life of me understand why I'm getting an Illegal State Exception with the following code:
    java.sql.ResultSet RS=statement.executeQuery("Select WUUSER, WUPWD FROM WEBUSER WHERE WUUSER='"+ (request.getParameter("username").toUpperCase()) + "' AND WUPWD= '" + (request.getParameter("password")) +"'");
    HttpSession ViewProtectedPage = request.getSession(true);
    HttpSession UserSession = request.getSession(true);
    if (RS.next())
    ViewProtectedPage.putValue("password","correct");
    //HttpSession UserSession = request.getSession(true);
    //allows username to be entered in upper or lower case
    UserSession.putValue("username",(request.getParameter("username")).toUpperCase());
    response.sendRedirect("tracking.jsp");
    else
    ViewProtectedPage.putValue("password","false");
    if (ViewProtectedPage.getValue("trycount")==null) {
    ViewProtectedPage.putValue("trycount","1");
    response.sendRedirect("loadtrackbadlogin.html");
    if (ViewProtectedPage.getValue("trycount")=="1") {
    ViewProtectedPage.putValue("trycount","2");
    response.sendRedirect("loadtrackbadlogin.html");
    if (ViewProtectedPage.getValue("trycount")=="2") {
    ViewProtectedPage.putValue("trycount","3");
    response.sendRedirect("loadtrackbadlogin.html");
    if (ViewProtectedPage.getValue("trycount")=="3") {
    response.sendRedirect("noentry.html");
    RS.close();
    It works fine if the user uses the proper username and password but crashes on me if they use the wrong info. I think it has something to do with my initialization of the user variables.

    I don't know that this is the root cause of your problem, but it certainly could be. When comparing two strings, you need to use the .equals() method, not ==.
    (except in the null case, where checking for null with == is perfectly okay).
    if (ViewProtectedPage.getValue("trycount").equals("1")
    ..etc
    Some other notes... use if/else if/else rather than a whole bunch of ifs, since all your statements are mutually exclusive. Maybe even put those lower ifs inside your outer "else" since you're obviously not going to reach them after a sendRedirect(). On that same note, place a return; after the sendRedirect() to state that the rest of the page need not be loaded/executed.

  • URGENT: Illegal Argument Exception for  RAW data type in Web Dynpro

    I am getting this error in the following scenario.
    I want to save the text fields from an interactive form to SAP through RFC enabled function module. The type in the model and controller is byte[]. I have converted the string attribute from view to save to the model. But the model dictionary in Web Dynpro project (model) has this type as Binary (meta data model through EFC). The type in SAP is RAW. I am going nuts since a week to solve this.
    IS this a bug? I am using NW04s - SP12. and NWDS 7.0.9
    Exception Details:
    The initial exception that caused the request to fail, was:
    java.lang.IllegalArgumentException
    at com.sap.dictionary.runtime.DdTypeBinary.format(DdTypeBinary.java:60)
    at com.sap.dictionary.runtime.DdTypeBinary.toString(DdTypeBinary.java:64)
    at com.sap.tc.webdynpro.clientserver.data.DataContainer.doFormat(DataContainer.java:1405)
    at com.sap.tc.webdynpro.clientserver.data.DataContainer.getAndFormat(DataContainer.java:1098)
    at com.sap.tc.webdynpro.clientimpl.xdp.renderer.data.XfdRenderer.renderAttributes(XfdRenderer.java:370)
    ... 41 more

    Issue with the RAW data types is resolved now. I have changed the data type of the field into String in the dictionary (web dynpro).. I have changed the corresponding getters and setter functions from byte[] to string. And everything working fine now. I got the Illegal Argument exception initially because I was trying to display the binary data type fields on the adobe form or view which I am not supposed to do.
    Also it is better to create separate view attributes in the context to get the values rather than mapping the model attributes directly in the form or view.
    Thank you one and all.
    Regards
    Vasu

  • WILL using JDBC API instead of LookUp APIs  hamper performance?????????????

    hi forum experts,
    i have done a JDBC call in a UDF in a message mapping to fetch some records from a database,
    i tried doing it with LookUp APIs,  but i think/found that LookUp APIs dont provide
    any method to execute DML statements, and moreover these APIs dont provide transactional behaviour....
    so i tried with JDBC APIs.......<<<<java.sql.*;>>>>.....where i used custom code to provide transactional behaviour........like explicitly using commit() methods. Where i m using Connection class...and in this case XI communication channels are not being used,,,....
    will using JDBC API instead of LookUp APIs hamper performance????????????

    Hi Sudeep,
    This will surely help u,
    /people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
    /people/william.li/blog/2007/03/30/using-jdbc-connection-pool-in-xi-message-mapping
    According to help.sap
    Use of Lookup API - Calls to other application systems are sometimes necessary to meet the following requirements:
    &#9679;     To get <b>read </b>access to application system data in the mapping program
    &#9679;     To call existing mapping routines in the application system
    So DML statements couldnt be used
    Additional help
    /people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
    <i>[Reward if helpful]</i>
    Regards,
    Prateek

  • RFC LookUp API

    Hi everybody,
    when usinf the RFC lookUp API in UDF you get a whole XML Document as the response.
    What is the easiest way to extract a special value from the InputStream .
    (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439)
    Regards Mario

    Hi Mario !
    Check this weblog:
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    specially the LookupHandler, the RFC part, after the execution of the RFC
    Regards,
    Matias.

Maybe you are looking for

  • IPhone 5 Camera stuck in Macro mode

    The camera on the back of the phone suddenly stopped working. When I open the app the picture is in focus for about a second then everything is blurry except when I hold the phone close to an object. I have restarted the phone and reset it but it is

  • Planned orders overlapping

    Hello, How to overlap the planned orders of the component to that of the superior material assembly? Lead time for the superior assembly for manufacturing 10 piece is 2 days. Say the start date is 31.12 and end date is 02.01 The lead time for the com

  • DVD-9 - DVDSP v3 or v4?

    About to make my first DVD-9 and we are currently using DVDSP 3. But I've read about issues that DVDSP has had in the past with DVD-9s and I wondered if upgrading to v4 is worth while to save us some hassles? Thanks

  • IPhoto keeps erasing my pics

    I installed 8.1.1. a couple of months ago and I haven't been able to download new photos since. Well, I can download them, but as soon as I close the program and open it again, they are gone. I've lost a bunch of pics because I erased them from my ca

  • What does no buffer mean in Transaction profile in ST03?

    Hello, I'd like to know what is the meaning of the <no buffer> in the column Report or transaction name in Transaction profile view in transaction ST03??? I'm running 4.6 Thanks in advance.