-
I am trying to create a web service (that runs on a Sun Unix workstation) that includes an optimization library called CPLEX. I have added the jar file: cplex.jar to the directory: /home/or/bzmclr/tomcat-jwsdp-1.4/webapps/axis/WEB-INF/lib I found that I had to do this even though I set my CLASSPATH to include the location of cplex.jar (which was originally stored somewhere else). Now, I'm having trouble because Axis can't seem to find the location of the CPLEX binaries This is inspite of the fact that I added the location of the CPLEX Unix binaries to the path. In particular, PATH=/usr/local/bin:/common/site/scripts/midrange:/apps/lsf_appl/bin:/apps/lsf_d ata:/apps/local/bin:/apps/local/bin/SunOS/5:/usr/openwin/bin:/usr/sbin:/apps/fra me/bin:/usr/local/bin:/bin:/usr/bin:/usr/dt/bin:/usr/ucb:/usr/bsd:/usr/bin/X11:/ common/ce/scripts:/apps/tex/bin/sparc-sun-solaris2.8:/home/or/bzmclr:/home/or/bz mclr/bin:.:/usr/openwin/bin:/export/rainier/cplex90/bin/ultrasparc32_8_6.2 and the CPLEX binary is contained in the subdirectory /export/rainier/cplex90/bin/ultrasparc32_8_6.2 Still, I get the message: java.lang.UnsatisfiedLinkError: no cplex90 in java.library.path java.library.path must point to the directory containing the CPLEX shared librar y try invoking java with java -Djava.library.path=... ModelGenerator::solveModelViaIterativeAlgorithm() - java.lang.UnsatisfiedLinkErr or: CPXopenCPLEX java.lang.Exception: ModelGenerator::solveModelViaIterativeAlgorithm() - java.la ng.UnsatisfiedLinkError: CPXopenCPLEX at portfoliooptimization_webservice.ModelGenerator.solveModelViaIterativ eAlgorithm(ModelGenerator.java:1829) at portfoliooptimization_webservice.ModelGenerator_wrapper.solveModelVia IterativeAlgorithm(ModelGenerator_wrapper.java:1597) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.j ava:402) Also, before the java.lang.UnsatisfiedLinkError is thrown, when I print out System.err.println(AxisProperties.getProperty("java.library.path")); I see: /usr/j2se/jre/lib/sparc/client:/usr/j2se/jre/lib/sparc:/usr/j2se/jre/../lib/spar c:/usr/lib which, as you can see, doesn't include: /export/rainier/cplex90/bin/ultrasparc32_8_6.2 So, even though I have added the directory that contains the necessary binaries to the path, once inside the web service, axis seems to overwrite the path to include only: /usr/j2se/jre/lib/sparc/client:/usr/j2se/jre/lib/sparc:/usr/j2se/jre/../lib/spar c:/usr/lib If anyone has any thoughs on how to get Axis to correctly read in the path so that it knows where to search for the binaries, I would be much obliged. Thanks, Charlie ------------------------- Charles H. Rosa, Ph.D. Staff Research Engineer General Motors Corporation R&D and Planning Mail Code 480-106-359 30500 Mound Rd Warren, MI 48090-9055 Tel/work/cell: +1 248 670-8389 Fax/work: +1 586 986-0574 Email: [EMAIL PROTECTED]