Topic
  • 3 replies
  • Latest Post - ‏2013-05-17T08:33:05Z by ArnaudS
JorgeGarcíaCastillo
2 Posts

Pinned topic Different oplall.jar for 32 and 64 bit?

‏2013-04-25T08:19:51Z |

Hi all,

I'm working on a project using Java API for CPLEX 12.4, which must work in 32 and 64 bit architectures. When I pack the project with the library oplall.jar from CPLEX 12.4 64bit and the appropiate .dlls it works fine, but when i deploy the application in a 32bit architecture with the same oplall.jar and just change the dlls to the ones in CPLEX 12.4 32bit I get the following error:

 

java.lang.NoSuchMethodError: SwigDirector_IloIntValueEvalWrapper_eval
ilog.cp.cppimpl.cp_wrapJNI.swig_module_init(Native Method)
ilog.cp.cppimpl.cp_wrapJNI.<clinit>(cp_wrapJNI.java:464)
ilog.cp.cppimpl.IloCP.<init>(IloCP.java:109)
ilog.cp.IloCP.<init>(IloCP.java:120)
ilog.cp.IloCP.<init>(IloCP.java:112)

The way we solved it is rebuilding the project with the oplall.jar from CPLEX 12.4, but then It doesn't work for 64 bit architectures (using of course the 64 bit dll) and I get this error:

 

java.lang.NoSuchMethodError: SwigDirector_IloIntValueEvalWrapper_eval
ilog.cp.cppimpl.cp_wrapJNI.swig_module_init(Native Method)
ilog.cp.cppimpl.cp_wrapJNI.<clinit>(cp_wrapJNI.java:464)
ilog.cp.cppimpl.IloCP.<init>(IloCP.java:109)
ilog.cp.IloCP.<init>(IloCP.java:120)
ilog.cp.IloCP.<init>(IloCP.java:112)

As in the documentation of the product doesn't say anything about using the same oplall.jar for different bitness, my question is the following: Is it necessary to use one oplall.jar for each architecture? If it is like that why? And shouldn't it be documented?

 

Thanks in advance.

 

Jorge

Optimization IBM

  • VincentBeraudier
    VincentBeraudier
    4 Posts

    Re: Different oplall.jar for 32 and 64 bit?

    ‏2013-05-02T12:46:59Z  

    The oplall.jar is different depending on the platform because of some JNI functions. It tries to load the corresponding dll/shared lib. So when you mix 32/64 jars/dlls, you end up with a loading issue. In general, it is better to use the content of a specific port instead of installing several ports at the same location.

    We will document it in a next version.

  • JorgeGarcíaCastillo
    2 Posts

    Re: Different oplall.jar for 32 and 64 bit?

    ‏2013-05-06T08:25:44Z  

    The oplall.jar is different depending on the platform because of some JNI functions. It tries to load the corresponding dll/shared lib. So when you mix 32/64 jars/dlls, you end up with a loading issue. In general, it is better to use the content of a specific port instead of installing several ports at the same location.

    We will document it in a next version.

    Thank very much for the answer.

    One last question : Are the oplall.jar also incompatible between operative systems like Linux and Windows?

     

  • ArnaudS
    ArnaudS
    8 Posts

    Re: Different oplall.jar for 32 and 64 bit?

    ‏2013-05-17T08:33:05Z  

    Thank very much for the answer.

    One last question : Are the oplall.jar also incompatible between operative systems like Linux and Windows?

     

    It is recommended to use the oplall.jar coming from the installer of targeted platform.

    Regards