Sapjco3.dll cant find dependent libraries

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

Hello

We have been using JCo2 for quite some time. Now we are going to use JCo3. I wrote a small Java application to run one RFC via JCo3. My application runs on Windows 7.

Error message:

Error getting the version of the native layer: java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\JCo3\sapjco3.dll: Can't find dependent libraries

I can provide the complete stack trace if you want.

Does anybody know what are those dependent libraries?

Here is what I have done so far:

1) The installation.html included in the JCo3 download states 'Do not copy the sapjco3.dll...into...SysWOW64...'. So I created my own folder C:\Program Files (x86)\JCo3. (I have tried SysWOW as well. It makes no difference.) In my own folder I placed the sapjco3.jar and sapjco3.dll.

2) In Eclipse I added sapjco3.jar to the Java Build Path.

3) I installed the Microsoft Visual Studio 2005 C/C++ runtime libraries as described in note 684106 as per the instructions of the installation.html. I wish this would have added those dependent libraries.

4) At this point if I run my application I get a slightly different version of the error:

Error getting the version of the native layer: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

I resolved this problem by editing the 'Native library location' of the sapjco3.jar in Eclipse. After that I am stuck with the error stated above.

Thanks for any help...

"Hello, I have just installed JCO 3 on my laptop. I have download the latest version of JAVA from sun.com. Java functions correctly and can compile a simple JAVA file. Though when I check the JCO it fails to find the library when using the sapjco3.jar file and java -jar {sapjco-install-path}/sapjco3.jar. Details of error output are below: C:Documents and Settingswnash>java -jar c:tempsapjco-install-pathsapjco3.jar java.lang.UnsatisfiedLinkError: C:tempsapjco-install-pathsapjco3.dll: This ap plication has failed to start because the application configuration is incorrect . Reinstalling the application may fix this problem at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:441) at com.sap.conn.jco.rt.DefaultJCoRuntime.registerNativeMethods(DefaultJCoRuntime.java:307) at com.sap.conn.jco.rt.JCoRuntime.registerNatives(JCoRuntime.java:987) at com.sap.conn.rfc.driver.CpicDriver.(CpicDriver.java:948) at com.sap.conn.rfc.engine.DefaultRfcRuntime.getVersion(DefaultRfcRuntime.java:43) at com.sap.conn.rfc.api.RfcApi.RfcGetVersion(RfcApi.java:259) at com.sap.conn.jco.rt.MiddlewareJavaRfc.(MiddlewareJavaRfc.java:200) at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:73) at com.sap.conn.jco.rt.JCoRuntimeFactory.(JCoRuntimeFactory.java:23) at com.sap.conn.jco.rt.About.(About.java:40) at com.sap.conn.jco.rt.About.main(About.java:74) java.lang.ExceptionInInitializerError: Error getting the version of the native layer: java.lang.UnsatisfiedLinkError: C:tempsapjco-install-pathsapjco3.dll: T his application has failed to start because the application configuration is inc orrect. Reinstalling the application may fix this problem at com.sap.conn.jco.rt.MiddlewareJavaRfc.(MiddlewareJavaRfc.java:212) at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.ja va:73) at com.sap.conn.jco.rt.JCoRuntimeFactory.(JCoRuntimeFactory.java :23) at com.sap.conn.jco.rt.About.(About.java:40) at com.sap.conn.jco.rt.About.main(About.java:74) Now I have re-installed the program and I still get the same problem.. I did a further review into "UnsatisfiedLinkError" and downloaded Dependency Walker program and found that I was missing two DLL files. Which I have put into C:WindowsSystem32, msvcr80,dll and msjava.dll. Based on other BLOG entries I have also downloaded the C++ 2008 vcredist_x86, as it seems JCO3 needs some special C++ libaries. I have also installed SAPGui 7.10 with Patch 15. Further, through the Dependency Walker program I also find that MPR.dll is missing a function, but other BLOGs mention it is not issue if the program initiates the dll. Has anybody had this same issue or can offer any advice. Basically all I want to do is confirm that we can change a legacy JAVA program so it can post sales orders into SAP. Kind Regards and Thanks Waza"

Read these next...

  • Best practice for 2x VMWare host HA/failover, and storing 5tb+ of company data?

    Virtualization

    Have a client with two old Hyper-V hosts, no clustering/HA/failover/etc configured, with 6 vms between them and 5tb of company data on old host 1 > DC/Fileserver as drive E:.  They want new hosts, and cloud is a hard-stop for them so it's not up for discu...

  • WiFi to Ethernet Bridge that allows Static clients?

    Networking

    Here is my scenario; I have production devices that need a static IP address. I had some WiFi repeaters that worked really well, however they burned out over time because of the environment. I have tried replacing them with tp-link and now BrosTrend Wi-Fi...

  • Tip Tuesday! 20 Sept 2022 - Interview Tips for Interviewee and Interviewer!

    IT & Tech Careers

    Welcome to Tip Tuesday!Are you a Tipster? Do you like to exchange ideas and solutions? If yes, then this is the thread for you! Each week we will highlight a specific topic. If you have a special tip regarding this topic, then please share it with oth...

  • Spark! Pro Series - 20 September 2022

    Spiceworks Originals

    Today in History: 20 September622 - Islamic Prophet Muhammed/Abu Bakr arrives in Jathrib1519 - Spanish expedition led by Portuguese navigator Ferdinand Magellan sets off on the 1st successful circumnavigation of the globe1746 - Bonnie Prince Charlie f...

  • Snap! Teams not loading, ChromeLoader, reducing cloud costs, IT Pro Day, & more

    Spiceworks Originals

    Your daily dose of tech news, in brief. While it may not be widely known (yet!), the third Tuesday in September is annually celebrated as IT Professionals Day to honor the men and women who maintain the technology organizations depend on to conduct...

Related Posts

Toplist

Latest post

TAGs