cancel
Showing results for 
Search instead for 
Did you mean: 

JCo3 with ubuntu 12.04 - no sapjco3 in java.library.path

Former Member
0 Kudos

Hi everyone,

I am facing a problem with JCO3 under ubuntu 12.04 LTS.

I have downloaded sapjco3-linuxx86_64-3.0.11.tgz adn extracted it to "/sapjco/".

After that I made the follwing entry in "/etc/environment":

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/sapjco"

CLASSPATH="$CLASSPATH:/sapjco/sapjco3.jar"

When I start my Java Application I get the following error:

java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

Anybody an idea what's wrong here?

Regards

Markus

Accepted Solutions (1)

Accepted Solutions (1)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Markus,

put the library next to the JAR - into the same directory. That's the place, where JCo is looking first. Please note that Ubuntu is not one of the supported Linux distributions (SLES, RHEL in various versions, check note 1077727 for details). But if the runtime libraries are fitting it should still run.

Best regards,

Markus

Former Member
0 Kudos

Hi Markus,

thanks a lot.

Modified my "/etc/environment" as follows:

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/sapjco/"

CLASSPATH="$CLASSPATH:/sapjco/sapjco3.jar:/sapjco/libsapjco3.so"

It is working now.

Regards

Markus

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Markus,

the CLASSPATH variable does not require an extension actually, only the file needs to be in the location for which it is mentioned there now. But well, it also does not hurt ...

Best regards,

Markus

Former Member
0 Kudos

Hi Markus,


follow with your con,but on error:


JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libsapjcorfc.so: /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libsapjcorfc.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 64-bit .so on a AMD 64-bit platform)]. java.library.path [/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib] 
MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

there are 2 things wrong:

* You are still using an outdated version of JCo namely 2.1. It had gone out of support nearly 2 years ago.

* You try to use a library compiled for the Itanium architecture on a x86_64 architecture.

Best regards,

Markus


Answers (0)