Q:

How to resolve below exception on tomcat

I'm using "aws-java-sdk-1.11.427.jar" in my code and tomcat is refusing to start and shows below error:
But there is no compile time error..
java.util.concurrent. ExecutionException: org.apache.catalina. LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/api]]
    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:939)
    at org.apache.catalina.core. StandardHost.startInternal(StandardHost.java:872)
    at org.apache.catalina.util. LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core. ContainerBase$StartChild.call(ContainerBase.java:1419)
    at org.apache.catalina.core. ContainerBase$StartChild.call(ContainerBase.java:1409)
    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[/api]]
    at org.apache.catalina.util. LifecycleBase.start(LifecycleBase.java:167)
    ... 6 more
Caused by: java.lang. NoClassDefFoundError: com/amazonaws/auth/AWSCredentials
    at java.lang. Class.getDeclaredFields0(Native Method)
    at java.lang. Class.privateGetDeclaredFields(Class.java:2583)
    at java.lang. Class.getDeclaredFields(Class.java:1916)
    at org.apache.catalina.util. Introspection.getDeclaredFields(Introspection.java:110)
    at org.apache.catalina.startup. WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:262)
    at org.apache.catalina.startup. WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:136)
    at org.apache.catalina.startup. WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:66)
    at org.apache.catalina.startup. ContextConfig.applicationAnnotationsConfig(ContextConfig.java:328)
    at org.apache.catalina.startup. ContextConfig.configureStart(ContextConfig.java:778)
    at org.apache.catalina.startup. ContextConfig.lifecycleEvent(ContextConfig.java:299)
    at org.apache.catalina.util. LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
    at org.apache.catalina.core. StandardContext.startInternal(StandardContext.java:5105)
    at org.apache.catalina.util. LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more
Caused by: java.lang. ClassNotFoundException: com.amazonaws.auth. AWSCredentials
    at org.apache.catalina.loader. WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)
    at org.apache.catalina.loader. WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
    ... 19 more

A:

Just put aws-java-sdk-1.11.427.jar in tomcat lib folder

