Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  An exception occured in the native method OPLsolver.build

    Posted 12/18/07 07:28 PM

    Originally posted by: SystemAdmin


    [Pokerface said:]

    Hello,

    I'm a Java developer tasked with picking up the pieces of an existing project. I'm new to this company, and a lot of project specific knowledge has walked out the door.

    I've recently installed CPLEX and OPL to my local PC, along with all our code. When I run a test request, I get an exception throw by OPLsolver (see below). When I run this same test to another environment (thats been up and running for quite a while), I do not get this error. The environments are the same (i.e. same Java code, same database, same version of CPLEX) except that (I suspect) my environment has different CPLEX installation/configuration.

    The exception below is not very informative. Can you shed some light on what it might indicate?

    For my suspected installation differences, is there a tool or procedure to compare installations in an informative way?

    The exception thrown:
    Runtime exception (OPLexception):An exception occured in the native method OPLsolver.build

    Regards,
    Pokerface

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: An exception occured in the native method OPLsolver.build

    Posted 12/19/07 12:38 AM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hi,

    seen the error message, it seems to be using API of OPL 3.x ?
    Can you confirm this is the case ?
    This version us very old and unsupported currently, so before suggesting solutions, could you check if you have a chance to upgrade to a more recent version of OPL (currently OPL5.5) ?

    Thanks,
    Alain
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: An exception occured in the native method OPLsolver.build

    Posted 12/20/07 11:48 AM

    Originally posted by: SystemAdmin


    [vblanchard said:]

    This exception could be linked to a licensing issue in your test environment.
    Could you check that you have a valid access.ilm file for your machine? After making sure that the environment variable ILOG_LICENSE_FILE is set to this access.ilm, execute ilmcheck in your ILM installation directory.
    In the license file, you need a license for not only OPL but also CPLEX.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: An exception occured in the native method OPLsolver.build

    Posted 12/20/07 05:47 PM

    Originally posted by: SystemAdmin


    [Pokerface said:]

    I've added the ILOG_LICENSE_FILE environment variable. Please note that the ilmcheck worked before adding this environment variable, presumably due to installing CPLEX at the default location. See output below:

    [color=blue]C:\ILOG\ILM>ilmcheck.exe
    Checking license file "c:\ilog\ilm\access.ilm"
    License file "c:\ilog\ilm\access.ilm" is correct.[/color]

    However, with the addition of that environment variable as the only change from my last test, I no longer get the OPLexception:

    [color=blue]An exception occured in the native method OPLsolver.build[/color]

    Instead, I now get the OPLexception:

    [color=blue]An exception occured in the native method OPLsolver.loadCompiledModelBuffAndDataBuff[/color]

    I seams that the base problem is with installation/configuration of OPL. When I run the MyJNIsample, I get "no Access Key for Solver" as the output. I assume this indicates OPL as the problem. See the output below:

    [color=blue]C:\ILOG\OPLSt371\examples\component\jni>java -classpath "c:/ILOG/OPLSt371/classes/opljni.jar;." MyJNIsample
    Intiantiating the OPLsolver engine...
    Intiantiating the error reporter...
    Setting the error reporter...
    Loading the queens8.mod file...
    Solving the model...
    runtime error: line 0: [/color] [color=red]no Access Key for Solver[/color]

    [color=blue]Deleting the error reporter and the OPLsolver engine...[/color]


    Here are the versions of the products I have installed:

    ILOG CPLEX 11.0 for Windows x86
    ILOG OPLStudio 5.5 for Windows x86

    We are actually contemplating an upgrade. My company, Invision Inc, is working with folks at ILOG to determine whether we want to continue with these ILOG products. We have a coordinated effort with Cindy Bartholomew (account manager) at ILOG concerning this. For more details, please see Cindy.

    My task is to provide a test environment, and test tools, for ILOG to demonstrate the improvements the new versions will provide. To that end, I'm trying to (first) get my development environment working properly.

    Again, please note that this same test works fine in another existing environment here at Invision. Hence, my suspension that this is simply an installation/configuration problem.

    I opened case #1-81329756 on Tuesday for this issue as well. I have not been provided a response as yet.

    If it would be helpful to contact me, please do so.

    Regards,
    Chris Skaggs
    Sr. Application Architect
    770-325-0456

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: An exception occured in the native method OPLsolver.build

    Posted 12/21/07 10:56 AM

    Originally posted by: SystemAdmin


    [vblanchard said:]

    From the error message "no Access Key for Solver", I understand that your model is solved using ILOG Solver (and not ILOG CPLEX), therefore, you need a key for ILOG Solver. To know what license is required, I invite you to look at the Component Libraries User's Manual, in the section "Before You Begin > Licensing Requirements".

    Could you check that your file access.ilm contains a key for ILOG Solver?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: An exception occured in the native method OPLsolver.build

    Posted 12/21/07 11:37 AM

    Originally posted by: SystemAdmin


    [vblanchard said:]

    I re-read your message and noticed that you load queens8 that is solved by Solver. So if you don't have a Solver key, you might want to load a different model that is solved by CPLEX (Note that this answer is for OPL 3.7.1, not OPL 5.5)
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: An exception occured in the native method OPLsolver.build

    Posted 12/21/07 04:59 PM

    Originally posted by: SystemAdmin


    [Pokerface said:]

    The MyJNIsample application was created by ILOG and came as part of the installtion. I assumed it existed as a way to test an installation, similar to the ilmcheck.exe applicaion, and I ran that in hopes that it my help guides us to a resolution of the problem reported above. I am not interested in resolving the issue wiht MyJNIsample.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: An exception occured in the native method OPLsolver.build

    Posted 12/21/07 07:58 PM

    Originally posted by: SystemAdmin


    [Pokerface said:]

    I have verified that we have OPL 3.7 and CPLEX 9.0.
    Sorry for the confusion.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer