cancel
Showing results for 
Search instead for 
Did you mean: 

SAP JCo and Axis 1.4 - Connection problem.

Former Member
0 Kudos

hi,

I have a web-service developed using axis 1.4 and is used to get data from SAP.

When I try to access or connect to SAP, it throws the exception as shown below.

java.lang.Exception: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'

JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [/usr/lib/jvm/java-1.5.0-sun-1.5.0.16.x86_64/jre/lib/amd64/server/libsapjcorfc.so: libstdc++.so.5: cannot open shared object file: No such file or directory]. java.library.path [/usr/lib/jvm/java-1.5.0-sun-1.5.0.16.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.5.0-sun-1.5.0.16.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.5.0-sun-1.5.0.16.x86_64/jre/../lib/amd64]

The same solution works fine on windows environment. but when the application is hosted on Linux environment it doesn't work. Following are few environment details about the application environment.

OS: Linux 2.6.9-55 x86_64 (amd64)

Java version:

java version "1.5.0_16"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)

Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_16-b02, mixed mode)

SAP JCo used:

SAP JCo 3.0.0 -> Linux (for Intel compatible processors) -> 64bit X86 -> sapjco3-linuxx86_64-3.0.0.tgz

Application Server: JBoss 4.3.0.GA_CP01

I am hoping that someone can throw some light on what changes I would need to make to get this to work. I am new to Linux, infact very new!!

Thanks in advance,

Basavaraj

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

This exception occurs when the directory containing sapjcorfc.dll cannot be found in the PATH environment variable. sapjcorfc.dll contains the middleware bridge between Java JCo and the C libraries.

Add the directory containing sapjcorfc.dll to the PATH statement

from the doc

Then add {sapjco-install-path} to the LD_LIBRARY_PATH environment variable.

Finally, add {sapjco-install-path}/sapjco.jar to your CLASSPATH environment variable.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi, Thanks a lot for the quick response.

The solution is working fine on windows environment. But I have problem in running it on Linux box.

I feel that, libraries which are used, may not be matching with the current environment.

Can anyone suggest which is correct libraries (.so anf .jar file) for the above said environment?

Thanks, Basavaraj

Former Member
0 Kudos

Hi!! I'm the same problem. Can you help me, please?

Former Member
0 Kudos

Hi,

I'm currently using JCo 2.1.8 to connect to SAP which requires JDK1.4.

Since the JDK 1.4 is not available on that environment (only JDK 1.5 is available).

Currently I'm in the process of migrating the code to JCo 3.0. Hopefully this works!!!

Will keep you posted, if this test is successful.

Thanks.