cancel
Showing results for 
Search instead for 
Did you mean: 

Java Connector 3.0.4 Problem: JCo Library not loaded, UnsatisfiedLinkError

Former Member
0 Kudos

Hi All,<br>

<br>

We have a problem with the Java Connector, version 3.0.4, on Windows Server 2003 64bit: JCo Library is not loaded, UnsatisfiedLinkError<br>

<br>

Environment: Windows Server 2003 R2 Datacenter x64 Edition<br>

Java JDK: Installed from jdk-6u18-windows-x64.exe, downloaded on 23/01/2010<br>

&nbsp;&nbsp;java version "1.6.0_18"<br>

&nbsp;&nbsp;Java(TM) SE Runtime Environment (build 1.6.0_18-b07)<br>

&nbsp;&nbsp;Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)<br>

SAP JCo Connector: sapjco3-NTAMD64-3.0.4.zip, downloaded on 23/01/2010<br>

Visual C++ version of msvcr.dll: 8.0.50727.762 and 8.0.50727.3053, service pack 1 installed on 23/01/2010<br>

<br>

sapjco3.jar and sapjco3.dll were moved into the same folder, CLASSPATH, PATH and JAVA_HOME variables were set accordingly.<br>

<br>

The command java -jar sapjco3.jar yields an error on the JCo library in the About screen as follows:<br>

<br>

(JCo Library) not loaded, caused by java.lang.UnsatisfiedLinkError: PATH\sapjco3.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.<br>

Manifest-Version: 1.0<br>

Ant-Version: Apache Ant 1.6.4<br>

Created-By: 1.5.0_14-b03 (Sun Microsystems Inc.)<br>

Specification-Title: SAP Java Connector v3<br>

Specification-Version: 7.30.1<br>

Specification-Vendor: SAP AG, Walldorf<br>

Implementation-Title: com.sap.conn.jco<br>

Implementation-Version: 20091217 0547 (7.30.1 (2009-12-10))<br>

Implementation-Vendor-Id: com.sap<br>

Implementation-Vendor: SAP AG, Walldorf<br>

Main-Class: com.sap.conn.jco.rt.About<br>

<br>

This is the log from running the java command:<br>

<br>

java.lang.UnsatisfiedLinkError: PATH\sapjco3.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem<br>

&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.ClassLoader$NativeLibrary.load(Native Method)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.Runtime.loadLibrary0(Runtime.java:823)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.System.loadLibrary(System.java:1028)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:441)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.DefaultJCoRuntime.registerNativeMethods(DefaultJCoRuntime.java:307)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.JCoRuntime.registerNatives(JCoRuntime.java:987)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.rfc.driver.CpicDriver.<clinit>(CpicDriver.java:948)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.rfc.engine.DefaultRfcRuntime.getVersion(DefaultRfcRuntime.java:43)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.rfc.api.RfcApi.RfcGetVersion(RfcApi.java:259)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:200)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:73)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.About.<init>(About.java:40)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.About.main(About.java:74)<br>

java.lang.ExceptionInInitializerError: Error getting the version of the native layer: java.lang.UnsatisfiedLinkError: PATH\sapjco3.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:212)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:73)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.About.<init>(About.java:40)<br>

&nbsp;&nbsp;&nbsp;&nbsp;at com.sap.conn.jco.rt.About.main(About.java:74)<br>

<br>

Apparently, the error UnsatisfiedLinkError has been reported quite frequently. However, I haven't found a solution to this problem on the web yet.<br>

<br>

I have tried the same files on a Windows Vista Business 64 bit machine as well with a slightly different error (different explanation for the UnsatisfiedLinkError).<br>

<br>

Any help would be much appreciated!<br>

<br>

Thanks in advance,<br>

<br>

Axel

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Axel,

hhhmm, this might be a problem due to usage of 3.0.4 and missing updates to Microsoft runtime libraries; check my comments in . You might have done this already.

As far as I remember another cause can be on 64bit due to usage of mixed library versions (e.g. trying to run it in 64bit, but some libraries are actually 32bit or vice versa). Having said that, I'm now actually confused, because I thought that JCo still requires the librfc dll. However, on my Windows 7 box (64bit), I can actually do RFC calls without any librfc. I noticed that the command java -jar sapjco3.jar now shows me a JavaRfc in the JCo Middleware name field with a JCo Middleware version of 2.2.1. I tried to do some search on that, but couldn't find anything.

Thus if you have installed the latest Microsoft runtime libraries, I'm not sure what might be the problem. If you have access to a previous JCo3 version, you might want to try that...

Former Member
0 Kudos

Hi Harald,

Thank you for your reply.

As a matter of fact, we resolved the issue pretty much at the same time that you sent your reply. Your suggestions are, however, leading to the solution, i.e. to install the updated Visual C components from Microsoft.

It turned out that I did not download and install the right Visual C Service Pack 1 distribution. JCo release notes suggest that

"Starting with JCo 3.0.4 you'll need updated libraries because of the Microsoft ATL patch, that requires new runtime libraries. See note 1375494 for details on how to install them."

I was unaware of the fact that there was another patch on top of the service pack 1. That patch can be found at http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=766a6af7-ec73-40ff-b072-9112...

I had only downloaded and installed the Microsoft Visual C++ 2005 SP1 Redistributable Package (x64) which can be found at http://www.microsoft.com/downloads/details.aspx?familyid=EB4EBE2D-33C0-4A47-9DD4-B9A6D7BD44DA&displa...

Hope this will help others in the future as well.

Cheers,

Axel