LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Tomcat Installations (https://www.linuxquestions.org/questions/linux-software-2/tomcat-installations-75244/)

bigB8210 07-23-2003 01:19 PM

Tomcat Installations
 
I am trying to install tomcat onto a Linux Kernel machine. The installation goes smoothly and so does the startup of tomcat, but when I try to access it via web browser, by using it's IP address followed by :8080, I get a cannot find server page.

When I shutdown Tomcat I get a message displaying the following after four USING statements:

/j2sdk.1.4.2/bin/java: error while loading shared libraries: libpthread.so.0 cannot open shared file: No such file or directory

Any ideas or solutions would be greatly appreciated.

Thanks

CodeWarrior 07-23-2003 04:34 PM

What version of Tomcat are you using?

bigB8210 07-23-2003 05:35 PM

I have tried two different installation types, one that I got from the Apache/Tomcat website yesterday and the other that I got off of the www.joot.com\box\ website, called BOX installation, both using versions 4.1.18 of Tomcat and both giving me the same result as mentioned in my initial message.

Once again, any assistance you can offer would be greatly appreaciated.

Thanks

CodeWarrior 07-23-2003 09:37 PM

I never saw this particular error with TOmcat, but I have seen my share. I finally got it working this week after several attempts. Here are some pieces of advice I can give you..

1.) You said that you had j2SE1.4.2, make sure you have the full version(~35megs) not the JRE(Java Runtime enviroment). Tomcat needs the Java compiler to do the JSPs.

2.) In my expereince I have found that Tomcat and J2SE have a hard time getting along with each other unless they are both a particular version. I have the combo of J2SE1.4.2 and Tomcat 4.1.24 running now and they work fine together. I would say you get rid of your other versions and try this pair. Here are my failed attempts...

a.) JDK1.2.2 & Tomcat 4.1.24
b.) JDK1.2.2 & Tomcat3.3.1a
and probably more but can't remember.

3.) Make sure you set the environment variables properly.

export JAVA_HOME = dir where J2SE1.4.2 is located
export CATALINA_HOME = dir where Tomcat4.1.24 is located

And also include $JAVA_HOME/bin in your PATH variable

4.) Download Tomcat 4.1.24 from here:
http://jakarta.apache.org/site/binindex.cgi
Choose the release build

Download J2SE1.4.2 from here:
http://java.sun.com/j2se/
follow the links from here for J2SE1.4.2


I am not sure it that will fix your specific situation, but like I said I could not get Tomcat to work on several attempts either in WInXP nor SLack 9.0. But now after several posts on this topic and research I have it up and running. Start from scratch, get rid of your old versions, install the new versions and don't forget to adjust your profile so that it references the new software. Good Luck and let us know how you are doing with it :cool

bigB8210 07-24-2003 09:53 AM

Tried starting over, ended up with the same result, I did download the above suggested files. The following is the procedure I followed, if there is something wrong with it please let me know:

1)Moved both j2sdk-1_4_2....bin and tomcat-4.1.24.....tar.gz from my download directory to /usr/

2)Did a chmod 555 to the j2sdk....bin file and then ran the .bin file
-At this point I did notice one this, when it said the following then continued till the end

Creating j2sdk1.4.2/jre/lib/rt.jar
Terminated

3)Did a gunzip followed by a tar -xvf to the tomcat.....tar.gz file
-When doing the tar -xvf I received a number of messages as seen below.

tar: Names longer than 100 chars not supported

4)I then did the following commands

export JAVA_HOME=/usr/j2sdk1.4.2
export CATALINA_HOME=/usr/jakarta-tomcat-4.1.24-LE-jdk14

5)Then I started up Tomcat with the command $CATALINA_HOME/bin/startup.sh

-The following is the print out I recieved

USING CATALINA_BASE: /usr/jakarta......
USING CATALINA_HOME: /usr/jakarta......
USING CATALINA_TMPDIR: /usr/jakarta...../temp
USING JAVA_HOME: /usr/j2sdk1.4.2

6)Now I start up an Internet Explorer, type in //192.168.0.6:8080 and then I get a CANNOT FIND SERVER message

7)I then to a $CATALINA_HOME/bin/shutdown.sh command and I recieve the following printout:

USING CATALINA_BASE: /usr/jakarta......
USING CATALINA_HOME: /usr/jakarta......
USING CATALINA_TMPDIR: /usr/jakarta...../temp
USING JAVA_HOME: /usr/j2sdk1.4.2
/usr/j2sdk1.4.2//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

I have tried distroying then re-installing everything and I always end up write back where I am.

Any suggestions or solutions are greatly appreciated

Thanks

bigB8210 07-24-2003 02:49 PM

Java Problem on Linux
 
Ok, after working all day on this I have discovered that the reason Tomcat is not working is due to the error which must be a java error.

I think I put the error up earlier but in so you don't have to look here it is again.

/usr/j2sdk1.4.2/bin/javac: error while loading shared libraries: libthread.so.0: cannot open shared file: No such file or directory

Any suggestion are greatly appreciated, please let me know

CodeWarrior 07-26-2003 01:50 PM

Can you compile any Java programs with the javac <filename>.java command? What does the system say when you do? Also do you have a classpath variable set in your profile? I have not set one in mine and I am not having any problems.

bigB8210 07-26-2003 02:28 PM

None of the Java commands work for anything I keep on getting the

/usr/j2sdk1.4.2/bin/javac: error while loading shared libraries: libthread.so.0: cannot open shared file: No such file or directory

message. Yes I do have an environment variable set.

CodeWarrior 07-27-2003 11:54 AM

mmmmm... wierd

First thing is first. I am logged in as root and I modified the profile file in the /etc directory. Please make sure you are doing that.

In your previous posts you never said if you added $JAVA_HOME/bin to your PATH variable. Did you do that? If not then do it.

I don't have a class path varibale at all and things are working fine for me. Trying commenting out all references to this variable.


Once all your changes have been made to your profile file, save the file and, either reboot or run the command:

source /etc/profile

Then try again to see if you can compile any java file with the javac command.

Here is a good article on installing JDK, but should be the same for J2SE/SDK. http://www.justlinux.com/nhf/Program...lling_JDK.html

It's what I first looked at and it helped. Just ommit the Class path part.

kuyalfinator 10-12-2003 03:43 AM

Quote:

Originally posted by bigB8210


5)Then I started up Tomcat with the command $CATALINA_HOME/bin/startup.sh

-The following is the print out I recieved

USING CATALINA_BASE: /usr/jakarta......
USING CATALINA_HOME: /usr/jakarta......
USING CATALINA_TMPDIR: /usr/jakarta...../temp
USING JAVA_HOME: /usr/j2sdk1.4.2


Thanks [/B]
This is as far as ai got. Here is something that might be useful. The log is created when
tomcat doesn't run. This is the error I get.

Code:

Can't load server.xml
Can't load server.xml
[INFO] Catalina - -Server startup in 0 ms
java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
        at org.apache.catalina.startup.Catalina.await(Catalina.java:634)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:596)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:392)

Two exceptions are thrown in Catalina and Bootstrap. Would like to know what versions
I am using of tomcat and java I am using?
tomcat 5.0.12
jdk 1.3.1

This could be that I forget some settings in the script or it is a bug in how Catalina and
Bootstrap were coded.

kuyalfinator 10-12-2003 03:51 AM

did get other boxes working
 
On some other pervious installation, I managed to install the windows
version of tomcat. Win98 and WinXP. Both operating systems are using
tomcat 4.1.27. Windows 98 is using Java 1.4.1_02 Windows XP is using
Java 1.4.2_01. Installation went smoothly on windows machines.

It wasn't until I tried a later version of tomcat 5.0.12 with an older
version of Java 1.3.1 to work on Linux was when I started to get problems.
I am in the process of downloading the J2SE JDK 1.4.2_01 and install that
on the Linux machine. I do need to upgrade my JDK. If the JDK doesn't work,
I will try to get a 'stable' version of tomcat for Linux.


All times are GMT -5. The time now is 12:54 PM.