• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

The CATALINA_HOME enviornment variable

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Every time i try to start Tomcat it says

Although i have set it in my autoexec as this

Can anyone please explain what is wrong?

Thanks
Taash
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't put a space between the = sign and C:\etc, etc...
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike,
I have no spaces any where in my autoexec between the C:\Tomcat\...

Thanks
Taash
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I see a space there on the last line after the =
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike and Haydy,
I am really sorry about that Space.It is a typing mistake. but in my Autoexec.bat ther eis no space in that place...
Thanks
Taash
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Adam
I am sorry about typing ur name wrong please excuse my bad typing..
Thanks
Taash
 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also make sure that your CATALINA_HOME path setting line does NOT end with a semi-colon.
Bye,
Tualha Khan
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi taash
you can follow the discussion on this link.

https://coderanch.com/t/81833/Tomcat/tomcat-installation-please-help
also...what is your tomcat directory ?
is it a zip file ? do not put that in the path
try once again and see.
thanks
mary
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mary,
Actually i had read ur post earlier and tried to install tomcat from the nightly blinds too but nothing happened. Anyways i have tried it again, deleted my older version and installed the version u had done...i did it like like this
this is my autoexec now

i just changed the memory requirements for the the startup and shutdown bat files and then added the <DefaultContext relaodable="true"/> line to my server.xml as mentioned..
but sadly when i ran my startup.bat it is still giving me the same

but when i try to run startup from my command prompt, it throws this exception

any ideas?
Thanks
Taash
 
mary nathan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi taash
what is c:\JAKARTA-TOMCAT ?
all your webapps,common,......are in
TOMCAT-JAKARTA-4.0. right ?
what i did was i copied JAKARTA-TOMCAT-4.0 to
c:\. and i moved JAKARTA-TOMCAT to some other sub directory in c:\ .and it worked fine.
you can do that and see.
one more thing...my actual zip file when it
was downloaded was
c:\tomcat-jakarta-4.0-20020514 .in that
i have tomcat-jakarta-4.0 file with all sub directories.
thanks
mary
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mary,
Yep JAKARTA-TOMCAT-4.0 is where my common\lib was, as when i unzipped it, it asked me to make a folder under which i would place my unzipped files and i said JAKARTA-TOMCAT.
i tried again with the exact nightly blind u mentioned. but it is still the same, it still gives a exception and closes down when i try to open it manually thru the command prompt, and when i try to do it the other way(going to the dir in windows and opening startup.bat)it gives me the same

althought this time i unzipped my files in the C:\ directly, now it is like this
my autoexec

Thanks again
Taash
 
mary nathan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi taash
did you restart the system once you have changed autoexec.bat file ? i am just reminding....
close the internet first and then make sure you
have restarted.
thanks
mary
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi mary,
i ran the autoexec.bat again but did not restart. let me do it too

Thanks
Taash
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi mary,
i rebooted and all but still the same problem persists.

thanks
Taash
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi again,
you can type environment variables in at the command line in windows when you are trying this, you don't need to have it in autoexec.bat until you know it works. saves alot of rebooting. Try something like this, changing the env vars for your values:
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Adam,
Thanks for replying. Didi u mean setting my variables at he command prompt... well i have tried that several times, but i just am not able to start Tomcat. On ur suggestion i trie dto do it again but it still is acting stubborn and exits after giving exceptions. i reach till here,

then a new window opens and then there are some exceptions that it throws in the new window and that window closes
please let me know if u have some ideas
Thanks
Taash
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Taash,
When you set environment variables from the command line, you are only setting them in the scope of that terminal window. As soon as you come back to your desktop, the variables are out of scope.
So if you set them at the command-line, you have to use them there. In other words, you will have to run startup.bat from that same terminal window.
If you set them in Autoexec.bat and reboot, they should be global. If you are running Windows NT/2000/XP you don't use Autoexec.bat and can't set variables there.
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bodie,
I have Win ME on my comp, this is why i set it in the autoexec. but however i set this varible i am not getting results as i tried setting it in both ways. (in the autoexec & from the command prompt)

Thanks
Taash
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i thought atfirst that this exception throwing of tomcat is just the problem i m facing but seeing various posts i am realising that it is the problem with quite a few people.But alas i found no solution to this...
Taash
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
theres good news i had JDK1.3 on my machine and today i changed it to J2SDK1.4 & so now tomcat has started working. I hope not to stop again..I think that exception and that CATALINA_HOME enviornment error could have been 'coz of the java version, but if so how was it working earlier. I hope i get the answer to that somehow, but till then "Hurray" atleast i can start working on my servlets and Jsps

Thanks a lot all of u for ur help and time. i am really grateful
Cheers
Taash
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm glad you got it to work. However, I don't know if updating your JDK version was the solution...I'm using JDK1.3.1. with Tomcat 4.0.3.
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nicole,
I really don't know what the problem was because tomcat was working properly earlier on before i installed the J2SE-1.4,and then suddenly one day started saying that the CATALINA_HOME variable was not ser properly.. but after i installed my new java version it worked and so i am glad. Do u know what could have been the problem?

Cheers
Taash
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if this is the solution, but I found that if catalina_home is under a directory, the directory (folder) names shouldn't be more than 8 characters in length. Folders greater than 8 characters in length have caused problems for me in the past for some reason so I have my tomcat and catalina_home set to
d:\tools\tomcat4
I try to keep the folder names small for DOS sake.
Maybe this will help also.
- Mike
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike,
I understand that sometimes long names can be a problem and maybe that was the reason for those exceptions, but if so then it has to screw up again as my directory structure is like
C:\jakarta-tomcat-4.0.1\webapps\Root\WEB-INF\classes\.......
i hope it doesn't, till now it has posed no problem i have been using it sucessfully for about a week now.
Cheers
Taash
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys!I'm facing a similar prob as taash.When I start my Tomcat 4,the dos window says starting Tomcat standalone
Apache Tomcat/4.0.3
Starting Service Tomcat-Apache
Apache Tomcat/4.0.3
I can execute servlet examples with it.
so far so good.
But when i try try to execute ANY JSP examples I get the following error:
HTTP 500 Internal Server Error
Error Description :
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: sun/tools/javac/Main
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:485)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)

root cause
java.lang.NoClassDefFoundError: sun/tools/javac/Main
at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:272)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)
PLz help me out guys as i never had any problem of this sort with JRun3.0
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vedhas
Have u put the tools.jar file in ur classpath. please check it out

u need it there with ur servlet.jar
Cheers
Taash
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure your JAVA_HOME points to the root of your jdk install (not the bin directory!)
 
Vedhas Pitkar
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx a lot ,taash!Worked for me well.In fact there was no tools.jar after installation so just copy pasted it from jdk1.3 & it started working!
reply
    Bookmark Topic Watch Topic
  • New Topic