Originally posted by: AdamGregory
Hi there,
I am having some difficulty installing and using cpoptimizer on Red Hat Linux installation.
I have installed CPLEX Optimization studio 12.6.1 using the instructions listed here:
http://www.ibm.com/support/knowledgecenter/SSSA5P_12.6.1/ilog.odms.studio.help/Optimization_Studio/topics/COS_installing.html
I have created a simple java Class with a main method where I instantiate an object of type IloCP to test my installation.
I successfully complied the java class file using javac and setting the classpath to /opt/ibm/ILOG/CPLEX_OPTIMIZER1261/cpoptimizer/lib/ILOG.CP.jar.
When I try to execute the java main class after setting Djava.library.path to /opt/ibm/ILOG/CPLEX_OPTIMIZER1261/cpoptimier/bin/x86-64_linux/ I get the following error:
Native code library failed to load: ensure the appropriate library (opl1261.dll/.so) is in your path.
Exceptions:
no opl1261 in java.library.path
no opl_lang_wrap_cpp in java.library.path
no opl_core_wrap_cpp_java1261 in java.library.path
no opl_core_wrap_cpp in java.library.path
/opt/ibm/ILOG/CPLEX_Studio1261/cpoptimizer/bin/x86-64_linux/libcp_wrap_cpp_java1261.so: libcplex1261.so: cannot open shared object file: No such file or directory
no cp_wrap_cpp in java.library.path
no concert_wrap_cpp_java1261 in java.library.path
no concert_wrap_cpp in java.library.path
Exception in thread "main" java.lang.ExceptionInInitializerError
at ilog.concert.cppimpl.IloEnv.<init>(IloEnv.java:49)
at ilog.concert.IloModelerImpl.<init>(IloModelerImpl.java:34)
at ilog.cp.IloCP.<init>(IloCP.java:125)
at ilog.cp.IloCP.<init>(IloCP.java:118)
at test.TestMain.main(TestMain.java:11)
Caused by: java.lang.RuntimeException: Native code library failed to load: ensure the appropriate library (opl1261.dll/.so) is in your path.
Exceptions:
no opl1261 in java.library.path
no opl_lang_wrap_cpp in java.library.path
no opl_core_wrap_cpp_java1261 in java.library.path
no opl_core_wrap_cpp in java.library.path
/opt/ibm/ILOG/CPLEX_Studio1261/cpoptimizer/bin/x86-64_linux/libcp_wrap_cpp_java1261.so: libcplex1261.so: cannot open shared object file: No such file or directory
no cp_wrap_cpp in java.library.path
no concert_wrap_cpp_java1261 in java.library.path
no concert_wrap_cpp in java.library.path
at ilog.concert.IloJNILoader.loadJNI(IloJNILoader.java:85)
at ilog.concert.cppimpl.concert_wrapJNI.<clinit>(concert_wrapJNI.java:15)
... 5 more
I do not see any opl1261.so in the installation directory. I can find libcplex1261.so under <install_dir>/opl/bin/x86-64_linux/ but adding that binary to the library path does not resolve the issue. I have tried reinstalling CPLEX optimization studio but the available binaries did not change. I had previously installed CPLEX optimization studio 12.5 on a windows machine and noticed that opl25.dll is among the installed dlls. What am I doing wrong?
Thank you for your help in resolving this issue.
#DecisionOptimization#OPLusingCPOptimizer