Whenever I try to run Tomcat with Jersey, it refuses to load - java

Basically I am trying to create a simple Hello World program using Rational Software Architect. To create the server I use Tomcat and Jersey. I found that when I create the server without putting the jersey jar files into WEB-INF/lib but rather I create a custom user library with all the jar files, Tomcat will compile fine but the url will not load the "Hello World" text, just a 404 error. I simple do http://localhost:8080/project name/rest/class path name and nothing will come up. I think its because I don't have the jersey files in WEB-INF/lib but when I put the jersey jar files in that folder and try to run the tomcat server, i get a "Server Tomcat v7.0 Server at localhost failed to start." error.
Please help me out and thanks in advance.
Jun 10, 2015 12:56:28 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:RestHello' did not find a matching property.
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.62
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: May 7 2015 17:14:55 UTC
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.62.0
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 7
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.1 build 7601 Service Pack 1
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: x86
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\SDP80x\jdk\jre
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: jvmwi3260sr9-20110324_78506
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: IBM Corporation
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\EzraZWS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\RESTWS\Tomcat 7.0
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Xjcl:jclscar_24
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.ibm.oti.vm.bootstrap.library.path=C:\SDP80x\jdk\jre\bin
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dsun.boot.library.path=C:\SDP80x\jdk\jre\bin
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.library.path=C:\SDP80x\jdk\jre\bin;.;C:/SDP80x/jdk/jre/bin/j9vm;C:/SDP80x/jdk/jre/bin;C:/SDP80x/jdk/jre/lib/i386;c:\eip40\tibco\tibrv\8.4\bin;C:\eip40\tibco\tibrv\8.3\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\RationalSDLC\ClearCase\bin;C:\RationalSDLC\common;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files\Dell\Dell Data Protection\Encryption\;C:\Program Files (x86)\nodejs\;C:\SDP80x\jdk\bin;;C:\SDP80x;
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.home=C:\SDP80x\jdk\jre
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.ext.dirs=C:\SDP80x\jdk\jre\lib\ext
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Duser.dir=C:\SDP80x
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: _j2se_j9=71168
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Xdump
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.class.path=c:\eip40\tibco\tibrv\8.4\lib\tibrvnative.jar;C:\eip40\tibco\tibrv\8.3\lib\tibrvnative.jar;C:\SDP80x\jdk\bin;
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\EzraZWS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\RESTWS\Tomcat 7.0
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\EzraZWS\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\RESTWS\Tomcat 7.0\endorsed
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.class.path=C:\RESTWS\Tomcat 7.0\bin\bootstrap.jar;C:\RESTWS\Tomcat 7.0\bin\tomcat-juli.jar;C:\SDP80x\jdk\lib\tools.jar;C:\EzraZWS\RestHello\WebContent\WEB-INF\lib\jersey-client.jar;C:\EzraZWS\RestHello\WebContent\WEB-INF\lib\jersey-common.jar;C:\EzraZWS\RestHello\WebContent\WEB-INF\lib\jersey-container-servlet.jar;C:\EzraZWS\RestHello\WebContent\WEB-INF\lib\jersey-container-servlet-core.jar;C:\EzraZWS\RestHello\WebContent\WEB-INF\lib\jersey-media-jaxb.jar;C:\EzraZWS\RestHello\WebContent\WEB-INF\lib\jersey-server.jar
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dsun.java.command=org.apache.catalina.startup.Bootstrap start
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dsun.java.launcher=SUN_STANDARD
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: _port_library
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: _org.apache.harmony.vmi.portlib
Jun 10, 2015 12:56:28 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\SDP80x\jdk\jre\bin;.;C:/SDP80x/jdk/jre/bin/j9vm;C:/SDP80x/jdk/jre/bin;C:/SDP80x/jdk/jre/lib/i386;c:\eip40\tibco\tibrv\8.4\bin;C:\eip40\tibco\tibrv\8.3\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\RationalSDLC\ClearCase\bin;C:\RationalSDLC\common;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files\Dell\Dell Data Protection\Encryption\;C:\Program Files (x86)\nodejs\;C:\SDP80x\jdk\bin;;C:\SDP80x;
Jun 10, 2015 12:56:28 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jun 10, 2015 12:56:28 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 559 ms
Jun 10, 2015 12:56:28 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 10, 2015 12:56:28 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.62
Jun 10, 2015 12:56:28 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
Throwable occurred: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:233)
at java.util.concurrent.FutureTask.get(FutureTask.java:94)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
at java.util.concurrent.FutureTask.run(FutureTask.java:149)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:736)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 7 more
Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/glassfish/jersey/servlet/init/JerseyServletContainerInitializer, offset=6
at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
at java.net.URLClassLoader.access$300(URLClassLoader.java:79)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1038)
at java.security.AccessController.doPrivileged(AccessController.java:284)
at java.net.URLClassLoader.findClass(URLClassLoader.java:429)
at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:645)
at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:172)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1707)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:172)
at org.apache.catalina.startup.WebappServiceLoader.loadServices(WebappServiceLoader.java:192)
at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:157)
at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1577)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1281)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
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:5416)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Jun 10, 2015 12:56:28 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
Throwable occurred: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/RestHello]]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:233)
at java.util.concurrent.FutureTask.get(FutureTask.java:94)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
at java.util.concurrent.FutureTask.run(FutureTask.java:149)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:736)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/RestHello]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 7 more
Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/glassfish/jersey/servlet/init/JerseyServletContainerInitializer, offset=6 (unable to load class org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2961)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:172)
at org.apache.catalina.startup.WebappServiceLoader.loadServices(WebappServiceLoader.java:192)
at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:157)
at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1577)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1281)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
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:5416)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Jun 10, 2015 12:56:28 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
Throwable occurred: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:233)
at java.util.concurrent.FutureTask.get(FutureTask.java:94)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
at java.util.concurrent.FutureTask.run(FutureTask.java:149)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:736)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Jun 10, 2015 12:56:28 PM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
Throwable occurred: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Jun 10, 2015 12:56:28 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Jun 10, 2015 12:56:28 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jun 10, 2015 12:56:28 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jun 10, 2015 12:56:28 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Jun 10, 2015 12:56:28 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
My code:
package RestHello;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
#Path ("/hello")
public class Hello {
#GET
#Produces(MediaType.TEXT_PLAIN)
public String sayHello() {
return "Hello";
}
}
and my web.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>RestHello</display-name>
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<!-- Register resources and providers under com.vogella.jersey.first package. -->
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>RestHello</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>

I finally got it. Thanks Sasikanth you were right about my error. The jre must match for apache, your project, and Jersey. The newest Jersey uses jre7 so when you install apache, use jre7 as the build path. Also my Rational project was defaulted to java 1.6 not 1.7. So you have to manually create a build path to jre7. This video teaches you how to do that (just go to java build path in properties of your project, double click jre system library, click installed jres, then add a new path to your jre directory). To find the jre directory just look up java on the start menu, click the java tab, then click view. This made my project build path jre7, tomcat should already be jre7 from the install, and jersey is jre7 as well so everything will match and your server will run correctly.
Video: https://www.youtube.com/watch?v=whQaqnI4SrU

The unsupported class version error suggests that you are using a newer version of jersey than is supported by your tomcat installation. Most likely it is because of jre version mismatch - the jersey library you are using requires a newer jre but you have an older version

Related

Tomcat Server Error SEVERE: A child container failed during start

Previously my tomcat server was working fine.
But suddenly getting following error.
I've tried to recreate the tomcat server but the result is still the same.
Please help on this
Apr 11, 2022 11:14:22 AM
org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING:
[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'source' to 'org.eclipse.jst.jee.server:com.ihcs.api.mobile'
did not find a matching property. Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: Server
version: Apache Tomcat/8.0.52 Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: Server
built: Apr 28 2018 16:24:29 UTC Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: Server
number: 8.0.52.0 Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: OS Name:
Windows 10 Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: OS
Version: 10.0 Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO:
Architecture: amd64 Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: Java Home:
C:\Program Files\Java\jdk1.8.0_171\jre Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: JVM
Version: 1.8.0_171-b11 Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: JVM
Vendor: Oracle Corporation Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO:
CATALINA_BASE:
C:\Users\Anthony\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0
Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO:
CATALINA_HOME: C:\Program Files\Tomcat\apache-tomcat-8.0.52
Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: Command
line argument:
-Dcatalina.base=C:\Users\Anthony\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0
Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: Command
line argument: -Dcatalina.home=C:\Program
Files\Tomcat\apache-tomcat-8.0.52 Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: Command
line argument:
-Dwtp.deploy=C:\Users\Anthony\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: Command
line argument: -Djava.endorsed.dirs=C:\Program
Files\Tomcat\apache-tomcat-8.0.52\endorsed Apr 11, 2022 11:14:22 AM
org.apache.catalina.startup.VersionLoggerListener log INFO: Command
line argument: -Dfile.encoding=Cp1252 Apr 11, 2022 11:14:22 AM
org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The
APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: C:\Program
Files\Java\jdk1.8.0_171\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Users/Anthony/OneDrive/Documents/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;C:/Users/Anthony/OneDrive/Documents/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;C:\Program
Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files
(x86)\BellSoft\LibericaJRE-14-Full\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program
Files\Git\cmd;C:\Users\Anthony\AppData\Local\Microsoft\WindowsApps;C:\Users\Anthony\AppData\Local\Programs\Microsoft
VS Code\bin;C:\Program Files\JetBrains\IntelliJ IDEA
2021.3.1\bin;;C:\Users\Anthony\AppData\Local\GitHubDesktop\bin;C:\Users\Anthony\OneDrive\Documents\eclipse;;.
Apr 11, 2022 11:14:22 AM org.apache.coyote.AbstractProtocol init INFO:
Initializing ProtocolHandler ["http-nio-8080"] Apr 11, 2022 11:14:22
AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO:
Using a shared selector for servlet write/read Apr 11, 2022 11:14:22
AM org.apache.coyote.AbstractProtocol init INFO: Initializing
ProtocolHandler ["ajp-nio-8009"] Apr 11, 2022 11:14:22 AM
org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO:
Using a shared selector for servlet write/read Apr 11, 2022 11:14:22
AM org.apache.catalina.startup.Catalina load INFO: Initialization
processed in 682 ms Apr 11, 2022 11:14:22 AM
org.apache.catalina.core.StandardService startInternal INFO: Starting
service Catalina Apr 11, 2022 11:14:22 AM
org.apache.catalina.core.StandardEngine startInternal INFO: Starting
Servlet Engine: Apache Tomcat/8.0.52 Apr 11, 2022 11:14:32 AM
org.apache.jasper.servlet.TldScanner scanJars INFO: At least one JAR
was scanned for TLDs yet contained no TLDs. Enable debug logging for
this logger for a complete list of JARs that were scanned but no TLDs
were found in them. Skipping unneeded JARs during scanning can improve
startup time and JSP compilation time. Apr 11, 2022 11:14:32 AM
org.apache.catalina.core.ApplicationContext log INFO: 2 Spring
WebApplicationInitializers detected on classpath SLF4J: Failed to load
class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to
no-operation (NOP) logger implementation SLF4J: See
http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.
INIT CONFIG Apr 11, 2022 11:14:32 AM org.apache.catalina.core.ContainerBase startInternal SEVERE: A child
container failed during start java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/com.ihcs.api.mobile]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122) at
java.util.concurrent.FutureTask.get(FutureTask.java:192) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:945)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1400)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) Caused by:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/com.ihcs.api.mobile]]
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
... 6 more Caused by: java.lang.NoClassDefFoundError:
org/springframework/core/ErrorCoded at
java.lang.ClassLoader.defineClass1(Native Method) at
java.lang.ClassLoader.defineClass(ClassLoader.java:763) at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2529)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:872)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1321)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
at java.lang.ClassLoader.defineClass1(Native Method) at
java.lang.ClassLoader.defineClass(ClassLoader.java:763) at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2529)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:872)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1321)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.createBeanFactory(AbstractRefreshableApplicationContext.java:200)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:126)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:614)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:515)
at
com.ihcs.config.config.ApplicationInitializer.onStartup(ApplicationInitializer.java:30)
at
org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5352)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more Caused by: java.lang.ClassNotFoundException:
org.springframework.core.ErrorCoded at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1352)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
... 28 more
Apr 11, 2022 11:14:32 AM org.apache.catalina.core.ContainerBase
startInternal SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]] at
java.util.concurrent.FutureTask.report(FutureTask.java:122) at
java.util.concurrent.FutureTask.get(FutureTask.java:192) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:945)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:641) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483) Caused
by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1400)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) Caused by:
org.apache.catalina.LifecycleException: A child container failed
during start at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
Apr 11, 2022 11:14:32 AM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is
unable to start. org.apache.catalina.LifecycleException: Failed to
start component [StandardServer[8005]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.startup.Catalina.start(Catalina.java:641) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483) Caused
by: org.apache.catalina.LifecycleException: Failed to start component
[StandardService[Catalina]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 7 more Caused by: org.apache.catalina.LifecycleException: Failed
to start component [StandardEngine[Catalina]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 9 more Caused by: org.apache.catalina.LifecycleException: A child
container failed during start at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 11 more
Apr 11, 2022 11:14:32 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"] Apr 11, 2022 11:14:32
AM org.apache.coyote.AbstractProtocol pause INFO: Pausing
ProtocolHandler ["ajp-nio-8009"] Apr 11, 2022 11:14:32 AM
org.apache.catalina.core.StandardService stopInternal INFO: Stopping
service Catalina Apr 11, 2022 11:14:32 AM
org.apache.coyote.AbstractProtocol destroy INFO: Destroying
ProtocolHandler ["http-nio-8080"] Apr 11, 2022 11:14:32 AM
org.apache.coyote.AbstractProtocol destroy SEVERE: Failed to destroy
end point associated with ProtocolHandler ["http-nio-8080"]
java.lang.NullPointerException at
org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)
at
org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)
at
org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:896)
at
org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)
at
org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at
org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at
org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)
at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.startup.Catalina.start(Catalina.java:645) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)
Apr 11, 2022 11:14:32 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-nio-8009"] Apr 11, 2022
11:14:32 AM org.apache.coyote.AbstractProtocol destroy SEVERE: Failed
to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]
java.lang.NullPointerException at
org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)
at
org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)
at
org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:896)
at
org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)
at
org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at
org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at
org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)
at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.startup.Catalina.start(Catalina.java:645) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)

Apache Tomcat 7 in Eclipse fails to start: A child container failed during start

A student that is working in Eclipse using Tomcat 7 in Windows 10, when she tries to start the server, it fails.
She deleted the server and added it many times without any success. She is not using Maven. We tried many proposed solutions from stack overflow but still no luck.
The information she gets is:
Mar 23, 2017 3:03:16 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ehr_se_christina_ade' did not find a matching property.
Mar 23, 2017 3:03:16 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:AtomikiDiplomatiki' did not find a matching property.
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.73
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Nov 7 2016 21:27:23 UTC
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.73.0
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 8.1
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.3
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jre1.8.0_111
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_111-b14
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\Users\christina\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\Users\apache-tomcat-7.0.73-windows-x64\apache-tomcat-7.0.73
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Users\christina\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Users\apache-tomcat-7.0.73-windows-x64\apache-tomcat-7.0.73
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\Users\christina\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Users\apache-tomcat-7.0.73-windows-x64\apache-tomcat-7.0.73\endorsed
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Mar 23, 2017 3:03:16 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_111\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:/Program Files/Java/jre1.8.0_111/bin/server;C:/Program Files/Java/jre1.8.0_111/bin;C:/Program Files/Java/jre1.8.0_111/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Lenovo\Motion Control\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Brackets\command;C:\Program Files\eclipse;;.
Mar 23, 2017 3:03:16 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 23, 2017 3:03:16 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Mar 23, 2017 3:03:16 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 493 ms
Mar 23, 2017 3:03:16 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 23, 2017 3:03:16 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.73
Mar 23, 2017 3:03:17 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(C:\Users\christina\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\AtomikiDiplomatiki\WEB-INF\lib\javax.servlet-3.0.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Mar 23, 2017 3:03:18 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Mar 23, 2017 3:03:18 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ehr_se_christina_ade]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1119)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
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: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ehr_se_christina_ade]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
... 6 more
Caused by: java.lang.NoClassDefFoundError: org/json/JSONException
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:270)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:109)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:64)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:417)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:891)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
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:5522)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
Caused by: java.lang.ClassNotFoundException: org.json.JSONException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
... 20 more
Mar 23, 2017 3:03:18 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1119)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:444)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:758)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:693)
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.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
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: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1127)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
Mar 23, 2017 3:03:18 PM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.startup.Catalina.start(Catalina.java:693)
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.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:758)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:444)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1127)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 11 more
You are missing the json.jar in your classpath, if you add it in your build path it will not help, it should be available in your classpath on then it will be loaded at runtime.
In case of simple web application with no maven put your JAR libraries into the WEB-INF/lib folder.
If your question is you are not deploying any application in your tomcat server still facing this issue, try putting your json.jar in the common/lib folder of tomcat server and then start the server again.

Servlet in Java using Tomcat server

Below are the warnings and error when i run my java file it contains only the basic override methods of servlet interface. I have configured tomcat in eclipse.
Feb 18, 2016 12:14:25 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:LalitCheck' did not find a matching property.
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.67
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Dec 7 2015 13:07:11 UTC
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.67.0
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 7
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.1
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: x86
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jre7
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.7.0_79-b15
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\Users\Lalit\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 7.0
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Users\Lalit\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 7.0
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\Users\Lalit\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 7.0\endorsed
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Feb 18, 2016 12:14:25 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Ruby193\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\Brackets\command;C:\Program Files\Java\jdk1.7.0_79\bin;C:\Users\Lalit\Downloads\eclipse-jee-kepler-sr1-win32\eclipse;;.
Feb 18, 2016 12:14:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8111"]
Feb 18, 2016 12:14:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8222"]
Feb 18, 2016 12:14:25 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1087 ms
Feb 18, 2016 12:14:25 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 18, 2016 12:14:25 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.67
Feb 18, 2016 12:14:26 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [141] milliseconds.
Feb 18, 2016 12:14:26 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(C:\Users\Lalit\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\LalitCheck\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Feb 18, 2016 12:14:26 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/LalitCheck]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1122)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
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: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/LalitCheck]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> Hello in servlet mapping
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3388)
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3363)
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1438)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1357)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
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:5479)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Feb 18, 2016 12:14:26 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1122)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:693)
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.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
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: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1130)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Feb 18, 2016 12:14:26 AM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8333]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:693)
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.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1130)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Feb 18, 2016 12:14:26 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8111"]
Feb 18, 2016 12:14:26 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8222"]
Feb 18, 2016 12:14:26 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Feb 18, 2016 12:14:26 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8111"]
Feb 18, 2016 12:14:26 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8222"]
The reason is an incorrect <url-pattern> in the web.xml
java.lang.IllegalArgumentException: Invalid <url-pattern> Hello in servlet mapping
What is url-pattern in web.xml and how to configure servlet

Signpost not working

I use Tomcat7 with Eclipse.
Steps I've done:
Imported commons-codec-1.10.jar as External JAR
Imported signpost-core-1.2.1.2.jar as External JAR
Imported signpost-commonshttp4-1.2.1.2.jar as External JAR
Checked them in "Order and Export"
Imports:
import oauth.signpost.OAuthConsumer;
import oauth.signpost.basic.DefaultOAuthConsumer;
import oauth.signpost.exception.OAuthCommunicationException;
import oauth.signpost.exception.OAuthExpectationFailedException;
import oauth.signpost.exception.OAuthMessageSignerException;
Code:
OAuthConsumer consumer = new DefaultOAuthConsumer("Hidden", "Hidden");
consumer.setTokenWithSecret("Hidden", "Hidden");
url = new URL("...");
HttpURLConnection c = (HttpURLConnection)url.openConnection();
try {
consumer.sign(c);
} catch (OAuthMessageSignerException
| OAuthExpectationFailedException
| OAuthCommunicationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
BufferedReader in = new BufferedReader(new InputStreamReader(c.getInputStream(),"UTF8"));
But when I try to start the Servlet, I get this:
Aug 10, 2015 12:25:22 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Webapp0' did not find a matching property.
Aug 10, 2015 12:25:22 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Webapp1' did not find a matching property.
Aug 10, 2015 12:25:22 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Webapp2' did not find a matching property.
Aug 10, 2015 12:25:22 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Webapp3' did not find a matching property.
Aug 10, 2015 12:25:22 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Webapp4' did not find a matching property.
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Server version: Apache Tomcat/7.0.57
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Server built: Nov 3 2014 08:39:16 UTC
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Server number: 7.0.57.0
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: OS Name: Windows 7
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: OS Version: 6.1
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Architecture: amd64
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: JAVA_HOME: C:\Program Files\Java\jre1.8.0_31
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: JVM Version: 1.8.0_31-b13
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: JVM Vendor: Oracle Corporation
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: CATALINA_BASE: C:\Users\Boxberger\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: CATALINA_HOME: C:\Program Files\apache-tomcat-7.0.57-windows-x64\apache-tomcat-7.0.57
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Dcatalina.base=C:\Users\Boxberger\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Dcatalina.home=C:\Program Files\apache-tomcat-7.0.57-windows-x64\apache-tomcat-7.0.57
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Dwtp.deploy=C:\Users\Boxberger\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Djava.endorsed.dirs=C:\Program Files\apache-tomcat-7.0.57-windows-x64\apache-tomcat-7.0.57\endorsed
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Dfile.encoding=Cp1252
Aug 10, 2015 12:25:22 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMATION: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_31\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_31/bin/server;C:/Program Files/Java/jre1.8.0_31/bin;C:/Program Files/Java/jre1.8.0_31/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\eclipse-jee-luna-SR1a-win32-x86_64\eclipse;;.
Aug 10, 2015 12:25:22 PM org.apache.coyote.AbstractProtocol init
INFORMATION: Initializing ProtocolHandler ["http-bio-8080"]
Aug 10, 2015 12:25:22 PM org.apache.coyote.AbstractProtocol init
INFORMATION: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 10, 2015 12:25:22 PM org.apache.catalina.startup.Catalina load
INFORMATION: Initialization processed in 330 ms
Aug 10, 2015 12:25:22 PM org.apache.catalina.core.StandardService startInternal
INFORMATION: Starting service Catalina
Aug 10, 2015 12:25:22 PM org.apache.catalina.core.StandardEngine startInternal
INFORMATION: Starting Servlet Engine: Apache Tomcat/7.0.57
Aug 10, 2015 12:25:22 PM org.apache.catalina.core.ContainerBase startInternal
SCHWERWIEGEND: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Immofy]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
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: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Immofy]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.NoClassDefFoundError: oauth/signpost/exception/OAuthMessageSignerException
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:270)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
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:5380)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Caused by: java.lang.ClassNotFoundException: oauth.signpost.exception.OAuthMessageSignerException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 20 more
Aug 10, 2015 12:25:23 PM org.apache.catalina.core.ContainerBase startInternal
SCHWERWIEGEND: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
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.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
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: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Aug 10, 2015 12:25:23 PM org.apache.catalina.startup.Catalina start
SCHWERWIEGEND: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
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.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Aug 10, 2015 12:25:23 PM org.apache.coyote.AbstractProtocol pause
INFORMATION: Pausing ProtocolHandler ["http-bio-8080"]
Aug 10, 2015 12:25:23 PM org.apache.coyote.AbstractProtocol pause
INFORMATION: Pausing ProtocolHandler ["ajp-bio-8009"]
Aug 10, 2015 12:25:23 PM org.apache.catalina.core.StandardService stopInternal
INFORMATION: Stopping service Catalina
Aug 10, 2015 12:25:23 PM org.apache.coyote.AbstractProtocol destroy
INFORMATION: Destroying ProtocolHandler ["http-bio-8080"]
Aug 10, 2015 12:25:23 PM org.apache.coyote.AbstractProtocol destroy
INFORMATION: Destroying ProtocolHandler ["ajp-bio-8009"]
When I start the Servlet without the OAuth imports it works great.
Where is my failure?

A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException:

I am using spring mvc(not maven),my problem is that tomcat(8.0) stops while deploying.
With out deploying my project i tried to start tomcat via eclipse,it works successfully.
My error console
Jul 21, 2015 12:24:33 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SpringMVCBasic' did not find a matching property.
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/8.0.23
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: May 19 2015 14:58:38 UTC
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 8.0.23.0
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Linux
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 3.13.0-55-generic
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: i386
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: /usr/lib/jvm/java-8-oracle/jre
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_45-b14
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: /home/vishnum/workshop/projects/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: /home/vishnum/workshop/tools/Apachetomcat/apache-tomcat-8.0.23
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=/home/vishnum/workshop/projects/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=/home/vishnum/workshop/tools/Apachetomcat/apache-tomcat-8.0.23
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=/home/vishnum/workshop/projects/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=/home/vishnum/workshop/tools/Apachetomcat/apache-tomcat-8.0.23/endorsed
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=UTF-8
Jul 21, 2015 12:24:33 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-8-oracle/jre/lib/i386/server:/usr/lib/jvm/java-8-oracle/jre/lib/i386:/usr/lib/jvm/java-8-oracle/jre/../lib/i386:/usr/lib/jvm/java-8-oracle/jre/lib/i386/client:/usr/lib/jvm/java-8-oracle/jre/lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib
Jul 21, 2015 12:24:33 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Jul 21, 2015 12:24:33 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jul 21, 2015 12:24:33 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Jul 21, 2015 12:24:33 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jul 21, 2015 12:24:33 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 676 ms
Jul 21, 2015 12:24:33 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 21, 2015 12:24:33 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.23
Jul 21, 2015 12:24:34 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jul 21, 2015 12:24:34 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SpringMVCBasic]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SpringMVCBasic]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.NullPointerException
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:142)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5156)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Jul 21, 2015 12:24:34 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:625)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:925)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Jul 21, 2015 12:24:34 PM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:625)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:925)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Jul 21, 2015 12:24:34 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
Jul 21, 2015 12:24:34 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-nio-8009"]
Jul 21, 2015 12:24:34 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jul 21, 2015 12:24:34 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
Jul 21, 2015 12:24:34 PM org.apache.coyote.AbstractProtocol destroy
SEVERE: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:303)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:479)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:818)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:532)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:859)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
Jul 21, 2015 12:24:34 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-nio-8009"]
Jul 21, 2015 12:24:34 PM org.apache.coyote.AbstractProtocol destroy
SEVERE: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:303)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:479)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:818)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:532)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:859)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
These are the library files,i am using
com.mysql.jdbc_5.1.5.jar
com.springsource.org.apache.commons.fileupload-1.2.0.jar
com.springsource.org.apache.commons.httpclient-3.1.0.jar
com.springsource.org.apache.commons.logging-1.1.1.jar
com.springsource.org.apache.log4j-1.2.15.jar
com.springsource.org.codehaus.jackson.mapper-1.0.0.jar
commons-dbcp-1.4.jar
commons-logging-1.1.2.jar
javax.servlet-api-3.0.1.jar
jmxtools-1.2.1.jar
jstl-1.2.jar
org.springframework.asm-3.0.1.RELEASE-A.jar
org.springframework.beans-3.0.1.RELEASE-A.jar
org.springframework.context-3.0.1.RELEASE-A.jar
org.springframework.context-3.2.0.RELEASE.jar
org.springframework.core-3.0.1.RELEASE-A.jar
org.springframework.expression-3.0.1.RELEASE-A.jar
org.springframework.oxm-3.0.1.RELEASE-A.jar
org.springframework.web-3.0.1.RELEASE-A.jar
org.springframework.web-3.1.0.M2.jar
org.springframework.web.portlet-3.0.1.RELEASE-A.jar
org.springframework.web.servlet-3.0.1.RELEASE-A.jar
org.springframework.web.struts-3.0.1.RELEASE-A.jar
spring-jdbc-3.0.6.release.jar
spring-webmvc-3.0.6.RELEASE.jar
spring-webmvc-3.1.1.RELEASE.jar
spring.web.servlet-3.1.1.jar
I added "commons-logging-1.1.2.jar" as specified in some tutorial,but it wont works.
My controller class is shown below.
#Configuration
#ComponentScan(basePackages="com.indocosmo.controller")
#EnableWebMvc
public class MvcConfiguration extends WebMvcConfigurerAdapter{
#Bean
public ViewResolver getViewResolver(){
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/jsp/");
resolver.setSuffix(".jsp");
return resolver;
}
// #Override
// public void configureDefaultServletHandling(
// DefaultServletHandlerConfigurer configurer) {
// configurer.enable();
// }
#Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
}
#Bean
public DataSource getDataSource() {
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName("com.mysql.jdbc.Driver");
dataSource.setUrl("jdbc:mysql://192.168.1.56:3306/pmsdb?characterEncoding=UTF-8");
dataSource.setUsername("pmsuser");
dataSource.setPassword("pmspw");
return dataSource;
}
#Bean
public Userdao getContactDAO() {
return new Userdaoimplementation(getDataSource());
}
}
I cannot locate what is happening,Can any one please help me any help will be highly appreciable...

Categories