axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From charles.r...@gm.com
Subject Re: Having difficulty using native libraries (Tomcat and SHLIB)
Date Tue, 26 Oct 2004 18:33:29 GMT
-------------------------
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: charles.rosa@gm.com
----- Forwarded by Charles H Rosa/US/GM/GMC on 10/26/2004 02:33 PM -----
                                                                                         
                                        
                      Charles H Rosa                                                     
                                        
                                               To:       axis-user@ws.apache.org         
                                        
                      10/26/2004 01:33         cc:                                       
                                        
                      PM                       Subject:  Re: Having difficulty using native
libraries (Tomcat and SHLIB)          
                                                                                         
                                        
                                                                                         
                                        



-------------------------
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: charles.rosa@gm.com
----- Forwarded by Charles H Rosa/US/GM/GMC on 10/26/2004 01:33 PM -----
                                                                                         
                                       
                      Charles H Rosa                                                     
                                       
                                               To:      noah.fiedel@jeppesen.com         
                                       
                      10/26/2004 01:32         cc:                                       
                                       
                      PM                       Subject: Re: Having difficulty using native
libraries (Tomcat and SHLIB)(Document 
                                               link: Charles H Rosa)                     
                                       
                                                                                         
                                       



Noah,
I'm fairly new to Tomcat.
Can you clarify for me where the
tomcat-startup shell script is located?
Is this the file called:
startup.sh
found in /home/or/bzmclr/tomcat-jwsdp-1.4/bin
where /home/or/bzmclr/tomcat-jwsdp-1.4/
is the home directory for tomcat on my machine.

Also, if I do put a line into this file that points
to the location of the binary (which in my case is equal to:
/export/rainier/cplex90/bin/ultrasparc32_8_6.2
)
will this overwrite some other locations that are part
of SHLIB_PATH by default.
In particular, how do I add /export/rainier/cplex90/bin/ultrasparc32_8_6.2
to
SHLIB_PATH without overwriting what's in
SHLIB_PATH by default?

Thanks for the clarification.

Best regards, 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: charles.rosa@gm.com


                                                                                         
                                        
                      noah.fiedel@jeppe                                                  
                                        
                      sen.com                  To:       axis-user@ws.apache.org         
                                        
                                               cc:                                       
                                        
                      10/22/2004 02:07         Subject:  Re: Having difficulty using native
libraries (Tomcat and SHLIB)          
                      PM                                                                 
                                        
                      Please respond to                                                  
                                        
                      axis-user                                                          
                                        
                                                                                         
                                        
                                                                                         
                                        





Hi,
        I had a similar issue on an HP-UX server recently. The solution was
to make sure that the SHLIB environment variable is set in the
shell/environment that runs your java process. In my tomcat-startup shell
script, I added the line:
        export SHLIB_PATH=$CATALINA_HOME/lib/

        In this case, $CATALINA_HOME was my tomcat home directory, and the
library file was in the lib subdirectory.

        Hope this helps,
        Noah



                                                                           
 charles.rosa@gm.co                                                        
 m                                                                         
                                                                        To 
                            axis-user@ws.apache.org                        
 10/22/2004 10:36                                                       cc 
 AM                                                                        
                                                                   Subject 
                            Re: Having difficulty using native libraries   
  Please respond to         within Web Service running on Axis             
  axis-user@ws.apac                                                        
       he.org                                                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           






-



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: charles.rosa@gm.com











Mime
View raw message