LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-23-2003, 02:19 PM   #1
bigB8210
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Rep: Reputation: 0
Exclamation 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
 
Old 07-23-2003, 05:34 PM   #2
CodeWarrior
Member
 
Registered: Mar 2003
Location: US
Distribution: Kubuntu 6.06
Posts: 173

Rep: Reputation: 30
What version of Tomcat are you using?
 
Old 07-23-2003, 06:35 PM   #3
bigB8210
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Exclamation

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
 
Old 07-23-2003, 10:37 PM   #4
CodeWarrior
Member
 
Registered: Mar 2003
Location: US
Distribution: Kubuntu 6.06
Posts: 173

Rep: Reputation: 30
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

Last edited by CodeWarrior; 07-23-2003 at 10:45 PM.
 
Old 07-24-2003, 10:53 AM   #5
bigB8210
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Exclamation

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
 
Old 07-24-2003, 03:49 PM   #6
bigB8210
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Exclamation 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
 
Old 07-26-2003, 02:50 PM   #7
CodeWarrior
Member
 
Registered: Mar 2003
Location: US
Distribution: Kubuntu 6.06
Posts: 173

Rep: Reputation: 30
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.
 
Old 07-26-2003, 03:28 PM   #8
bigB8210
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Exclamation

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.
 
Old 07-27-2003, 12:54 PM   #9
CodeWarrior
Member
 
Registered: Mar 2003
Location: US
Distribution: Kubuntu 6.06
Posts: 173

Rep: Reputation: 30
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.

Last edited by CodeWarrior; 07-27-2003 at 01:17 PM.
 
Old 10-12-2003, 04:43 AM   #10
kuyalfinator
Member
 
Registered: Jul 2003
Location: Los Angeles
Distribution: RedHat8 2.4.18-14 RedHat9 2.4.20-8 FreeBSD 5.2.1 Ubuntu 10_4 Mandrake 2.4.21-0.13mdk
Posts: 118

Rep: Reputation: 16
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.
 
Old 10-12-2003, 04:51 AM   #11
kuyalfinator
Member
 
Registered: Jul 2003
Location: Los Angeles
Distribution: RedHat8 2.4.18-14 RedHat9 2.4.20-8 FreeBSD 5.2.1 Ubuntu 10_4 Mandrake 2.4.21-0.13mdk
Posts: 118

Rep: Reputation: 16
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installations tableyou Linux - Newbie 3 10-18-2005 11:37 PM
Installations? newbsabott Linux - Newbie 2 06-22-2005 10:32 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 02:31 AM
Installations inescapeableus Linux - Newbie 15 02-21-2004 06:13 PM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 10:47 PM


All times are GMT -5. The time now is 08:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration