Operating System - HP-UX
1748219 Members
4823 Online
108759 Solutions
New Discussion юеВ

Re: Which libraries are needed for SDK 1.4 in a chroot?

 
Arthur Luimes_2
Occasional Advisor

Which libraries are needed for SDK 1.4 in a chroot?

We are running Tomcat 5.5.9 on Java SDK 1.4.2.08. I have set up a chroot for Tomcat to run in, where I have copied all libraries in /usr/lib to the chroot.

Naturally, I want to limit the number of libraries in /usr/lib in the chroot, but removing them one by one and testing the application is very time consuming.

"ldd" mentions only 3 libraries which are supposedly needed (libc.2, libdld.2, libpthread.1), but java definitely doesn't run if I have only these libraries in my chroot.

Does anyone have an overview which libraries are needed to run the java executable?

Thanks a lot for your support,

Arthur Luimes
4 REPLIES 4
RAC_1
Honored Contributor

Re: Which libraries are needed for SDK 1.4 in a chroot?

ldd on java executable and on chatr on individual libs that it reports.
There is no substitute to HARDWORK
Arthur Luimes_2
Occasional Advisor

Re: Which libraries are needed for SDK 1.4 in a chroot?

Sorry to be so new to this area. I tried what you suggested, but ldd only reports three libraries (libc.2, libdld.2, libpthread.1), and chatr on these libraries does not point to other libraries. Still Java/Tomcat does not start in the chroot: it complains about an endless amount of libraries that are missing: dld.sl, libCsup.2, libcl.2, libisamstub.1, etc)

What to do?
Stuart Abramson
Trusted Contributor

Re: Which libraries are needed for SDK 1.4 in a chroot?

When we run Java, we set the user's PATH to:

To actually run java you must set your path:

export PATH=$PATH:/opt/java1.3/bin/

# java -version

java version "1.3.1.10"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.3.1.10-030630-10:50)
Java HotSpot(TM) Server VM (build 1.3.1 1.3.1.10-
_30_jun_2003_11_52 PA2.0, mixed mode)
Arthur Luimes_2
Occasional Advisor

Re: Which libraries are needed for SDK 1.4 in a chroot?

The path is set OK: My chroot can find the java executable, but then complains about missing libraries. Now I have copied the following:
-r-xr-xr-x 1 bin bin 241664 Sep 18 2003 dld.sl
-r-xr-xr-x 1 bin bin 208896 Sep 25 2002 libCsup.2
-r-xr-xr-x 1 bin bin 1568768 Sep 28 2003 libc.2
-r-xr-xr-x 1 bin bin 1261568 Feb 14 2003 libcl.2
-r-xr-xr-x 1 bin bin 24576 Sep 18 2003 libdld.2
-r-xr-xr-x 1 bin bin 12288 Dec 17 1999 libisamstub.1
-r-xr-xr-x 1 bin bin 282624 May 29 2001 libm.2
-r-xr-xr-x 1 bin bin 143360 Dec 6 2003 libpthread.1
-r-xr-xr-x 1 bin bin 32768 Nov 7 1997 librt.2

But still it's not enough. The output of starting Tomcat is:
Created MBeanServer
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
Caused by: java.lang.UnsatisfiedLinkError: /usr/local/sdk14208/opt/java1.4/jre/lib/PA_RISC/libnet.sl: insufficient room in the address space to load the library.
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1611)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)
at java.lang.Runtime.loadLibrary0(Runtime.java:795)
at java.lang.System.loadLibrary(System.java:834)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.PlainSocketImpl.(PlainSocketImpl.java:60)
at java.net.ServerSocket.setImpl(ServerSocket.java:242)
at java.net.ServerSocket.(ServerSocket.java:182)
at java.net.ServerSocket.(ServerSocket.java:141)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
at org.apache.catalina.connector.Connector.initialize(Connector.java:928)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
... 6 more