gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 22:32:04 25 4
gpt4 key购买 nike

我修改了tomcat(catalina.sh)的初始化脚本-设置JAVA_OPTS如下:
JAVA_OPTS =“-服务器-Xms8g -Xmx8g -Xmn3g -Xss128K -Dj
ava.awt.headless = true”。然后我启动了tomcat,它的日志显示了这个Spring错误:

“ 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)
    在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)
    在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)
    在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处
    在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    在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配置是旧配置,它不是我编写的。

最佳答案

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

关于tomcat - 我设置了tomcat的JAVA_OPTS -Xss = 128k,然后得到了这个Spring错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11898209/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com