我设置tomcat的JAVA_OPTS -Xss = 128k,然后我得到了这个Spring ERROR

时间:2012-08-10 08:44:51

标签: tomcat xss java-opts

我修改了tomcat(catalina.sh)的init脚本 - 设置JAVA_OPTS如下: JAVA_OPTS =“ - 服务器-Xms8g -Xmx8g -Xmn3g -Xss128K -Dj ava.awt.headless = true“。然后我启动了tomcat,它的日志得到了这个Spring ERROR:

“2012-08-10 16:40:20.697错误上下文初始化失败 java.lang.NoClassDefFoundError:无法初始化类org.springframework.beans.factory.BeanCreationException“

但在我设置JAVA_OPTS之前,它运行良好。为什么会这样?我该怎么办?非常感谢。

整个堆栈跟踪是: 2012-08-10 16:40:20.697错误上下文初始化失败 java.lang.NoClassDefFoundError:无法初始化类org.springframework.beans.factory.BeanCreationException     在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)     在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)     在org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:294)     在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)     在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)     在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)     在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)     在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)     在org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)     在org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)     在org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)     在org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)     在org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)     在org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)     在org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)     在org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)     在org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)     在org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)     在org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)     在org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)     在org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)     在org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)     在org.apache.catalina.core.StandardHost.start(StandardHost.java:722)     在org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)     在org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)     在org.apache.catalina.core.StandardService.start(StandardService.java:516)     在org.apache.catalina.core.StandardServer.start(StandardServer.java:710)     在org.apache.catalina.startup.Catalina.start(Catalina.java:593)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     在java.lang.reflect.Method.invoke(Method.java:597)     在org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)     在org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

JAVA_OPTS配置是旧配置,不是我编写的。

1 个答案:

答案 0 :(得分:0)

您显然已将线程堆栈大小设置得太小。除非你有充分的理由这样做,否则不要修改线程堆栈大小。