title: Jersey JAX-RS and AWS SDK: Tomcat won't start
body: <p>I'm working on a java web application that utilizes the Jersey JAX-RS implementation for building RESTful Services.  All has been well until I added the Amazon Web Services jars to my WEB-INF/lib folder.  I'd like to store some data in Amazon S3, but it seems the AWS SDK and Jersey don't play nicely together.  With both sets of jars in my lib folder Tomcat won't start.  If I remove the jersey-servlet.jar, Tomcat starts, but of course leaves my services broken.  I'm using Jersey v1.2 and AWS SDK 1.3.20.</p>
  
  <p>Has anybody else seen this same behavior?</p>
  
  <p>Thanks</p>
  
  <pre><code>SEVERE: A child container failed during start
  java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
  at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
  at java.util.concurrent.FutureTask.get(FutureTask.java:83)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
  at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  at java.lang.Thread.run(Thread.java:680)
  Caused by: java.lang.OutOfMemoryError: Java heap space
  at org.apache.tomcat.util.bcel.classfile.ClassParser.readFields(ClassParser.java:223)
  at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:126)
  at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2066)
  at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1942)
  at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1908)
  at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1893)
  at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1296)
  at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
  at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:346)
  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
  at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
  ... 8 more
  Oct 2, 2012 12:36:04 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$Sync.innerGet(FutureTask.java:222)
  at java.util.concurrent.FutureTask.get(FutureTask.java:83)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
  at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
  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:732)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:675)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
  </code></pre>