我正在开发一个使用 Jersey JAX-RS 实现来构建 RESTful 服务的 java web 应用程序。在我将 Amazon Web Services jar 添加到我的 WEB-INF/lib 文件夹之前,一切都很好。我想在 Amazon S3 中存储一些数据,但 AWS 开发工具包和 Jersey 似乎不能很好地配合使用。在我的 lib 文件夹中使用两组 jar 时,Tomcat 将无法启动。如果我删除 jersey-servlet.jar,Tomcat 会启动,但我的服务当然会中断。我正在使用 Jersey v1.2 和 AWS SDK 1.3.20。
有没有其他人看到过同样的行为?
谢谢
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)