hama-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Behroz Sikander <behro...@gmail.com>
Subject Adding external JAR with Native Libraries (UBUNTU)
Date Fri, 19 Jun 2015 23:13:15 GMT
Hi,
I recently wrote an algorithm on Hama which uses a third party library
(CPLEX). This library comes with a JAR file and folder with Native
Libraries. I am using Ubuntu and my Hama version is 0.6.4.

In eclipse everything is fine. I added the native library folder in "Native
Library location" option of JAR file in eclipse (Project properties > Build
Path > libraries > Select CPLEX > open dropdown and set the location) and
my code worked fine. Now, I am trying to deploy the code on the cluster. I
tried on a single machine but I get the following exception

*java.lang.UnsatisfiedLinkError: ilog.cplex.Cplex.CPXopenCPLEX([I)J*
*attempt_201506192258_0001_000001_0: at
ilog.cplex.Cplex.CPXopenCPLEX(Native Method)*
*attempt_201506192258_0001_000001_0: at
ilog.cplex.CplexI.init(CplexI.java:6608)*
*attempt_201506192258_0001_000001_0: at
ilog.cplex.CplexI.<init>(CplexI.java:629)*

The above error is occuring because it was not able to locate the native
library of CPLEX jar (I placed the CPLEX jar in $HAMA_HOME/lib/ ). I used
the following command to run my jar
*./bin/hama jar myjar.jar <inputs>*


I tried to set the HAMA_OPTS in /etc/envirnment but still I get the same
error.
*export
HAMA_OPTS="-Djava.library.path=/home/behroz/Documents/cplex_setup/cplex/bin/x86-64_linux"*

Without HAMA if I run the following command I get no error and everything
works fine
*java
-Djava.library.path=/home/behroz/Documents/cplex_setup/cplex/bin/x86-64_linux*


Can you please guide me how to resolve this issue ?

Regards,
Behroz Sikander

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message