Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Problem with opl1260.dll.so library when running under Linux

  • 1.  Problem with opl1260.dll.so library when running under Linux

    Posted Wed May 13, 2015 09:54 AM

    Originally posted by: SergeyPolyakovskiy


    Dear All,
     
    I have a problem with opl1260.dll/.so library when running .jar file under Linux. Specifically, I call 
    LD_LIBRARY_PATH=/opt/ibm/ILOG/CPLEX_Studio1261/opl/bin/x86-64_linux:/opt/ibm/ILOG/CPLEX_Studio1261/cpoptimizer/bin/x86-64_linux java -Djava.library.path=/opt/ibm/ILOG/CPLEX_Studio1261/cpoptimizer/bin/x86-64_linux:/opt/ibm/ILOG/CPLEX_Studio1261/cplex/bin/x86-64_linux: /opt/ibm/ILOG/CPLEX_Studio1261/opl/bin/x86-64_linux -jar cp.jar 

     

    I have both 12.6.0 and 12.6.1 Studio versions installed. This call works perfectly for 12.6.0 (when the .jar file is recompiled for 12.6.0 cplex and cpoptimizer libraries and when all entries of CPLEX_Studio1261 are substituted by CPLEX_Studio1260 in the command line) but not for 12.6.1. I am extracting required libraries into generated jar file.  

    Has someone faced the same problem with 12.6.1 Studio version?

     
    No version in manifest (not in a jar?), trying 1260
    No version in manifest (not in a jar?), trying 1260
    Native code library failed to load: ensure the appropriate library (opl1260.dll/.so) is in your path.
    Exceptions:
    no opl1260 in java.library.path
    no opl_lang_wrap_cpp in java.library.path
    no opl_core_wrap_cpp_java1260 in java.library.path
    no opl_core_wrap_cpp in java.library.path
    no cp_wrap_cpp_java1260 in java.library.path
    no cp_wrap_cpp in java.library.path
    no concert_wrap_cpp_java1260 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 Main.Solver.main(Solver.java:66)
    Caused by: java.lang.RuntimeException: Native code library failed to load: ensure the appropriate library (opl1260.dll/.so) is in your path.
    Exceptions:
    no opl1260 in java.library.path
    no opl_lang_wrap_cpp in java.library.path
    no opl_core_wrap_cpp_java1260 in java.library.path
    no opl_core_wrap_cpp in java.library.path
    no cp_wrap_cpp_java1260 in java.library.path
    no cp_wrap_cpp in java.library.path
    no concert_wrap_cpp_java1260 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

    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Problem with opl1260.dll.so library when running under Linux

    Posted Mon May 18, 2015 04:05 AM

    Originally posted by: PhilippeLaborie


    Hello,

    Are you sure your jar file was compiled with classpath pointing to the 12.6.1 version? Maybe the manifest in your jar file still points to 12.6.0 ...

    Could you provide the full command lines you used:
    1) for building the jar file
    2) for running it

    Philippe


    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Problem with opl1260.dll.so library when running under Linux

    Posted Wed May 20, 2015 02:32 AM

    Originally posted by: JunhuaWu


    Hi Phillippe,

    Thanks for your help. As Sergey is temporarily out for a trip, I am here to provide more related information to see if we can figure this out.

    Sergey used his Eclipse in his Windows machine to compile and to generate runnable jar files. He had also installed both versions (12.6.0 and 12.6.1) on his Windows machine. The runnable jar files were exported by Eclipse with "Extract required libraries into generated JAR" selected, which means he generated two jar files both internally containing "cplex.jar" and "ILOG.CP.jar" in two different versions. He then uploaded the two jar files into a linux machine, on which two versions of CPLEX_Studio had also been installed.  He then used command lines to call them. The one used to call the jar file with 12.6.1 version of cplex.jar and ILOG.CP.jar contained has been pasted in his post. The other one is similar with only difference of paths to 12.6.0 installation. The latter worked well but the former didn't. Any idea?

    Thanks a lot.

     

     


    #CPOptimizer
    #DecisionOptimization