• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Need Help starting Tomcat

 
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I try to start Tomcat 4.0, I got the following error.
--
You must set JAVA_HOME to point at your Java Development Kit installation
--
Then I issue the following command at DOS-Prompt
set JAVA_HOME=c:\j2sdk1.4.0
but still the same problem,
Can somebody help...
TIA,
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what about the CATALINA_HOME variable. It should point to your Tomcat installation.
 
Muhammad Farooq
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its already done too.
c:\>set CATALINA_HOME = c:\Tomcat 4.0
Now what???
 
Muhammad Farooq
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have reach thus far to receive this message when I try to start Tomcat4.0
---
Using CATALINA_BASE: C:\Tomcat4.0
Using CATALINA_HOME: C:\Tomcat4.0
Using CATALINA_TMPDIR: C:\Tomcat4.0\temp
Using JAVA_HOME: C:\J2SDK1.4.0
Bad command or file name
---
Can someone help me.
TIA,
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Farooq
It looks that you've done all but it's not running.
Do the following step by step:
I assure that you are running Win98 OS.
1. Remove your current tomcat installation
2. Unpack/install tomcat in your drive suppose c:>
3. Rename jakarta-tomcat-4.0... as tomcat4
4. go to c:\tomcat4\bin directory
5. set java_home=c:\jdk1.4 (whateve is it)
6. set catalina_home=.. (however, it's not necessary startup.bat file looks after it)
7. type startup
Actually tomcat beta versions sometime encounter problems try to run its final release however if it also does not help try to run tomcat3.2 which is a final release and it may suffices your requirement but in that case you will have to set tomcat_home instead of catalina_home.
Further, you also need to compile your servlets to adjust classpath of servlet.jar file which might be in your c:\tomcat4\common\lib directory.
Hope it helps.
Rashid Ali
[ April 23, 2002: Message edited by: Rashid Ali ]
 
Muhammad Farooq
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rashid,
All this is I get by following your instruction
--
C:\Tomcat4\bin>set JAVA_HOME=C:\J2SDK1.4.0
C:\Tomcat4\bin>set CATALINA_HOME=C:\Tomcat4
C:\Tomcat4\bin>startup
Out of environment space
Cannot find
This file is needed to run this program
C:\Tomcat4\bin>
--
If I click on c:\tomcat4\bin\startup, I get the following message
--
Using CATALINA_BASE: C:\Tomcat4
Using CATALINA_HOME: C:\Tomcat4
Using CATALINA_TMPDIR: C:\Tomcat4\temp
Using JAVA_HOME: C:\J2SDK1.4.0
Bad command or file name
--
TIA,
[ April 23, 2002: Message edited by: Muhammad Farooq ]
 
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
Search this forum for both "environment space" and "Bad Command or File Name"

There have been plently of posts that solve both these problems.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Muhammad, depending upon the operating system you are running, call SET from a command prompt may be the wrong thing for what you are doing. Allow me to ask a number of questions:
1) What windows version are you running?
2) Are you attempting to run Tomcat as a service or as a console app?
3) If console, then are you starting it with a mouse-click in the Tomcat program group on "Start Tomcat" or are you executing the batch file from the command prompt?
The problem that you might be encountering is that executing SET from a DOS window only sets that variable in the context of that window. When you close the window, the variable goes away. The only way to make this work is to set the variable and then execute the program you are trying to run from the same DOS window. Needless to say, if you are running Tomcat as a service or from the Tomcat program group, this won't work.
Depending on your windows version, you can solve this problem in several ways. For 95/98/Me you can open Autoexec.bat and add the command to set JAVA_HOME. Save the file and reboot your PC.
For NT/2000/XP you must go to Start->Settings->Control Panel->System and click on the Advanced Tab. There will be a button for "Environment Variables". You will have to add JAVA_HOME as a user or system environment variable in there. If you are the only one on this PC, it won't matter which you choose.
After you have that set, you should have no problem starting Tomcat.
HTH
[ April 24, 2002: Message edited by: Bodie Minster ]
 
Muhammad Farooq
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thamks Bodie ,
1) What windows version are you running?
I am using win98
2) Are you attempting to run Tomcat as a service or as a console app?
I have tried both way.
3) If console, then are you starting it with a mouse-click in the Tomcat program group on "Start Tomcat" or are you executing the batch file from the command prompt?
If I go through (clicking)Start(Menu)>Programs>Apache Tomcat 4.0>Start Tomcat, I got the following message
---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.3
Starting service Tomcat-Apache
Apache Tomcat/4.0.3
---
but when I try to verify it by typing http://localhost:8080/ , I got the message Page cannot be displayed in my browser window.
2nd method
(I have already changed the setting inside the autoexec.bat by adding the following lines, c:\autoexec.bat now looks like this
--
@ECHO OFF
SET BLASTER=A220 I7 D1 T2
SET SNDSCAPE=C:\WINDOWS
REM [Header]
REM [CD-ROM Drive]
REM C:\WINDOWS\COMMAND\MSCDEX /D:MSCD001
REM [Miscellaneous]
REM [Display]
@SET CLASSPATH=C:\PROGRA~1\PHOTOD~1.1\ADOBEC~1
PATH c:\j2sdk1.4.0\bin;%path%;
SET CLASSPATH=%CLASSPATH%;.;c:\j2sdk1.4.0\lib\tools.jar
SET path="C:\Program Files\Oracle\jre\1.1.7\bin";"%path%";
SET path="C:\Program Files\Oracle\jre\1.1.8\bin";"%path%";
SET Path=c:\Oracle\Ora81\bin;"%Path%"
SET JAVA_HOME=C:\J2SDK1.4.0
SET CATALINA_HOME=C:\Tomcat4
--
I have also changed the environmental memory to 4096 and now there are two shortcuts in the folder c:Tomcat4\bin, and when click on the startup (shortcut or startup.bat) I got the following message
---
Using CATALINA_BASE: C:\Tomcat4
Using CATALINA_HOME: C:\Tomcat4
Using CATALINA_TMPDIR: C:\Tomcat4\temp
Using JAVA_HOME: C:\J2SDK1.4.0
Bad command or file name
---
3rd Method
On MS-DOS Command Prompt I have get the following response
---
C:\Tomcat4\bin>set JAVA_HOME=C:\J2SDK1.4.0
C:\Tomcat4\bin>set CATALINA_HOME=C:\TOMCAT4
C:\Tomcat4\bin>STARTUP
Out of environment space
Cannot find
This file is needed to run this program
C:\Tomcat4\bin>
---
Bodie, can ypu please help me where I am wrong and what else should I do, before installing Tomcat I had also installed Apache web server and then Tomcat, but then unistall both and then install Tomcat4.x only.
Thanks and best regards,
[ April 25, 2002: Message edited by: Muhammad Farooq ]
 
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
Muhammad,

Our search seems to be not working so good, I apologize.

Try this link:
https://coderanch.com/t/81609/Tomcat/Tomcat-startup-Windows-ME

That is for WinME, but 'Bad command or file name' is a DOS error, not something wrong with Tomcat. This is the most common fix for that particular error message when starting tomcat.
 
Muhammad Farooq
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mike,
I have followed that link, which is for ME, but I have win98, and I have find the following lines in catalina.bat relevant to what you have referred in that post. It was line 140 and afterwards...
--
if not "%OS%" == "Windows_NT" goto noTitle
set _EXECJAVA=start "Tomcat" %_RUNJAVA%
goto gotTitle
:noTitle
set _EXECJAVA=start %_RUNJAVA%
:gotTitle
--
Please take a few moment to look at it and tell me what needs to be done as you had win98 and I assuming you have installed Tomcat on it.
Thanks once again,
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am beginning to think that Mike Curwen is a genius of some sort. And I am beginning to be really, really happy that he hangs out in this forum!
 
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
Do the same thing Muhammad, remove the 'start' command and try it out.

I didn't recall this being a problem on Win98, but the single most common cause (in my experience) of "bad command or file name" when trying to start tomcat is this 'start' command, so give it a try anyways.

I'm only a Tomcat genius for Windows Bodie, for *nix, you'll need Tim Holloway.
 
Muhammad Farooq
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mike,
You are really the man, its working now.
[ April 27, 2002: Message edited by: Muhammad Farooq ]
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also just in case any Linux people ever look at this thread. I had the same problem then realized that I hadn't exported my JAVA_HOME variable. (rather easy to over look if you set it in /etc/profile - or at least that's what I'm telling myself.).
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ALl,
i m running tomcat 4.1.30 and using jdk1.3. After running tomcat i m getting the error
java.util.MissingResourceException: Can't find bundle for base n
ame org.apache.coyote.tomcat4.LocalStrings, locale en_US

Can someone help me in this regard?

C:\jakarta-tomcat-4.1.30\bin>catalina run
Using CATALINA_BASE: C:\jakarta-tomcat-4.1.30
Using CATALINA_HOME: C:\jakarta-tomcat-4.1.30
Using CATALINA_TMPDIR: C:\jakarta-tomcat-4.1.30\temp
Using JAVA_HOME: C:\jdk1.3
[ERROR] Digester - -Begin event threw exception <java.util.MissingResourceException: Can't find bundle for base name
org.apache.coyote.tomcat4.LocalStrings, locale en_US>java.util.MissingResourceException: Can't find bundle for base n
ame org.apache.coyote.tomcat4.LocalStrings, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:707)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:670)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:546)
at org.apache.catalina.util.StringManager.<init>(StringManager.java:115)
at org.apache.catalina.util.StringManager.getManager(StringManager.java:260)
at org.apache.coyote.tomcat4.CoyoteConnector.<init>(CoyoteConnector.java:274)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:253)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Catalina.start: java.util.MissingResourceException: Can't find bundle for base name org.apache.coyote.tomcat4.LocalSt
rings, locale en_US
java.util.MissingResourceException: Can't find bundle for base name org.apache.coyote.tomcat4.LocalStrings, locale en
_US
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
at org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Thanks,
jayant
reply
    Bookmark Topic Watch Topic
  • New Topic