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.


DescriptionException TypeEntry MethodWeb pages

Tomcat cannot load a class

java.lang.ClassNotFoundException
org.apache.catalina.loader.WebappClassLoader.loadClass
3743Web pages
1Solution
ClassNotFoundExceptionWebappClassLoader.loadClass3743

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
442Web pages
1Solution
NameNotFoundExceptionNamingContext.lookup442

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

StandardManager.stop() has thrown a LifecycleException

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

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

java.lang.IllegalStateException
org.apache.catalina.core.ApplicationDispatcher.doForward
146Web pages
IllegalStateExceptionApplicationDispatcher.doForward146

This web application instance has been stopped already

java.lang.IllegalStateException
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading
141Web pages
IllegalStateExceptionWebappClassLoaderBase.checkStateForResourceLoading141

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
92Web pages
1Solution
LifecycleExceptionContainerBase.addChild92

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
64Web pages
IllegalStateExceptionResponse.getOutputStream64

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

Invalid server.xml configuration

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

Application failed to load due to build corruption

javax.naming.NamingException
org.apache.naming.ContextBindings.getClassLoader
39Web pages
1Solution
NamingExceptionContextBindings.getClassLoader39

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

Connector configuration error

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

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

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
Package nameClass namePatterns foundSolution coverageSummary coverage
org.apache.catalina.coreApplicationFilterChain1679
org.apache.catalina.startupBootstrap1118
org.apache.catalina.coreStandardContext896
org.apache.catalina.utilLifecycleBase755
org.apache.catalina.coreStandardHost556
org.apache.catalina.coreStandardWrapper403
org.apache.catalina.connectorCoyoteAdapter293
org.apache.catalina.startupHostConfig277
org.apache.catalina.valvesErrorReportValve241
org.apache.catalina.coreStandardContextValve233
org.apache.catalina.coreApplicationDispatcher221
org.apache.catalina.startupCatalina203
org.apache.catalina.loaderWebappClassLoader198
org.apache.catalina.connectorOutputBuffer192
org.apache.catalina.coreStandardWrapperValve188
org.apache.catalina.coreContainerBase186
org.apache.catalina.coreStandardPipeline144
org.apache.catalina.coreContainerBase$StartChild140
org.apache.catalina.connectorCoyoteOutputStream125
org.apache.catalina.startupContextConfig98
org.apache.namingNamingContext96
org.apache.catalina.loaderWebappClassLoaderBase79
org.apache.catalina.coreStandardHostValve78
org.apache.catalina.connectorConnector69
org.apache.catalina.coreApplicationFilterConfig67
org.apache.catalina.connectorRequest59
org.apache.catalina.connectorRequestFacade58
org.apache.catalina.coreStandardEngine52
org.apache.catalina.coreStandardServer50
org.apache.catalina.coreStandardEngineValve47
org.apache.catalina.authenticatorAuthenticatorBase43
org.apache.catalina.connectorCoyoteInputStream36
org.apache.catalina.connectorResponseFacade33
org.apache.catalina.coreStandardService32
org.apache.catalina.sessionStandardSession30
org.apache.catalina.coreDefaultInstanceManager26
org.apache.catalina.coreApplicationHttpRequest26
org.apache.catalina.sessionStandardManager26
org.apache.catalina.utilLifecycleSupport25
org.apache.catalina.connectorResponse24
org.apache.catalina.startupTomcat24
org.apache.catalina.sessionStandardSessionFacade21
org.apache.catalina.startupWebAnnotationSet20
org.apache.catalina.managerManagerServlet16
org.apache.catalina.loaderWebappLoader15
org.apache.catalina.connectorInputBuffer15
org.apache.catalina.startupCatalina$CatalinaShutdownHook12
org.apache.catalina.coreApplicationContextFacade12
org.apache.catalina.valvesAccessLogValve11
org.apache.catalina.webresourcesStandardRoot10
Package nameClass nameMethod namePatterns foundSolution coverage
org.apache.catalina.coreApplicationFilterChaindoFilter1505
org.apache.catalina.startupBootstrapmain1062
org.apache.catalina.utilLifecycleBasestart626
org.apache.catalina.coreStandardHostaddChild517
org.apache.catalina.coreStandardContextstart443
org.apache.catalina.connectorCoyoteAdapterservice286
org.apache.catalina.coreStandardWrapperloadServlet251
org.apache.catalina.valvesErrorReportValveinvoke241
org.apache.catalina.coreStandardContextlistenerStart235
org.apache.catalina.coreStandardContextValveinvoke233
org.apache.catalina.coreStandardWrapperValveinvoke178
org.apache.catalina.coreApplicationFilterChaininternalDoFilter159
org.apache.catalina.loaderWebappClassLoaderloadClass149
org.apache.catalina.coreContainerBase$StartChildcall140
org.apache.catalina.coreStandardPipelineinvokeNext94
org.apache.namingNamingContextlookup87
org.apache.catalina.startupCatalinaload86
org.apache.catalina.coreApplicationDispatcherforward85
org.apache.catalina.connectorOutputBufferrealWriteBytes85
org.apache.catalina.connectorCoyoteOutputStreamwrite77
org.apache.catalina.startupCatalinastart74
org.apache.catalina.coreApplicationDispatcherinvoke68
org.apache.catalina.startupHostConfigdeployDescriptor67
org.apache.catalina.startupHostConfigdeployApps66
org.apache.catalina.startupHostConfigdeployWAR62
org.apache.catalina.loaderWebappClassLoaderBaseloadClass59
org.apache.catalina.utilLifecycleBasestop53
org.apache.catalina.coreContainerBaseinvoke53
org.apache.catalina.coreStandardContextloadOnStartup52
org.apache.catalina.connectorOutputBufferdoFlush49
org.apache.catalina.coreStandardEnginestart48
org.apache.catalina.coreStandardEngineValveinvoke47
org.apache.catalina.coreContainerBaseaddChildInternal47
org.apache.catalina.coreStandardPipelineinvoke46
org.apache.catalina.utilLifecycleBaseinit43
org.apache.catalina.coreStandardHostValveinvoke42
org.apache.catalina.connectorCoyoteOutputStreamflush42
org.apache.catalina.authenticatorAuthenticatorBaseinvoke42
org.apache.catalina.coreStandardWrapperinitServlet38
org.apache.catalina.coreStandardWrapperallocate38
org.apache.catalina.coreApplicationDispatcherinclude36
org.apache.catalina.coreStandardWrapperservice36
org.apache.catalina.connectorCoyoteInputStreamread35
org.apache.catalina.connectorOutputBufferflush34
org.apache.catalina.coreApplicationFilterConfiggetFilter32
org.apache.catalina.coreStandardContextlistenerStop31
org.apache.catalina.coreStandardContextstop31
org.apache.catalina.startupContextConfiglifecycleEvent30
org.apache.catalina.connectorConnectorinitInternal30
org.apache.catalina.coreContainerBasestart29
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
org.apache.catalina.coreApplicationFilterChaindoFilterNullPointerException158
org.apache.catalina.coreApplicationFilterChaindoFilterIllegalStateException150
org.apache.catalina.utilLifecycleBasestartLifecycleException123
org.apache.catalina.utilLifecycleBasestartBeanCreationException105
org.apache.catalina.coreApplicationFilterChaindoFilterServletException101
org.apache.catalina.startupBootstrapmainClassNotFoundException72
org.apache.catalina.coreStandardHostaddChildLifecycleException69
org.apache.catalina.coreApplicationFilterChaindoFilterJasperException64
org.apache.catalina.startupBootstrapmainNoClassDefFoundError62
org.apache.catalina.startupBootstrapmainLifecycleException60
org.apache.catalina.coreStandardContextlistenerStartBeanCreationException57
org.apache.catalina.startupBootstrapmainSAXParseException55
org.apache.catalina.loaderWebappClassLoaderloadClassNoClassDefFoundError54
org.apache.catalina.coreStandardHostaddChildBeanCreationException53
org.apache.catalina.coreStandardContextstartNoClassDefFoundError53
org.apache.catalina.coreApplicationFilterChaindoFilterIllegalArgumentException52
org.apache.catalina.startupBootstrapmainBindException49
org.apache.catalina.coreStandardPipelineinvokeNextServletException46
org.apache.catalina.coreStandardWrapperloadServletBeanCreationException46
org.apache.catalina.startupBootstrapmainNullPointerException40
org.apache.catalina.coreStandardWrapperloadServletClassNotFoundException38
org.apache.catalina.startupBootstrapmainIOException38
org.apache.catalina.coreStandardContextstartNullPointerException38
org.apache.catalina.startupBootstrapmainServletException37
org.apache.catalina.utilLifecycleBasestartNoClassDefFoundError37
org.apache.catalina.connectorCoyoteAdapterserviceNullPointerException36
org.apache.catalina.coreStandardContextstartBeanCreationException35
org.apache.catalina.coreApplicationDispatcherforwardJasperException34
org.apache.catalina.startupBootstrapmainBeanCreationException33
org.apache.catalina.startupBootstrapmainInvocationTargetException33
org.apache.catalina.connectorOutputBufferrealWriteBytesSocketException33
org.apache.catalina.utilLifecycleBasestartIllegalStateException32
org.apache.catalina.coreStandardHostaddChildNullPointerException32
org.apache.catalina.startupBootstrapmainIllegalStateException32
org.apache.catalina.startupBootstrapmainIllegalArgumentException31
org.apache.catalina.coreContainerBase$StartChildcallBeanCreationException31
org.apache.catalina.coreApplicationFilterChaindoFilterRuntimeException31
org.apache.catalina.utilLifecycleBasestartBeanDefinitionStoreException30
org.apache.catalina.coreApplicationFilterChaindoFilterClassNotFoundException30
org.apache.catalina.coreStandardContextstartSAXParseException29
org.apache.catalina.coreStandardWrapperValveinvokeNullPointerException29
org.apache.catalina.coreStandardContextValveinvokeNullPointerException28
org.apache.catalina.coreStandardHostaddChildClassNotFoundException28
org.apache.catalina.coreApplicationFilterChaindoFilterIOException28
org.apache.catalina.startupBootstrapmainFileNotFoundException28
org.apache.catalina.utilLifecycleBasestartClassNotFoundException28
org.apache.catalina.coreApplicationFilterChaindoFilterNestedServletException27
org.apache.catalina.connectorCoyoteOutputStreamwriteClientAbortException27
org.apache.catalina.connectorCoyoteOutputStreamwriteSocketException27
org.apache.catalina.utilLifecycleBasestartNoSuchMethodError27