• 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

Tomcat 6 not starting, no log file created

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have set the following environment variables before running (on Windows platform):
set JAVA_HOME=D:\Program Files\Java\jdk1.6.0_21
set JRE_HOME=D:\Program Files\Java\jre6

I have downloaded Tomcat 6 to:
D:\Software\java_web_programming\tomcat-6

I cd to:
D:\Software\java_web_programming\tomcat-6\bin and type: startup.bat

I get:
D:\Software\java_web_programming\tomcat-6\bin>startup.bat
Using CATALINA_BASE: "D:\Software\java_web_programming\tomcat-6"
Using CATALINA_HOME: "D:\Software\java_web_programming\tomcat-6"
Using CATALINA_TMPDIR: "D:\Software\java_web_programming\tomcat-6\temp"
Using JRE_HOME: "D:\Program Files\Java\jre6"
Using CLASSPATH: "D:\Software\java_web_programming\tomcat-6\bin\bootstrap.jar"
D:\Software\java_web_programming\tomcat-6\bin>

I see the console for a split second but then it vanishes.

No log file is created.

I am pretty sure there is no other server running on port 8080.

I can run Java on the command line no problem at all.

So how do I troubleshoot that?

One thing that might help is if I run catalina.bat run I then see this:
Using CATALINA_BASE: "D:\Software\java_web_programming\tomcat-6"
Using CATALINA_HOME: "D:\Software\java_web_programming\tomcat-6"
Using CATALINA_TMPDIR: "D:\Software\java_web_programming\tomcat-6\temp"
Using JRE_HOME: "D:\Program Files\Java\jre6"
Using CLASSPATH: "D:\Software\java_web_programming\tomcat-6\bin\bootstrap.jar"
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Any ideas?
 
Saloon Keeper
Posts: 27919
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any time a java program says "java/lang/NoClassDefFoundError: java/lang/Object ", it means that your basic runtime configuration is messed up, since java.lang.Object is the base class for EVERY java class and it's part of the core JVM libraries.

Most likely, you have problems because JAVA_HOME and JRE_HOME are pointing to (probably) different JVMs. However, the space in the pathname for "Program Files" has shipwrecked many a Java programmer as well.
 
Angus Comber
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Any time a java program says "java/lang/NoClassDefFoundError: java/lang/Object ", it means that your basic runtime configuration is messed up, since java.lang.Object is the base class for EVERY java class and it's part of the core JVM libraries.

Most likely, you have problems because JAVA_HOME and JRE_HOME are pointing to (probably) different JVMs. However, the space in the pathname for "Program Files" has shipwrecked many a Java programmer as well.



This problem of path wierdness and class not found I find one of the most irritating things about Java. If you can compile and link a C program then you just deliver it and you know it will at least start to run on a new target machine. I suppose with Java you are doing the linking stage on the target machine.

Anyway, I really don't know why I was getting this problem. I could type Java on the command line and it behaved as expected.

But if I had:
set JAVA_HOME=D:\Program Files\Java\jdk1.6.0_21
set JRE_HOME=D:\Program Files\Java\jre6

How can you surmise they were pointing to different VMs? Is there any way you can tell?

In the end I uninstalled Java and re-installed (this time latest Java 7 JDK) and problem went away. I have had to do this quite a few times in my Java life.

An another point in your message, do you recommend installing Java to eg C:\Software\see_path_with_no_spaces\here or some path with no spaces?
 
Tim Holloway
Saloon Keeper
Posts: 27919
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can surmise that you're attempting to use 2 different VMs at the same time because unless the directory names are aliases for each other, they're not the same directory.

I have historically taken advantage of the legacy 8.3 support to work around the embedded-spaces-in-the-filename issue. For most systems, "Program Files" reduces to "PROGRA~1".

It's been a long time since I was able to "just deliver" a C binary, though, on any OS. Usually there's a bunch of DLLs (or .so's) that have to be supplied as well. At least with a JVM, it's all in one package.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In order to see the error messages which are undoubtedly flashing by in that window that closes, change the startup.bat last line to use run instead of start.



Catalina.bat will then run in the open window.

Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic