com.sap.mw.jco.rfc.MiddlewareRFC'JCO.nativeInit():无法初始化动态链接库sapjcorfc

时间:2016-08-19 05:57:07

标签: java linux bash sap jco

我在linux服务器上运行java类时遇到以下错误...

bash-3.2$ Exception in thread "main" 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. Found version "2.1.8 (2006-12-11)" but required version "2.1.10 (2011-05-10)".

以下是程序:

public static void startServers() {          
        accessLog.info("Start The Server");
        JCO.addClientPool("POOL", 3, "250", "username", "password", "EN", "saptest", "01");
        IRepository repository = JCO.createRepository("REP", "POOL");
        accessLog.info("Repostory Details" + repository);
        for (int i = 0; i < serverConnections.length; i++) {
            // (Change gateway host, service, and program ID according to your needs) 
            serverConnections[i] = new MyClass(
                    "sapqa",//gateway host, often the same as host
                    "sapgw", //gateway service, generally sapgw+<SYSNR>
                    "PRGRAM_ID", // corresponds to program ID defined in SM59
                    true, // or false for non unicode listener
                    repository);
            serverConnections[i].start();
        }

0 个答案:

没有答案