aspose file tools*
The moose likes Tomcat and the fly likes Tomcat 6 not starting, no log file created Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 6 not starting, no log file created" Watch "Tomcat 6 not starting, no log file created" New topic
Author

Tomcat 6 not starting, no log file created

Angus Comber
Ranch Hand

Joined: Jul 16, 2011
Posts: 90
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?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16014
    
  20

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Angus Comber
Ranch Hand

Joined: Jul 16, 2011
Posts: 90
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

Joined: Jun 25, 2001
Posts: 16014
    
  20

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.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 6 not starting, no log file created