JCo Connection / RFC in Pricing Userexit

Hi Experts,
Need your help: I have a requirement to make a RFC call in IPC Pricing Userexit.  First I made a simple test java class to make RFC call and run it locally without any problem. then I copy the same code to the Userexit, but it failed on the 1st statment JCO.createClient(.....).  Do I need to add a different JAR file to make JCo Connection work in the Userexit? Any advise or documentation?.
Thanks, Jin
Here is the error message:
Message: document not existing
--> com.sap.spe.document.rfc.DocIllegalArgumentException: document 49149C3E59925857E10000000A02901D not existing
at com.sap.spe.document.rfc.DocHandlerAdapter.appendProtocolLine(I[Ljava/lang/Object;)V(DocHandlerAdapter.java:123)
at com.sap.spe.document.rfc.GetPricingDocumentInfo.handleDocRequest()V(GetPricingDocumentInfo.java:73)
at com.sap.spe.document.rfc.DocHandlerAdapter.handleRequest()V(DocHandlerAdapter.java:72)
at com.sap.spe.base.util.jco.HandlerAdapter.handleRequest(Lcom/sap/vmc/RFCContainer/Call;)V(HandlerAdapter.java:103)
at com.sap.vmc.remserver.RFCDispatcher.privHandleRequest(Lcom/sap/conn/jco/JCoFunction;)V(RFCDispatcher.java:895)
at com.sap.vmc.remserver.RFCDispatcher.handleRequest(Lcom/sap/conn/jco/JCoFunction;)V(RFCDispatcher.java:673)
at com.sap.conn.jco.rt.JCoServer.dispatchRequest(Lcom/sap/conn/jco/rt/AbapFunction;)V(JCoServer.java:1605)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.dispatchRequest(Lcom/sap/conn/jco/rt/JCoServer;Ljava/lang/String;)V(MiddlewareJavaRfc.java:2387)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.listen(Lcom/sap/conn/jco/rt/JCoServer;Ljava/lang/String;)V(MiddlewareJavaRfc.java:1694)
at com.sap.conn.jco.rt.JCoServer.listen()V(JCoServer.java:1375)
at com.sap.conn.jco.rt.JCoServer.run()V(JCoServer.java:1299)
at com.sap.vmc.remserver.RfcServer.run()V(RfcServer.java:386)
at java.lang.Thread.startup(Z)V(Thr
Thanks, Jin

Hello Jin,
IPC does make calls to CRM . To do so it maintains a JCo connection. We got to leverage this connection object and make calls to our RFC. We can use the get_current_connection(); from connection_factory.
import com.sap.mw.jco.JCO;
import com.sap.sce.engine.ddb_inst;
import com.sap.sxe.db.*;
import com.sap.sxe.db.imp.rfc.*;
import com.sap.mw.jco.IFunctionTemplate;
import com.sap.mw.jco.IRepository;
// For the default connection
JCO.Client crmJCO = null;
try{
/ RFC and JCO connection to CRM
     connRFC cRFC = (connRFC)connection_factory.get_current_connection();
     crmJCO = cRFC.getIdleConnection();
}catch(Exception e){
     log_api.log_write_msg("LOG1", "LOG2",1,
       "Error establishing JCO connection to CRM: "+ e);
// Now for the BAPI (RFC calls)
try{
     IRepository repository = JCO.createRepository
                           ("<my BAPI RFC module>", crmJCO);
     IFunctionTemplate ftemplate = repository.getFunctionTemplate
                          ("<my BAPI RFC module>");
     JCO.Function bapiFunc= new JCO.Function(ftemplate);
// Set your IMPORT, EXPORT, TABLE parameters here
// Call the JCo function
     crmJCO.execute(bapiFunc);
// Process the output.
}catch(Exception e){
     log_api.log_write_msg("LOG3", "LOG4",1,
       "Error calling BAPI "+ e);
/// DO NOT FORGET TO CLOSE ***+++ MUST DO +++***
}finally{
     if(crmJCO != null)
          JCO.releaseClient(crmJCO);
Hence this is using standard connection, no need for any additional jars.
Easwar Ram
http://www.parxlns.com

Similar Messages

  • RFC JCO connection

    Hi,
    Wanted to create JCO connection from EP to CRM server . Can you please guide how to create JCO conenction.
    As per my knowledge in Visual admin - >JCO RFC provider  we need to create .
    not sure what are the entries to maintain.
    Thanks
    Tom

    Hi Tom,
        See this link:
        First of all you have configure SLD:
        /people/sugree.phatanapherom/blog/2005/08/14/configuring-sld-in-sneak-preview-sap-netweaver-04-sneak
        /thread/146517 [original link is broken]
        Configure SLD
        SLD configuration successful then you have to create JCO connection:
        https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/f0b0e990-0201-0010-cc96-d7ecd2e51715
    Regards, Suresh KB

  • Dynamic JCo Connection with Adaptive RFC Model 2

    Hi gurus,
    I'm trying to dinamically change a model data connector inside my web dynpro. I'm using an Adaptive RFC Model 2 to communicate with the R/3 backend. I've found that is possible to change the connector modifiyng the code inside the web dynpro. In detail I've found this example:
    IWDDynamicRFCModel model1 = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(Model1.class);
    I put this code into wdDoInit method but I get the following error:
    "<comp_name>.wdDoInit failed to create or init instance of model 'model_name' in scope NO_SCOPE with instanceId 'null'"
    Furthermore I've used the deprecated Adaptive RFC Model and when I instantiate a model, ModelName m=new ModelName(), I see that the methods m.setJcoClient(client) and m.setSystemName(systemName) are visible, while when I try to do the same with Adaptive RFC Model 2, with my model m, the methods before there aren't.
    So this is my question: is it possible to change data connector dinamically with Adaptive RFC Model 2?
    Thanks a lot

    Dear Lukinho,
    You may try this ;
    try {
    IWDJCOClientConnection clientCon =  WDSystemLandscape.getJCOClientConnection("<name of the JCO connection>");
    String clientName      = clientCon.getClientName();
    String lang          = clientCon.getLanguage();
    String passowrd          = clientCon.getPassword();
    String sysID          = clientCon.getSystemIdentifier();
    String user          = clientCon.getUser();
    //etc...
    } catch (WDSystemLandscapeException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    I got this code from the thread   [Multiple Client Logon in JCO   |Re: Multiple Client Logon in JCO;
    Also have a look at this thread
    [JCo Destination   |Re: JCo Destination;
    Hope it helps!!
    Warm Regards
    Upendra Agrawal

  • Should I have one JCo connection per RFC model?

    Hello SDN,
    I got a JCo doubt.
    Should I have one JCo connection per RFC model in a DC? or Can I have the same JCo connection for several models in such Web Dynpro Development Component?
    I will appreciate any help.
    Thank you.

    Hi Gustavo,
    Ideally, we use one JCo connection for all the models in all the DC's in a big project.
    If you see the SAP delivered XSS/ESS/MSS solutions they are also using one JCO (SAP_R3_Human_Resources) for all the dc's in one solution.
    Suppose you are not using SSO and you have different models with different JCO, now if you want to change the backend client, you have to change all the JCO connections.
    So having one JCO, helps easy maintenance of connections across different applications in a big project/solution.
    Regards,
    Shubham

  • JCO connection pool is exhausted

    hi
    I am using RFC module in my web dynpro application. When the application is used for sometime, the JCO connection will get exhusted. The JCO connection will not release itself. I can't find any method in web dynpro to release the connection manually. How can I solve this problem?

    Hi,
    What is scope of the connection. View properties of MODELDATA and METADATA  destinations.
    You can change the scope of the connection..
    or
    wdContext.current<BAPI INPUT>Element().modelObject().modelInstance().disconnectIfAlive();
    For more ways , give a forum search.. There are a lot of close forum posts.. Gud luc..
    Regards
    Bharathwaj

  • Problem with JCo Connection Pool

    Hi,
    I have a problem with using an RFC Model in my WebApplication. So sometimes the access to the function block works, and sometimes it doesn't work. Now I know, that there is a problem with the connection pool. Look at this message:
    com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool WD_X24_MODELDATA_DEST_CPIC_REKTO_DE_useDefinedUser is exhausted. The current pool size limit (max connections) is 10 connections.
    So it looks like a problem with closing the JCo Connections after using. Do know where the problem is? Because I'm using many other function blocks with no problems.

    Hello,
    You need to increase the pool size via Visual Administrator.
    Server 0 -> Services -> JCO RFC Connections.
    Change the pool size from there. I believe a restart is in order.
    Regards,
    Jan

  • Error while obtaining JCO connection when creating JCO connection

    Hey,
    im having a problem when creating a JCO connection in the Web Dynpro Content Administrator.  Creating the Modeldata (Application Data Data type) JCO Worked but when creating the JCO for the RFC Metadata (Dictionary Meta data) there is a problem:
    In step 3.2 Msg server connection I cannot specify a system name and logon group, only the message server can be selected with the dropdown box.
    After pushing the finish button i get the following stacktrace:
    Failed to create new JCO client connection WD_RFC_METADATA_DEST: com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscapeException: Error while obtaining JCO connection. at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:150) at
    com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.createJCOClientConnection(SystemLandscapeFactory.java:356) at
    com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscape.createJCOClientConnection(WDSystemLandscape.java:107) at
    com.sap.tc.webdynpro.tools.sld.ButtonBar.onActionFinish(ButtonBar.java:224) at com.sap.tc.webdynpro.tools.sld.wdp.InternalButtonBar.wdInvokeEventHandler(InternalButtonBar.java:265) at
    com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87) at
    com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67) at
    com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:101) at
    com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:304) at
    com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649) at
    com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59) at
    com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248) at
    com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154) at
    com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116) at
    com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55) 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:390) at
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264) at
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347) at
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325) at
    com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887) at
    com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241) at
    com.sap.engine.services.httpserver.server.Client.handle(Client.java:92) at
    com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148) 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:95) at
    com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160) Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to resolve connection parameter for WD_RFC_METADATA_DEST at
    com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter4MsgServerJCODestinaton(JCOClientConnection.java:664) at
    com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter(JCOClientConnection.java:508) at
    com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.init(AbstractJCOClientConnection.java:248) at
    com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.<init>(AbstractJCOClientConnection.java:222) at
    com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.<init>(JCOClientConnection.java:101) at
    com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:148) ... 30 more Caused by: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:393) at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter4MsgServerJCODestinaton(JCOClientConnection.java:558) ... 35 more
    We are running WebAS 640 SP 14 on Unix.
    Greetings,
    Hannes
    Message was edited by: Hannes Defloo

    Hi
      Please configure your SLD. Your SLD holds the system definition. Define a SAP WebAS abap system and then try to create a Metadata connection using WebDynpro content administrator. Now you will be able to see the msg server defined in the dropdown. Also ensure that you have the message server entry in your services file.
    Refer these links for SLD
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/dc37520bdf4b48bb8f6d4329f073d5/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/24/8fa93e08503614e10000000a114084/content.htm
    Hope that helps.
    regards
    Ravi

  • Java-Program for JCO-Connection

    Hallo experts!
    I tried to get a Java-Program running which should establish JCO-Connection to a SAP-System and got the following error message:
    java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library librfc. Found version "640.0.144" but required at least version "640.0.161".
         at com.sap.mw.jco.JCO.<clinit>(JCO.java:776)
         at JCOTEST.main(JCOTEST.java:24)
    Exception in thread "main"
    Anyone got an idea?
    Thanks for your help in advance.

    Thank you Jens,
    it worked fine with the newest JCo-Download.
    Now I seem to have some Network problem: ip not reached:
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
    Connect_PM  GWHOST=10.251.24.10, GWSERV=sapgw10, ASHOST=10.251.24.10, SYSNR=10
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       partner not reached (host 10.251.24.10, service 3310)
    I need to talk to our network manager in the firm.
    Regards.
    Thomas

  • Error in JCO Connection prorgam

    Hi Experts,
    I am developing one tomcat application using servlet. In servlet i am connecting to R/3. For this i am writing JCO Connection code. This Java file is compiled, but while running the servlet in browser it is giving exception like
    java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]. java.library.path [C:Tomcat 5.0bin;.;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:jdk1.5.0_12bin;C:Program Files (x86)AdobeFlex Builder 2Flex SDK 2bin;C:j2mej2me_cldcbinwin32;C:j2memidp1.0.3fcsbin;C:jdk1.5.0_12libsapjco.jar]
         com.sap.mw.jco.JCO.<clinit>(JCO.java:738)
         ConnectToR3.getConnection(ConnectToR3.java:25)
         HitServlet.doGet(HitServlet.java:29)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    How to slove this problem. Is their any other way to connect to SAP R/3 from Servlets. I created normal java program without servlets, it's wokring fine. But If paste the same code in servlets mean it is giving above Exception.
    Please Help me........ Give any solution to this problem.
    Regards,
    Sunil

    sapjcorfc.dll is required on the server to handle jco connections.
    It seems it is not there or if it is there but is not part of "path" environment variable on the server.
    1) Go to you server. Search for this file and add the directory containing this file to path environment variable for server. You have to restart your server.
    2) It runs in your local java program because your local java program runs in local JVM instance. And on your local machine you have the sapjcorfc.dll plus its folder being in part of path environment variable.
    3) The servlet runs in ServletContext on the server JVM instance where the sapjcorfc.dll cann't located.
    Regards,
    Ashwani Kr Sharma

  • Jco connection error while calling Custom FM in CRM Internet Sales Application

    Hi ,
    I am trying to do some customisation in the CRM ISA 4.0 development component.
    Have followed the steps given in the Development and Extension Guide and tutorial PDF
    Steps done for Custom RFC Call
    1.       Create RFCs
    2.       Edit file backendobject-config.xml in folder project_root\b2b_z\WEB-INF\xcm\customer\modification:-
    3.       BackendBusinessObject Jco -
    4.       BusinessObject -
    5.       Edit file bom-config.xml in folder project_root\b2b_z\WEB-INF\xcm\customer\modification
    6.       BusinessObjectManager BoM
    7.       BackendAware-
    8.       config.xml - to add custom actions
    9.       Action  creation
    10.     Page : Order_change.jsp.
    The backend is the CRM system while making a call to the CRM system the connection to the CRM system is not working .
    Similar to what is given in the tutorial the  getDefaultJCoConnection() is used .
    But gettting null at the JCO connection.
    JCO.Function func = getDefaultJCoConnection().getJCoFunction(‘CRM_ISA_SHOP_GETLIST’);
    This is how my custom FM is being called.
    Can someone help me with what may be the possible reason for this call failure.
    While debugging and checking it shows null pointer exception in the JCo connection .
    Thanks
    Chinju

    Hi Hamendra,
    When the code debugging was done in Java then we got just the NullPointerException for the JCo.
    In the nwa log shows
    where BackendBusinessObjectBaseSAP is the standard Java Class in the ISA
    Error at
    com.sap.isa.core.eai.sp.jco.BackendBusinessObjectBaseSAP.getDefaultJCoConnection(BackendBusinessObjectBaseSAP.java:46)
    Thanks
    Chinju

  • JCO Connection Problem

    Hi Experts,
    This is not related to Java Web Dynpro directly.
    We are encountering strange behavior with respect to JCo Destination.
    Up to yesterday we had no problems with JCo. But when we tried to run run a Web Dynpro application, it
    was not able to extract data from SAP backend.
    On further investigation it was found out that JCo Destination test is failing. Following is the error when we
    tried to test JCo Destination:
    com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Client 100 is not available in this system
    Backend is working fine with username and password in the client. Connection from ABAP server to
    the the problematic ABAP server is also working (SM59). But connection from any Java portal to ABAP
    server is not working.
    Has anybody encountered this problem?
    Best Regards,
    Pramod

    Hi Promod,
    It would be some Username and password issue. If you manage to change them you issue will be resolved. Have a look at the the following useful discussion. It would be helpful for you.
    JCO Connection Error
    Also have a look at the following Wiki for troubleshooting the RFC Communication problems with Java Connectors.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/ep/troubleshooting%252bsap%252bjava%252bconnector%252b(JCo)
    I hope this helps you.
    Regards,
    Gopal.

  • JCO - Connection reset by peer - after 5 minute timeout

    Hello
    We're using SUP with the JCO Connector. This has been working flawlessly since project inception. Now, after switching to a new data center (Windows Server 2008 Server Enterprise Edition, SP2 on VMWare) we're observing a mysterious behavior with timeouts of idle connections. I hope someone in this forum knows what this might be.
    JCO connections originate from SUP servers. When such connections are idle for more than 5 minutes they get disconnected from SAP -- this is in agreement with SAP timeout parameter of 300 seconds.
    On our new systems we noticed that requests sent 5min+ (after timeout) show following error:
    Thread-8 [22:08:55:343]: [JNI-LAYER] RFC.nativeExecute() before RfcCallReceive(2,"Z_U_ONEMOBILE_SWO_SEARCH",0000000010CDC850,0000000000000000,0000000010C81530,000000000C79CA88)
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeExecute() after  RfcCallReceive(2,"Z_U_ONEMOBILE_SWO_SEARCH",0000000010CDC850,0000000000000000,0000000010C81530,000000000C79CA88) = RFC_SYS_EXCEPTION
    Thread-8 [22:08:55:344]: [JAV-LAYER] JCO.Client.execute (Z_U_ONEMOBILE_SWO_SEARCH) threw a NON-ABAP exception: com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: CPIC-CALL: 'CMRCV : rc=20
    ERROR       connection to partner '---removed!---:3299'
                broken
    TIME        Fri Feb 11 18:08:55 201
    RELEASE     710
    COMPONENT   NI (network interface)
    VERSION     39
    RC          -6
    MODULE      nixxi.cpp
    LINE        4448
    DETAIL      NiIWrite: P=161.88.23.170:3299; L=0.0.0.0:49730
    SYSTEM CALL WSASend
    ERRNO       10054
    ERRNO TEXT  WSAECONNRESET: Connection reset by peer
    COUNTER     3
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeDisconnect()                                       enter, [SUCCESS]
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeDisconnect() before RfcClose(2)
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeDisconnect() after  RfcClose(2)
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeDisconnect()                   with rc = RFC_OK   leave, [SUCCESS]
    Our suspicion is that the JCO client doesn't notice the fact that it gets disconnected. We used Network Monitor 3.4 to look at network traffic. Indeed, after 5 minutes the client gets a single frame (with reset flag) and no acknowledgement goes back.
    What could this be?
    We use
    JCO 2.1.8 AMD 64-bit (contains librfc 6.40) and
    JCO 2.1.9 AMD 64-bit (contains librfc 6.40) but replaced this with librfc 7.10 (after seeing Note 825494). Behavior was exactly the same. We did confirm in jco/rfc trace that those versions were actually used.
    Any ideas?
    Thanks and regards
    Edited by: B. Gottipati on Feb 14, 2011 9:17 PM

    Hello
    We're using SUP with the JCO Connector. This has been working flawlessly since project inception. Now, after switching to a new data center (Windows Server 2008 Server Enterprise Edition, SP2 on VMWare) we're observing a mysterious behavior with timeouts of idle connections. I hope someone in this forum knows what this might be.
    JCO connections originate from SUP servers. When such connections are idle for more than 5 minutes they get disconnected from SAP -- this is in agreement with SAP timeout parameter of 300 seconds.
    On our new systems we noticed that requests sent 5min+ (after timeout) show following error:
    Thread-8 [22:08:55:343]: [JNI-LAYER] RFC.nativeExecute() before RfcCallReceive(2,"Z_U_ONEMOBILE_SWO_SEARCH",0000000010CDC850,0000000000000000,0000000010C81530,000000000C79CA88)
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeExecute() after  RfcCallReceive(2,"Z_U_ONEMOBILE_SWO_SEARCH",0000000010CDC850,0000000000000000,0000000010C81530,000000000C79CA88) = RFC_SYS_EXCEPTION
    Thread-8 [22:08:55:344]: [JAV-LAYER] JCO.Client.execute (Z_U_ONEMOBILE_SWO_SEARCH) threw a NON-ABAP exception: com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: CPIC-CALL: 'CMRCV : rc=20
    ERROR       connection to partner '---removed!---:3299'
                broken
    TIME        Fri Feb 11 18:08:55 201
    RELEASE     710
    COMPONENT   NI (network interface)
    VERSION     39
    RC          -6
    MODULE      nixxi.cpp
    LINE        4448
    DETAIL      NiIWrite: P=161.88.23.170:3299; L=0.0.0.0:49730
    SYSTEM CALL WSASend
    ERRNO       10054
    ERRNO TEXT  WSAECONNRESET: Connection reset by peer
    COUNTER     3
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeDisconnect()                                       enter, [SUCCESS]
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeDisconnect() before RfcClose(2)
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeDisconnect() after  RfcClose(2)
    Thread-8 [22:08:55:344]: [JNI-LAYER] RFC.nativeDisconnect()                   with rc = RFC_OK   leave, [SUCCESS]
    Our suspicion is that the JCO client doesn't notice the fact that it gets disconnected. We used Network Monitor 3.4 to look at network traffic. Indeed, after 5 minutes the client gets a single frame (with reset flag) and no acknowledgement goes back.
    What could this be?
    We use
    JCO 2.1.8 AMD 64-bit (contains librfc 6.40) and
    JCO 2.1.9 AMD 64-bit (contains librfc 6.40) but replaced this with librfc 7.10 (after seeing Note 825494). Behavior was exactly the same. We did confirm in jco/rfc trace that those versions were actually used.
    Any ideas?
    Thanks and regards
    Edited by: B. Gottipati on Feb 14, 2011 9:17 PM

  • JCO Connection

    Hi Experts,
    We use two types of JCo connections while connecting to back-end .
    1 . Modeldata
    2 . Metadata
    What is the use of each type of JCO connection ?
    Thanks a lot .

    Hi jain,
    I think you have posted some wrong part in your post.
    There no two type of JCo Connections; but you can create one JCo connection and specify different parameters to it; one is model data and other is meta data.
    model data - shows the default logical system name for model  instances that we use in application.
    meta data - shows the default logical system name for RFC metadata (Backend R3 meta data).
    and both together forms the JCo Connection for the WebDynpro  Front-end application.
    You can find more idea by login to ContentAdministrator and find your application name and view.
    Regards
       - Vinod
    Edited by: Vinod V on Apr 3, 2008 10:20 AM

  • Problem create jco connection in webdynpro application run time

    Hi There,
    I created webdynpro application using rfc model.
    After deploy the project , i created two jco connection
    for data & meta data this is work o.k (test with no errors). the sld is o.k.
    We are using application server (Single Server) for data
    & message server for meta data (Load Balance).
    During run time there is an error message:
    Error stacktrace:
    com.sap.tc.webdynpro.services.exceptions.WDTypeNotFoundException: type com.ness.crm.customerlasttwo01pckg.model.types.Datab could not be loaded: com.sap.dictionary.runtime.DdException:
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getSimpleType(DataTypeBroker.java:242)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getDataType(DataTypeBroker.java:205)
         at com.sap.tc.webdynpro.progmodel.context.AttributeInfo.init(AttributeInfo.java:471)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:771)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:756)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:761)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:433)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:371)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:400)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.init(MappingInfo.java:138)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:746)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:761)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:540)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:422)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
         at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:134)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:374)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:593)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:249)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         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:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.dictionary.runtime.DdException:
         at com.sap.dictionary.runtime.ProviderFactory.internalGetProvider(ProviderFactory.java:225)
         at com.sap.dictionary.runtime.ProviderFactory.getProvider(ProviderFactory.java:180)
         at com.sap.dictionary.runtime.DdDictionaryPool.getProvider(DdDictionaryPool.java:78)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:64)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:39)
         at com.sap.dictionary.runtime.DdBroker.getDataType(DdBroker.java:149)
         at com.sap.dictionary.runtime.DdBroker.getSimpleType(DdBroker.java:170)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getSimpleType(DataTypeBroker.java:234)
         ... 44 more
    <u>Can some one help me with this matter?</u>
    Best regards Nir Shohat.

    Hi Nir,
    We also had same problem but no we won't. Check ur config on SLD again and the try to the test connection from the http://localhost:4444/webdynpro ( WAS 6.4 )server.
    If this connection is OK then deploy some small application n see.
    Is ur's JCo connection working for J2ee application?
    Arnigs

  • Error in launching guided procedure: Error while obtaining JCO connection.

    Hello experts,
    we've a problem with webdynpro java calling a guided procedure.
    We've defined an endpoint for our callable object, as you can see the test of the connection works fine:
    In the configuration of our callable object we use the endpoint above:
    And we can test the callable object: it works well, call the right BAPI and find the results.
    But when the GP is called and this callable object try to call the BAPI in the background it doesn't work at all.
    In the log and trace of the portal we find this:
    A technical callable object exception ocurred: Le service RecupActeurs n'a pas pu être exécuté : La connexion pour le nom de connexion SAP_R3_HumanResources n'a pas pu être chargée à partir de System Landscape Directory (SLD) : Error while obtaining JCO connection.
    com.sap.caf.eu.gp.model.co.tech.TechnicalCallableObjectException: Le service RecupActeurs n'a pas pu être exécuté : La connexion pour le nom de connexion SAP_R3_HumanResources n'a pas pu être chargée à partir de System Landscape Directory (SLD) : Error while obtaining JCO connection.
    at com.sap.caf.eu.gp.model.connect.impl.ExternalServiceBackgroundCOContainer.execute(ExternalServiceBackgroundCOContainer.java:101)
    at com.sap.caf.eu.gp.model.co.background.impl.BackgroundCOExecutorImpl$CallableObjectExecutor.run(BackgroundCOExecutorImpl.java:126)
    at com.sap.caf.eu.gp.model.co.background.impl.BackgroundCOExecutorImpl.execute(BackgroundCOExecutorImpl.java:504)
    at com.sap.caf.eu.gp.model.co.background.impl.BackgroundCOExecutorImpl.execute(BackgroundCOExecutorImpl.java:581)
    at com.sap.caf.eu.gp.model.pfw.wfc.local.impl.BackGroundActionProcessorHelper.processAction(BackGroundActionProcessorHelper.java:183)
    at com.sap.caf.eu.gp.model.pfw.wfc.local.impl.queue.BackgroundCOQueueProcessor.run(BackgroundCOQueueProcessor.java:263)
    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:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Caused by: com.sap.caf.eu.gp.base.exception.EngineException: Connection that belongs to connection name SAP_R3_HumanResources could not be loaded from System Landscape Directory (SLD): Error while obtaining JCO connection.
    at com.sap.caf.eu.gp.model.connect.rfc.impl.SLDConnectionManager.getClientConnection(SLDConnectionManager.java:138)
    at com.sap.caf.eu.gp.model.connect.rfc.impl.ConnectionDeliverRFC.analyseConnectionMode(ConnectionDeliverRFC.java:185)
    at com.sap.caf.eu.gp.model.connect.rfc.impl.ConnectionDeliverRFC.deliverConnection(ConnectionDeliverRFC.java:91)
    at com.sap.caf.eu.gp.model.connect.rfc.impl.SAPSystemConnector.deliverMetaData(SAPSystemConnector.java:116)
    at com.sap.caf.eu.gp.model.connect.pvd.saprfc.impl.SAPRFCServiceProvider.executeExternalService(SAPRFCServiceProvider.java:232)
    at com.sap.caf.eu.gp.model.connect.impl.ExternalServiceManager.executeExternalService(ExternalServiceManager.java:139)
    at com.sap.caf.eu.gp.model.connect.impl.ExternalServiceBackgroundCOContainer.execute(ExternalServiceBackgroundCOContainer.java:89)
    ... 9 more
    Caused by: com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscapeException: Error while obtaining JCO connection.
    at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:152)
    at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:160)
    at com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscape.getJCOClientConnection(WDSystemLandscape.java:41)
    at com.sap.caf.eu.gp.model.connect.rfc.impl.SLDConnectionManager.resolveClientConnection(SLDConnectionManager.java:169)
    at com.sap.caf.eu.gp.model.connect.rfc.impl.SLDConnectionManager.getClientConnection(SLDConnectionManager.java:102)
    ... 15 more
    Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to resolve connection parameter for 'SAP_R3_HumanResources'
    at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter4MsgServerJCODestination(JCOClientConnection.java:658)
    at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter(JCOClientConnection.java:485)
    at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.init(AbstractJCOClientConnection.java:248)
    at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.<init>(AbstractJCOClientConnection.java:233)
    at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.<init>(JCOClientConnection.java:129)
    at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:150)
    ... 19 more
    Caused by: com.sap.tc.webdynpro.services.sal.um.api.WDUMException: No client user defined for the current request (no regular Web Dynpro request as ITask is null.
    at com.sap.tc.webdynpro.serverimpl.core.um.AbstractClientUserFactory.getCurrentUser(AbstractClientUserFactory.java:48)
    at com.sap.tc.webdynpro.services.sal.um.api.WDClientUser.getCurrentUser(WDClientUser.java:67)
    at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter4MsgServerJCODestination(JCOClientConnection.java:591)
    It seems that the GP could not connect to the SLD to call the JCO, but as said before, when we test the callable object, it calls the BAPI without any problem.
    We tried to recreat either the JCO and the Endpoint but without success.
    Any help will be appreciated.
    Thank you.

    Hi.
    Thanks for your answers.
    Here are the things :
    From the GP administration, the endpoint's test is working.
    From the SLD, the JCO is working too.
    From the Web Dynpro Content Administrator, the JCO's test is working too.
    From the GP Desing Time, the callable object supposed to call the FM uses the right endpoint, and the test is working too, we retreive data from the backend.
    From our app, calling the GP process that includes our callable object, we have errors pasted above...
    Regards.

Maybe you are looking for

  • Itunes unexpectedly quits 5.0.1 & 4.9 too

    I had installed 5.0.1. it was buggy and then it just started quitting every time i brought it up. I then uninstalled it and brought back 4.9. Even 4.9 quits unespectedly every time. following is part of the txt from the error report: Date/Time: 2005-

  • What is the Acrobat 7 Adobe PDF printer driver name?

    I can no longer print to my "Adobe PDF" printer. I have Acrobat 7.1.0 (as part of Creative Suite 2) on my small travel laptop system running Windows XP Professional, SP3.  Recently, if I try to print to a PDF file from Firefox, I get:       "an unexp

  • Image and 2copies report of detail form

    i have a master-detail form working fine, my detail is on separate page, what i required is that an 1: image has to show in this detail region, 2: as soon as user press apply changes/save Page A4 pop up formated with 2-number of copies of same region

  • Provide Feedback for the Logic Pro User Manual and Onscreen Help Here

    The Apple documentation team for Logic Pro would like to know what you think about the Logic Pro Help documentation (available in the Help menu): • How often do you use Logic Pro Help? Under what circumstances do you use it most? • Do you use the pri

  • Can I replace an A1022 battery with an A1079?

    I bought a new battery for my G4 12' DVI without having the computer with me (long story). Now I've noticed the model numbers on the old and new batteries are different, otherwise it fits. Old: Model No.: A1022; New: A1079. Are these batteries interc