Tomcat does not load my web application

Hello there,

Can somebody please help me to find the cause of this error. The problem is when I add my web application on tomcat webapps folder. My application is not running when i run localhost:8080. Then in the log folder I got to see this error which I have copied below.

cheers
Zolf

2015-02-03 09:10:07 Commons Daemon procrun stderr initialized
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.17
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jan 9 2015 15:58:59 UTC
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.17.0
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 7
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            6.1
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          x86
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JAVA_HOME:             C:\Program Files (x86)\Java\jre7
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.7.0_72-b14
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\dev\tools\Tomcat 8.0
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\dev\tools\Tomcat 8.0
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\dev\tools\Tomcat 8.0
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\dev\tools\Tomcat 8.0
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\dev\tools\Tomcat 8.0\endorsed
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\dev\tools\Tomcat 8.0\temp
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\dev\tools\Tomcat 8.0\conf\logging.properties
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m
03-Feb-2015 09:10:07.790 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\dev\tools\Tomcat 8.0\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\ATI Stream\bin\x86_64;C:\Program Files (x86)\ATI Stream\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Java\jdk1.7.0_72\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;;.
03-Feb-2015 09:10:07.873 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
03-Feb-2015 09:10:07.893 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
03-Feb-2015 09:10:07.893 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
03-Feb-2015 09:10:07.893 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
03-Feb-2015 09:10:07.893 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 365 ms
03-Feb-2015 09:10:07.913 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
03-Feb-2015 09:10:07.913 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.17
03-Feb-2015 09:10:07.923 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\dev\tools\Tomcat 8.0\webapps\manager
03-Feb-2015 09:10:08.273 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [140] milliseconds.
03-Feb-2015 09:10:08.293 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\dev\tools\Tomcat 8.0\webapps\manager has finished in 370 ms
03-Feb-2015 09:10:08.293 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\dev\tools\Tomcat 8.0\webapps\ROOT
03-Feb-2015 09:10:08.313 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\dev\tools\Tomcat 8.0\webapps\ROOT has finished in 20 ms
03-Feb-2015 09:10:08.313 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
03-Feb-2015 09:10:08.323 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
03-Feb-2015 09:10:08.323 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 425 ms
03-Feb-2015 09:11:07.220 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
03-Feb-2015 09:11:07.270 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
03-Feb-2015 09:11:07.320 INFO [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
03-Feb-2015 09:11:07.350 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
03-Feb-2015 09:11:07.350 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]

2015-02-03 09:11:55 Commons Daemon procrun stderr initialized
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.17
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jan 9 2015 15:58:59 UTC
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.17.0
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 7
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            6.1
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          x86
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JAVA_HOME:             C:\Program Files (x86)\Java\jre7
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.7.0_72-b14
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\dev\tools\Tomcat 8.0
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\dev\tools\Tomcat 8.0
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\dev\tools\Tomcat 8.0
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\dev\tools\Tomcat 8.0
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\dev\tools\Tomcat 8.0\endorsed
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\dev\tools\Tomcat 8.0\temp
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\dev\tools\Tomcat 8.0\conf\logging.properties
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m
03-Feb-2015 09:11:55.830 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\dev\tools\Tomcat 8.0\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\ATI Stream\bin\x86_64;C:\Program Files (x86)\ATI Stream\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Java\jdk1.7.0_72\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;;.
03-Feb-2015 09:11:55.900 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
03-Feb-2015 09:11:55.920 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
03-Feb-2015 09:11:55.930 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
03-Feb-2015 09:11:55.930 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
03-Feb-2015 09:11:55.930 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 364 ms
03-Feb-2015 09:11:55.950 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
03-Feb-2015 09:11:55.950 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.17
03-Feb-2015 09:11:55.970 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\dev\tools\Tomcat 8.0\webapps\ROOT.war
03-Feb-2015 09:12:24.779 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager
	at java.lang.Class.getDeclaredFields0(Native Method)
	at java.lang.Class.privateGetDeclaredFields(Unknown Source)
	at java.lang.Class.getDeclaredFields(Unknown Source)
	at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
	at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:256)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:132)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
	at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:334)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:774)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5034)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.HttpClientConnectionManager
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
	... 24 more

03-Feb-2015 09:12:24.780 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive C:\dev\tools\Tomcat 8.0\webapps\ROOT.war
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:728)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

03-Feb-2015 09:12:24.780 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\dev\tools\Tomcat 8.0\webapps\ROOT.war has finished in 28,810 ms
03-Feb-2015 09:12:24.781 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\dev\tools\Tomcat 8.0\webapps\manager
03-Feb-2015 09:12:24.974 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [134] milliseconds.
03-Feb-2015 09:12:24.998 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\dev\tools\Tomcat 8.0\webapps\manager has finished in 216 ms
03-Feb-2015 09:12:24.998 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\dev\tools\Tomcat 8.0\webapps\_ROOT_
03-Feb-2015 09:12:25.015 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\dev\tools\Tomcat 8.0\webapps\_ROOT_ has finished in 17 ms
03-Feb-2015 09:12:25.020 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
03-Feb-2015 09:12:25.031 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
03-Feb-2015 09:12:25.034 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 29100 ms

Open in new window

zolfAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
dpearsonConnect With a Mentor Commented:
As I mentioned it looks like you're using the HttpClient library which is generally downloaded as part of Apache's http component's library from here:
http://hc.apache.org/downloads.cgi

If I download the latest from there this is the list of jars I get:

commons-codec-1.6.jar
commons-logging-1.1.3.jar
fluent-hc-4.3.6.jar
httpclient-4.3.6.jar
httpclient-cache-4.3.6.jar
httpcore-4.3.3.jar
httpmime-4.3.6.jar

So I would suggest checking for whether you have these (or ones from a slightly different version) in your project and then see if they are inside the lib folder or not.

As for SmartGWT - I'm afraid I don't know anything about that particular framework.

Doug
0
 
dpearsonCommented:
This looks to be the real error that is causing the app to fail to start:

Caused by: java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager
      at java.lang.Class.getDeclaredFields0(Native Method)
      at java.lang.Class.privateGetDeclaredFields(Unknown Source)
      at java.lang.Class.getDeclaredFields(Unknown Source)
      at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)

which suggests you're trying to use a library (HttpClient in this case it appears from http://hc.apache.org/) but tomcat can't find that library i.e. it can't load the jar file that contains the code for this library.

That jar should generally go in the WEB-INF\lib folder of your web app.  It appears to be missing.  When you built your code you must have had it for the code to compile, so it's probably just a matter of figuring out why the jar wasn't deployed to the lib folder.

Doug
0
 
zolfAuthor Commented:
thanks for your comment. My web application is a SmartGWT application. I am able to run my web in the dev mode. But when I war the web app and try to run in the tomcat i get this error. Now the question is how can I know which jar file it is looking for which i snot in my lib folder.can you please help me to figure it out.
0
 
zolfAuthor Commented:
thanks
0
All Courses

From novice to tech pro — start learning today.