2

I've been running Tomcat 6 on my pc for some time now, and it has been running successfully...up until today. I just tried to start it, and now for some reason it won't start.

I start it from a command line prompt. The second prompt that appears after I enter 'startup' in the first prompt is exiting quickly, whereas it usually stays open and shows the status of the server.

Here's what the log file logged -

Dec 3, 2010 4:00:00 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jdk1.5.0_16\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Java\jdk1.5.0_16\bin;C:\jakarta-tomcat\bin;C:\MYSQL\MySQL Server 5.1\bin
Dec 3, 2010 4:00:01 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Dec 3, 2010 4:00:01 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 424 ms
Dec 3, 2010 4:00:01 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 3, 2010 4:00:01 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Dec 3, 2010 4:00:01 PM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/MyWebApp,J2EEApplication=none,J2EEServer=none

I never saw this before, where it says SEVERE: Null component... - what does it mean? What's causing it?

katura
  • 2,177
  • 14
  • 39
  • 48

2 Answers2

4

Here's what I ended up doing. I made a backup of my server.xml and web.xml files, along with my apps under the webapps folder, and removed jakarta-tomcat, and then reinstalled it. I restored the server.xml and web.xml file, threw my webapps back in, and started Tomcat up. This time, I got the same error as before, but it pinpointed that a particular servlet under one of my folders had a "bad version number". So I went through my servlet folders and recompiled the classes.

I started Tomcat again, and its running as it used to.

The problem was that a class had been compiled under a different version of the JDK, and it was causing an error.

katura
  • 2,177
  • 14
  • 39
  • 48
  • I ran into the same problem, and it wasn't just a 'different' version of the JDK, it was a newer version that what tomcat was running. So tomcat running jdk 1.6, and a class compiled with jdk 1.7 caused the issue. – mooreds Oct 01 '12 at 02:06
1

Have you changed anything recently with regard to your Tomcat installation, configuration or deployments? Do you have a web application running under Tomcat called "MyWebApp"? If so, I would remove it and see if that fixes the problem. Otherwise, you might have to reinstall Tomcat.

Bernard
  • 7,908
  • 2
  • 36
  • 33
  • A few days ago I downloaded VisualVM, and Tomcat ran fine. I added this to the startup.bat file : set JAVA_OPTS=-Xms100m -Xmx192m ..and again, Tomcat was fine. I downloaded the latest Java JDK 1.6 (that's how I got VisualVM) and Tomcat was fine then too. 'MyWebApp' is my main webapp that I run under Tomcat. It bothers me that there isn't an explanation as to why this error has occurred... – katura Dec 03 '10 at 21:52
  • 1
    I agree that it is a bit cryptic. I suggest you reinstall Tomcat and configure everything to work as you would want, including VisualVM if you need it. – Bernard Dec 03 '10 at 22:00
  • I downloaded the JDK 1.6, as mentioned, so I could get VisualVM. I compiled some classes under 1.6, but reverted back to 1.5, because on my vps, I'm using Java SE-5. What I'm going to do is recompile all my classes again, under 1.5, and try to start Tomcat again. I wonder if that caused a problem somehow... Otherwise, I will take your suggestion, and reinstall Tomcat. – katura Dec 03 '10 at 22:12
  • Forgot to mention that the only thing I did different today, was download JMeter. I started it from a command prompt. Then I started Tomcat, because I thought I would need Tomcat running...and Tomcat didn't start. That's the only thing I did today, because otherwise, Tomcat hasn't been started since yesterday. Could JMeter have something to do with this error I'm getting? – katura Dec 03 '10 at 22:18