Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 23rd, 2002, 03:15 AM
Shocka's Avatar
Shocka Shocka is offline
dont click here
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 409 Shocka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 35 m
Reputation Power: 7
Help setting up Tomcat 4 w/ Apache 2

Well i got it setup, and it runs, BUT

it wont compile anything. I get an exception thrown saying unable to compile and a classname.

I looked at the tomcat window and it says can not find
com.sun.javac.Main
JAVA_HOME might not point to the JDK, but
JAVA_HOME is set to
c:\j2sdk1.4.1_01
where my jdk.

i even tried setting JAVA_HOME to c:\j2sdk1.4.1_01\bin

Any ideas on this?


EDIT: Ok Servlets are working fine. Well those that came with the examples are working (were they precompiled??)

But no JSP pages work.

Here is the exact error i get
Code:
type Exception report

message 

description The server encountered an internal error () that prevented it from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file


 

Last edited by Shocka : December 23rd, 2002 at 03:26 AM.

Reply With Quote
  #2  
Old December 23rd, 2002, 04:57 AM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
I could swear I've run into this before, but specifics are escaping me right now.

How is your classpath set? I think you need the tools.jar file in there in order to compile stuff.

Also, I seem to remember the Tomcat 4.1 install figuring all that stuff out for itself... Maybe I was just lucky.
__________________
-james

Reply With Quote
  #3  
Old December 30th, 2002, 12:50 PM
Shocka's Avatar
Shocka Shocka is offline
dont click here
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 409 Shocka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 35 m
Reputation Power: 7
i tired
CLASSPATH C:\j2sdk1.4.1_01\lib
and
CLASSPATH C:\j2sdk1.4.1_01

neither worked.

I have JAVA_HOME set I have CATALINA_HOME set

JAVA_HOME c:\j2sdk1.4.1_01

CATALINA_HOME c:\Program Files\Apache Group\Tomcat 4

i cant figure out whats wrong?


reading the error from the Tomcat server screen it says basically can not find tools.javac.Main in classpath but its set..

Oh well ill keep trucking.

Reply With Quote
  #4  
Old December 30th, 2002, 01:04 PM
Shocka's Avatar
Shocka Shocka is offline
dont click here
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 409 Shocka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 35 m
Reputation Power: 7
OK NOW i am even more confused I just decided to run tomcat

by using catalina.bat run

and IT WORKS!!!!

but their start tomcat link it created doesnt work.. Now im confused and the next step is to figure out how to start tomcat so the command window isnt there.

oh well..

Reply With Quote
  #5  
Old December 30th, 2002, 03:58 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
The only way to get rid of the command window (as far as I know) is to run it as a service.

Reply With Quote
  #6  
Old December 30th, 2002, 04:21 PM
Shocka's Avatar
Shocka Shocka is offline
dont click here
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 409 Shocka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 35 m
Reputation Power: 7
Quote:
Originally posted by bricker42
The only way to get rid of the command window (as far as I know) is to run it as a service.


yah i gotta figure out how to get this to work. I have it as a service but it starts and stops. No idea why..

Reply With Quote
  #7  
Old December 30th, 2002, 06:27 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Well, I just did a fresh install with jdk 1.4.0 and Tomcat 4.1.

I don't have any environment variables set, and I have the jdk installed on my D: drive.

The setup found the jdk, asked me what I wanted to install (nt service, etc.), and where I wanted to install it (D:, again). It installed, started the service, and now http://localhost:8080/index.jsp has some info about jakarta apache tomcat etc.

So, my recommendation to you (since this has been taking forever ), is to uninstall tomcat, java, etc. Install the 1.4.x jdk. Grab the latest windows binary for tomcat at http://mirrors.theonlinerecordstore...mcat-4.1.18.exe and install. It should go seemlessly .

Reply With Quote
  #8  
Old January 1st, 2003, 01:03 AM
Shocka's Avatar
Shocka Shocka is offline
dont click here
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 409 Shocka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 35 m
Reputation Power: 7
Quote:
Originally posted by bricker42
Well, I just did a fresh install with jdk 1.4.0 and Tomcat 4.1.

I don't have any environment variables set, and I have the jdk installed on my D: drive.

The setup found the jdk, asked me what I wanted to install (nt service, etc.), and where I wanted to install it (D:, again). It installed, started the service, and now http://localhost:8080/index.jsp has some info about jakarta apache tomcat etc.

So, my recommendation to you (since this has been taking forever ), is to uninstall tomcat, java, etc. Install the 1.4.x jdk. Grab the latest windows binary for tomcat at http://mirrors.theonlinerecordstore...mcat-4.1.18.exe and install. It should go seemlessly .


advice taken will do after i get back from india in 3 weeks

Reply With Quote
  #9  
Old January 1st, 2003, 01:46 AM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Ahhhh, man. But that's, like, practically forever!

Let me know how it goes.

Reply With Quote
  #10  
Old March 26th, 2003, 09:47 PM
esosa esosa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Mexicali Mexico
Posts: 23 esosa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to esosa
I ran into exactly the same problem

My conclusions are that, the default installation of the Service done by the installer is incorrect, there must be a missing parameter.

What I did is that, I stopped the Service, wich was displayed as Apache Tomcat 4.1 on my win2k Pro machine

then, I ran the startup.bat file, and everything ran just fine, so I tought maybe the service was not installed correctly

well, Then, I ran the shutdown.bat file, and started the Service, everything ran fine, except for the Add User Database option in the Administration web interface for tomcat, so I suppossed some parameter was not working

what I did is that I run the uninstall method of the tomcat.exe to delete the apache tomcat 4.1 service, as this with the command line, I was located at the bin directory of the tomcat installation

Code:
tomcat.exe -uninstall "Apache Tomcat 4.1"


Then I typed manually, well, I did not really type it, I did a copy paste from a URL I found through a google search at https://instruct.unc.edu/wcb/school...essages/11.html

The trick is that everything has to be in one line, (with quotes and everything, as it is here bellow)

Code:
"%CATALINA_HOME%\bin\tomcat.exe" -install Tomcat "%JAVA_HOME%\jre\bin\client\jvm.dll"  -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar" -Dcatalina.home="%CATALINA_HOME%" -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out "%CATALINA_HOME%"\logs\stderr.log


The new service is now named Tomcat, and everything runs just fine.

I am happy at last !!!!

Happy coding

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Help setting up Tomcat 4 w/ Apache 2


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT