Partner not reached error in JCO.destination

非 Y 不嫁゛ 提交于 2019-12-08 09:18:05

问题


I'm Having a problem establishing a connection to SAP in my java program. I'm following the examples that come in the JCO download but i always get this error:

    com.sap.conn.jco.JCoException: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
    Connection parameters: TYPE=A DEST=ABAP_AS_WITHOUT_POOL ASHOST=xx.xx.x.xx SYSNR=00 PCS=1

    LOCATION    CPIC (TCP/IP) on local host with Unicode
    ERROR       partner 'xx.xx.x.xx:3300' not reached

    TIME        Wed Jul 08 08:18:28 2015
    RELEASE     711
    COMPONENT   NI (network interface)
    VERSION     39
    RC          -10
    MODULE      nixxi.cpp
    LINE        3147
    DETAIL      NiPConnect2: xx.xx.x.xx:3300
    SYSTEM CALL connect
    ERRNO       10060
    ERRNO TEXT  WSAETIMEDOUT: Connection timed out
    COUNTER     2

I don't know what it can be, i'm writing down the correct connection properties (ashost,user,passwd,sysnr,etc). Has anybody else has had a problem like this?

This is my connection code:

    Properties connectProperties = new Properties();
    connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "xx.xx.x.xx");
    connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR,  "00");
    connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "020");
    connectProperties.setProperty(DestinationDataProvider.JCO_USER,   "xxxxxx");
    connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "xxxxxxx");
    connectProperties.setProperty(DestinationDataProvider.JCO_LANG,   "en");
    createDataFile(ABAP_AS, "jcoDestination", connectProperties);

After that i just instantiate the object with those properties and call the method connect that is written like this:

    JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS);
    System.out.println("Attributes:");
    System.out.println(destination.getAttributes());
    System.out.println();

I'm working on Java, using netbeans, the sapjco3.jar is added to my libraries. Do i have to do anything with the dll file that comes?

来源:https://stackoverflow.com/questions/31293405/partner-not-reached-error-in-jco-destination

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!