File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat service stops automatically and gives the following errors in log files when try to start it

 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Catalina File
org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.core.AprLifecycleListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.misc.Launcher$ExtClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:204)
at org.apache.commons.digester.Rule.begin(Rule.java:152)
at org.apache.commons.digester.Digester.startElement(Digester.java:1286)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1572)
at org.apache.catalina.startup.Catalina.start(Catalina.java:451)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)

---------------------------------------------------------------------------------------
In Stderr File
org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.core.AprLifecycleListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.misc.Launcher$ExtClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:204)
at org.apache.commons.digester.Rule.begin(Rule.java:152)
at org.apache.commons.digester.Digester.startElement(Digester.java:1286)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1572)
at org.apache.catalina.startup.Catalina.start(Catalina.java:451)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)

------------------------------------------------------------------------------------


In Stdout File
Commons Daemon procrun stdout initializedCatalina.start: java.lang.ClassNotFoundException: org.apache.catalina.core.AprLifecycleListener
java.lang.ClassNotFoundException: org.apache.catalina.core.AprLifecycleListener
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2792)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2818)
at org.apache.commons.digester.Digester.startElement(Digester.java:1289)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1572)
at org.apache.catalina.startup.Catalina.start(Catalina.java:451)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.core.AprLifecycleListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.misc.Launcher$ExtClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:204)
at org.apache.commons.digester.Rule.begin(Rule.java:152)
at org.apache.commons.digester.Digester.startElement(Digester.java:1286)
... 20 more


---------------------------------------------------------------------------------

Please give me the solution for this, I had tried many thing but not get the solution.

Thanks in avdance
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.ClassNotFoundException: org.apache.catalina.core.AprLifecycleListener
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2792)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2818)


Would appear to be the critical message.

Exactly how are you trying to start Tomcat?
Was Tomcat installed as a service?
Exactly which version of Tomcat are we talking about?
Which version of Java?
Has this installation of Tomcat ever worked?

Bill
 
Chris Beckey
Ranch Hand
Posts: 116
Eclipse IDE Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Tomcat libaries (jar files) are not available on the classpath. Where to look depends on whether you are starting Tomcat as a service or from a command line. If you are starting it as a service then try starting it from the command line and see if that works. If it doesn't work from the command line then trace through the startup script or batch file and look for the classpath settings (hint, search for CATALINA_HOME).
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:
java.lang.ClassNotFoundException: org.apache.catalina.core.AprLifecycleListener
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2792)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2818)


Would appear to be the critical message.

Exactly how are you trying to start Tomcat?
Was Tomcat installed as a service?
Exactly which version of Tomcat are we talking about?
Which version of Java?
Has this installation of Tomcat ever worked?

Bill


Hi Bill,

I have tried to start the tomcat from services and from system tray icon also.

Ya Tomcat installed as service.

I have try tomcat 6.0.29 and tomcat 7.0.8

Java Version is 1.6 updates 23.

Yes its installed work for 1-2 days and on third day when we start the system service was stop and when try to start it it gives the above mention error

 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris Beckey wrote:The Tomcat libaries (jar files) are not available on the classpath. Where to look depends on whether you are starting Tomcat as a service or from a command line. If you are starting it as a service then try starting it from the command line and see if that works. If it doesn't work from the command line then trace through the startup script or batch file and look for the classpath settings (hint, search for CATALINA_HOME).


I had run that service from command prompt also , but it is giving the same error mention above.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes its installed work for 1-2 days


If it worked before and doesn't work now, something must have changed.

Like Chris said, this really sounds like a classpath problem

I have try tomcat 6.0.29 and tomcat 7.0.8


Switching back and forth between Tomcat versions provides ample opportunity for getting classpaths and libraries mixed up.

Bill
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:
Yes its installed work for 1-2 days


If it worked before and doesn't work now, something must have changed.

Like Chris said, this really sounds like a classpath problem

I have try tomcat 6.0.29 and tomcat 7.0.8


Switching back and forth between Tomcat versions provides ample opportunity for getting classpaths and libraries mixed up.

Bill


William as you said it may be because of changing version , but after uninstalling one version , I had remove all the registries manually by registry edit and also by a software registry cleaner.

Will you please tell me how to solve the classpaths and libraries mixed up problem.
 
Chris Beckey
Ranch Hand
Posts: 116
Eclipse IDE Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What platform are you running on?
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhay Adgurwar wrote:
Chris Beckey wrote:The Tomcat libaries (jar files) are not available on the classpath. Where to look depends on whether you are starting Tomcat as a service or from a command line. If you are starting it as a service then try starting it from the command line and see if that works. If it doesn't work from the command line then trace through the startup script or batch file and look for the classpath settings (hint, search for CATALINA_HOME).


I had run that service from command prompt also , but it is giving the same error mention above.


Again I had remove the tomcat and made the following things told by you..
1) Remove all registry entries like tomcat ,apache, catalina.
2) Install fresh copy of tomcat.
3)Set the environment variable for JAVA_HOME and CATALINA_HOME.
4)Empty the recycle bin and delete files from temp folder.
5)Restart the system.
Now try to start the tomcat from services but its giving the error.

Could not start the Apache Tomcat 6 service on Local System.
Error 1067:The process terminated unexpectedly.


Please help me.
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris Beckey wrote:What platform are you running on?


Working on windows XP Service pack - 2
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhay Adgurwar wrote:
Chris Beckey wrote:What platform are you running on?


Working on windows XP Service pack - 2


Should I try any other solution please suggestion.
 
Geet Srivastava
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is org.apache.catalina.core.AprLifecycleListener class present in your catalina.jar?
 
Chris Beckey
Ranch Hand
Posts: 116
Eclipse IDE Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you running "startup" or running "catalina start"?
Are you running it from the "bin" directory within the tomcat directory?
Check that there is a "lib" directory within tomcat and that at least the catalina.jar file is in there. The missing class is in that JAR.
If that file is there and you didn't modify it, and did not modify the server.xml file then the problem is in the startup, catalina or setenv batch files. Somewhere in there the CATALINA_HOME is either not getting set or is being set incorrectly. Try removing the "echo off" at the start of the files and see where CATALINA_HOME gets set to.
By the way, did you modify the server.xml file at all?

 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geet Srivastava wrote:is org.apache.catalina.core.AprLifecycleListener class present in your catalina.jar?


Yes it is present in catalina.jar
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris Beckey wrote:Are you running "startup" or running "catalina start"?
Are you running it from the "bin" directory within the tomcat directory?
Check that there is a "lib" directory within tomcat and that at least the catalina.jar file is in there. The missing class is in that JAR.
If that file is there and you didn't modify it, and did not modify the server.xml file then the problem is in the startup, catalina or setenv batch files. Somewhere in there the CATALINA_HOME is either not getting set or is being set incorrectly. Try removing the "echo off" at the start of the files and see where CATALINA_HOME gets set to.
By the way, did you modify the server.xml file at all?


I am running startup.
I had try it from both the way from services.msc and from bin directory.
Yes the catalina.jar is there in "lib " directory
Ok...Will you please tell me upto which dir should I set the CATALINA_HOME .
No I had not modify server.xml
 
Geet Srivastava
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CATALINA_HOME = parent of the lib folder where you have catalina.jar.

when you run it from command-line, does it show correct values for java and tomcat environment variables? if not, check if you have setenv.bat in bin folder.

why do not you just comment AprLifecycleListener in server.xml first and see if the error still comes? If it still comes, it means tomcat is reading some other server.xml. It may throw up some other error if classloader is confused. In that case, check catalina.policy for permissions and catalina.properties for jar folders.
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geet Srivastava wrote:CATALINA_HOME = parent of the lib folder where you have catalina.jar.

when you run it from command-line, does it show correct values for java and tomcat environment variables? if not, check if you have setenv.bat in bin folder.

why do not you just comment AprLifecycleListener in server.xml first and see if the error still comes? If it still comes, it means tomcat is reading some other server.xml. It may throw up some other error if classloader is confused. In that case, check catalina.policy for permissions and catalina.properties for jar folders.


Set the CATALINA_HOME as told by you.

I don't have setenv.bat in bin folder.

Will you please tell me how to check catalina.policy for permissions and catalina.properties for jar folders , because there are all .class files in jar folder.

 
Chris Beckey
Ranch Hand
Posts: 116
Eclipse IDE Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have something completely wrong in your install. There is no "jar" directory under CATALINA_HOME, the jar files should be in the "lib" directory. CATALINA_HOME has bin, conf, lib, logs, webapp, and work directories. The "bin" directory has the batch files to start, stop and set the environment.
Step back and tell us how you installed, and what you did after the installation. In particular, what did you download (include the link) and where did you find the installation instructions (again, include the link)?
Installing Tomcat should be a 5 minute task. Run the installer (if on Windows) and then start it. If you are doing a lot more than that then you're making it too difficult.
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris Beckey wrote:You have something completely wrong in your install. There is no "jar" directory under CATALINA_HOME, the jar files should be in the "lib" directory. CATALINA_HOME has bin, conf, lib, logs, webapp, and work directories. The "bin" directory has the batch files to start, stop and set the environment.
Step back and tell us how you installed, and what you did after the installation. In particular, what did you download (include the link) and where did you find the installation instructions (again, include the link)?
Installing Tomcat should be a 5 minute task. Run the installer (if on Windows) and then start it. If you are doing a lot more than that then you're making it too difficult.


The Tomcat root has the bin, conf, lib, logs, webapp, and work directories.
The bin folder has bootstrap.jar,tcnative-1.dll, tomcat6.exe, tomcat6w.exe, tomcat-juli.jar files.
I had download it from http://tomcat.apache.org/download-60.cgi this address. the name of exe is apache-tomcat-6.0.32.exe.
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geet Srivastava wrote:CATALINA_HOME = parent of the lib folder where you have catalina.jar.

when you run it from command-line, does it show correct values for java and tomcat environment variables? if not, check if you have setenv.bat in bin folder.

why do not you just comment AprLifecycleListener in server.xml first and see if the error still comes? If it still comes, it means tomcat is reading some other server.xml. It may throw up some other error if classloader is confused. In that case, check catalina.policy for permissions and catalina.properties for jar folders.


As told by you, I have comment AprLifecycleListener in server.xml and then try to start the server it gives another error...

In stdout log file

2011-05-11 10:52:39 Commons Daemon procrun stdout initializedCatalina.start: java.lang.ClassNotFoundException: org.apache.catalina.core.JasperListener
java.lang.ClassNotFoundException: org.apache.catalina.core.JasperListener
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2792)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2818)
at org.apache.commons.digester.Digester.startElement(Digester.java:1289)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source).....
 
Abhay Adgurwar
Greenhorn
Posts: 17
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sill I have not got the solution for this...
Please suggest me any solution for this.
 
Sanchit Kapur
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Abhay,
I was facing the same problem then i found the following link and tomcat is started working now

http://www3.ntu.edu.sg/home/ehchua/programming/howto/Tomcat7_HowTo.html

enjoy

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic