»

Tomcat Catalina errors

Tomcat Servlet Engine Core Classes and Standard implementations

http://tomcat.apache.org/
Solution coverage:
Summary coverage:

Top patterns

  1. Tomcat cannot load a class

    Tomcat classloader is strange - check out this great article at MuleSoft: Understanding The Tomcat Classpath - Common Problems And How To Fix Them

  2. Container cannot start due to unwanted jar in WEB-INF/lib folder

    You have packaged servlet-api.jar file in your build, this is the source of the problem. To solve this issue check this answer

  3. Servlet Context unable to find the stated resource

    You are likely missing a resource definition under <GlobalNamingResources> in your Tomcat's server.xml file. Please ensure all specified resources are defined here first.

Error patternsPackagesClassesMethodsExceptions
DescriptionException TypeEntry MethodWeb pages

Tomcat cannot load a class

java.lang.ClassNotFoundException
org.apache.catalina.loader.WebappClassLoader.loadClass
3744Web pages
1Solution
ClassNotFoundExceptionWebappClassLoader.loadClass3744

Container cannot start due to unwanted jar in WEB-INF/lib folder

org.apache.catalina.LifecycleException
org.apache.catalina.core.ContainerBase.startInternal
726Web pages
1Solution
LifecycleExceptionContainerBase.startInternal726

Servlet Context unable to find the stated resource

javax.naming.NameNotFoundException
org.apache.naming.NamingContext.lookup
443Web pages
1Solution
NameNotFoundExceptionNamingContext.lookup443

Tomcat server was not shutdown properly

java.lang.IllegalStateException
org.apache.catalina.loader.WebappClassLoader.loadClass
379Web pages
1Solution
IllegalStateExceptionWebappClassLoader.loadClass379

Servlet initialization failed

javax.servlet.ServletException
org.apache.catalina.core.StandardWrapper.loadServlet
327Web pages
1Solution
ServletExceptionStandardWrapper.loadServlet327

Calling getOutputStream() and getWriter() on the same response object

java.lang.IllegalStateException
org.apache.catalina.connector.Response.getWriter
273Web pages
IllegalStateExceptionResponse.getWriter273

Servlet filter exception handling

javax.servlet.ServletException
1 frames hidden
org.apache.catalina.core.ApplicationFilterChain.doFilter
174Web pages
1Solution
ServletExceptionApplicationFilterChain.doFilter174

Bug in JSF Mojarra

java.lang.IllegalStateException
org.apache.catalina.connector.Request.doGetSession
169Web pages
1Solution
IllegalStateExceptionRequest.doGetSession169

Servlet trying to execute further code after request has already been dispatched by RequestDispatcher

java.lang.IllegalStateException
org.apache.catalina.core.ApplicationDispatcher.doForward
148Web pages
IllegalStateExceptionApplicationDispatcher.doForward148

StandardManager.stop() has thrown a LifecycleException

org.apache.catalina.LifecycleException
org.apache.catalina.session.StandardManager.stop
148Web pages
1Solution
LifecycleExceptionStandardManager.stop148

This web application instance has been stopped already

java.lang.IllegalStateException
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading
143Web pages
IllegalStateExceptionWebappClassLoaderBase.checkStateForResourceLoading143

Incorrect configuration of servlet mapping in web.xml file

java.lang.IllegalArgumentException
org.apache.catalina.core.StandardContext.addServletMapping
133Web pages
IllegalArgumentExceptionStandardContext.addServletMapping133

Trying to access an already invalidated session

java.lang.IllegalStateException
org.apache.catalina.session.StandardSession.getAttribute
123Web pages
IllegalStateExceptionStandardSession.getAttribute123

Class not compatible with user's version of JRE

java.lang.UnsupportedClassVersionError
org.apache.catalina.loader.WebappClassLoader.findClassInternal
115Web pages
UnsupportedClassVersionErrorWebappClassLoader.findClassInternal115

Trying to redirect request after response has already been committed

java.lang.IllegalStateException
org.apache.catalina.connector.ResponseFacade.sendRedirect
105Web pages
IllegalStateExceptionResponseFacade.sendRedirect105

Tomcat was unable to destroy the application

org.apache.catalina.LifecycleException
1 frames hidden
org.apache.catalina.util.LifecycleBase.destroy
105Web pages
1Solution
LifecycleExceptionLifecycleBase.destroy105

Failed to start component

org.apache.catalina.LifecycleException
1 frames hidden
org.apache.catalina.core.ContainerBase.addChild
93Web pages
1Solution
LifecycleExceptionContainerBase.addChild93

Unable to start Tomcat as the provided port is already in use

java.net.BindException
org.apache.catalina.connector.Connector.initialize
85Web pages
BindExceptionConnector.initialize85

Tomcat unable to launch at the provided port, since it is already in use

java.net.BindException
org.apache.catalina.connector.Connector.start
83Web pages
BindExceptionConnector.start83

Component name could not be resolved because it is not defined/bound

javax.naming.NamingException
org.apache.naming.NamingContext.lookup
78Web pages
NamingExceptionNamingContext.lookup78

Missing jar file in Tomcat's library or build's WEB-INF/lib folder

javax.naming.NamingException
org.apache.naming.factory.ResourceFactory.getObjectInstance
78Web pages
NamingExceptionResourceFactory.getObjectInstance78

Client abruptly disconnected while Server still writing response

java.net.SocketException
org.apache.catalina.connector.OutputBuffer.realWriteBytes
76Web pages
SocketExceptionOutputBuffer.realWriteBytes76

Incorrectly defining non-servlet class as servlet in web.xml file

java.lang.ClassCastException
org.apache.catalina.core.StandardWrapper.loadServlet
72Web pages
ClassCastExceptionStandardWrapper.loadServlet72

Trying to start an asynchronous request without setting Tomcat's Async property to true

java.lang.IllegalStateException
org.apache.catalina.connector.Request.startAsync
72Web pages
1Solution
IllegalStateExceptionRequest.startAsync72

Trying to access Response's outputStream when getWriter() has already been called

java.lang.IllegalStateException
org.apache.catalina.connector.Response.getOutputStream
65Web pages
IllegalStateExceptionResponse.getOutputStream65

Server unable to complete write operation as client disconnected abruptly

org.apache.catalina.connector.ClientAbortException
org.apache.catalina.connector.OutputBuffer.realWriteBytes
42Web pages
ClientAbortExceptionOutputBuffer.realWriteBytes42

Not unique context name

java.lang.IllegalArgumentException
org.apache.catalina.core.ContainerBase.addChildInternal
42Web pages
1Solution
IllegalArgumentExceptionContainerBase.addChildInternal42

Application failed to load due to build corruption

javax.naming.NamingException
org.apache.naming.ContextBindings.getClassLoader
40Web pages
1Solution
NamingExceptionContextBindings.getClassLoader40

Invalid server.xml configuration

java.lang.NullPointerException
1 frames hidden
org.apache.catalina.startup.Catalina.start
39Web pages
NullPointerExceptionCatalina.start39

Error allocating a servlet instance

javax.servlet.ServletException
org.apache.catalina.core.StandardWrapper.allocate
36Web pages
1Solution
ServletExceptionStandardWrapper.allocate36

StandardContext.listenerStop() has thrown a NullPointerException

java.lang.NullPointerException
2 frames hidden
org.apache.catalina.core.StandardContext.listenerStop
35Web pages
NullPointerExceptionStandardContext.listenerStop35

Trying to cast an incompatible filter as javax.servlet.Filter

java.lang.ClassCastException
org.apache.catalina.core.ApplicationFilterConfig.getFilter
33Web pages
1Solution
ClassCastExceptionApplicationFilterConfig.getFilter33

Network interruption or Client abruptly disconnected while server still reading request

java.io.IOException
org.apache.catalina.connector.InputBuffer.read
32Web pages
IOExceptionInputBuffer.read32

Trying to deploy a webapp while an older version is still processing request

javax.servlet.ServletException
org.apache.catalina.core.StandardWrapper.unload
30Web pages
1Solution
ServletExceptionStandardWrapper.unload30

Application failed to launch due to conflicting or incompatible library jar file

java.lang.NoSuchMethodError
1 frames hidden
org.apache.catalina.util.LifecycleBase.start
30Web pages
NoSuchMethodErrorLifecycleBase.start30

Invalid keystore configuration

java.io.IOException
org.apache.catalina.connector.Connector.start
29Web pages
1Solution
IOExceptionConnector.start29

Problems stopping and starting tomcat server

java.lang.NullPointerException
4 frames hidden
org.apache.catalina.core.StandardServer.stop
28Web pages
1Solution
NullPointerExceptionStandardServer.stop28

Using request instance concurrently

java.lang.NullPointerException
org.apache.catalina.connector.Request.notifyAttributeAssigned
28Web pages
1Solution
NullPointerExceptionRequest.notifyAttributeAssigned28

Incompatable or corrupted jar file in build's lib folder

javax.servlet.ServletException
org.apache.catalina.startup.ContextConfig.tldScanJar
27Web pages
1Solution
ServletExceptionContextConfig.tldScanJar27

Failed to start component

java.lang.IllegalArgumentException
2 frames hidden
org.apache.catalina.util.LifecycleBase.start
27Web pages
1Solution
IllegalArgumentExceptionLifecycleBase.start27

The connector may be misconfigured

java.lang.Exception
2 frames hidden
org.apache.catalina.core.StandardServer.initialize
27Web pages
1Solution
ExceptionStandardServer.initialize27

Closing or opening sockets at the operating system level

java.net.SocketException
3 frames hidden
org.apache.catalina.startup.Catalina.load
27Web pages
1Solution
SocketExceptionCatalina.load27

Connector configuration error

java.lang.Exception
1 frames hidden
org.apache.catalina.core.StandardService.start
27Web pages
1Solution
ExceptionStandardService.start27

Reset buffer should be called before the response has been committed

java.lang.IllegalStateException
org.apache.catalina.connector.Response.resetBuffer
26Web pages
1Solution
IllegalStateExceptionResponse.resetBuffer26

Error caused by a bug in Tomcat

java.lang.IllegalArgumentException
org.apache.catalina.core.ApplicationContext.getRequestDispatcher
26Web pages
1Solution
IllegalArgumentExceptionApplicationContext.getRequestDispatcher26

Trying to set a non-serializable attribute in session object

java.lang.IllegalArgumentException
org.apache.catalina.session.StandardSession.setAttribute
26Web pages
IllegalArgumentExceptionStandardSession.setAttribute26

StandardContext.start() has thrown a LifecycleException

org.apache.catalina.LifecycleException
org.apache.catalina.core.StandardContext.start
26Web pages
LifecycleExceptionStandardContext.start26

Bootstrap.main() has thrown a SocketException

java.net.SocketException
9 frames hidden
org.apache.catalina.startup.Bootstrap.main
26Web pages
SocketExceptionBootstrap.main26

LifecycleBase.init() has thrown a LifecycleException

org.apache.catalina.LifecycleException
org.apache.catalina.util.LifecycleBase.init
25Web pages
LifecycleExceptionLifecycleBase.init25

StandardServer.initialize() has thrown an IOException

java.io.IOException
2 frames hidden
org.apache.catalina.core.StandardServer.initialize
25Web pages
IOExceptionStandardServer.initialize25
Nothing to list here.
Nothing to list here.
Nothing to list here.
Nothing to list here.