2021-05-17 Tomcat出錯:調(diào)用方法[manageApp]時發(fā)生異常

一、

最近的一個Java項(xiàng)目逊彭,突然之間啟動不了咸灿,我用的是Mac,但是同樣的代碼侮叮,用windows卻可以正常啟動避矢,報錯也很不清晰。

直覺告訴我囊榜,這是環(huán)境問題审胸。網(wǎng)上也查了很多資料,沒有結(jié)論卸勺。?

所以打算重新安裝一個低版本的Tomcat 6 試試砂沛,JDK使用的是Default1.8。 結(jié)果IDEA能正常啟動了孔庭,然后切到其他Tomcat版本尺上,之前的問題也都沒辦法重現(xiàn)了。?

特寫此文圆到,紀(jì)念一下怎抛,后續(xù)有機(jī)會再深究真實(shí)原因。

報錯片斷如下:

17-May-2021 10:11:17.675 嚴(yán)重 [RMI TCP Connection(2)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method [manageApp]

java.lang.IllegalStateException: Error starting child

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)

at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1728)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)

at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)

at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)

at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)

at java.security.AccessController.doPrivileged(Native Method)

at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)

at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)

at sun.rmi.transport.Transport$1.run(Transport.java:200)

at sun.rmi.transport.Transport$1.run(Transport.java:197)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:196)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/web_war]]

at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)

... 43 more

Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.EnumConstantNotPresentExceptionProxy

at sun.reflect.annotation.AnnotationParser.parseEnumArray(AnnotationParser.java:744)

at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:533)

at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)

at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)

at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)

at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)

at java.lang.reflect.Executable.declaredAnnotations(Executable.java:599)

at java.lang.reflect.Executable.declaredAnnotations(Executable.java:597)

at java.lang.reflect.Executable.getAnnotation(Executable.java:570)

at java.lang.reflect.Method.getAnnotation(Method.java:622)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$1.doWith(AutowiredAnnotationBeanPostProcessor.java:250)

at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:530)

at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:247)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1073)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)

at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)

at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)

at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)

at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5140)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

... 44 more

17-May-2021 10:11:17.677 嚴(yán)重 [RMI TCP Connection(2)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method [createStandardContext]

javax.management.RuntimeOperationsException: Exception invoking method [manageApp]

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:298)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)

at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)

at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)

at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)

at java.security.AccessController.doPrivileged(Native Method)

at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)

at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)

at sun.rmi.transport.Transport$1.run(Transport.java:200)

at sun.rmi.transport.Transport$1.run(Transport.java:197)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:196)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.IllegalStateException: Error starting child

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)

at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1728)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)

... 35 more

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/web_war]]

at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)

... 43 more

Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.EnumConstantNotPresentExceptionProxy

at sun.reflect.annotation.AnnotationParser.parseEnumArray(AnnotationParser.java:744)

at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:533)

at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)

at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)

at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)

at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)

at java.lang.reflect.Executable.declaredAnnotations(Executable.java:599)

at java.lang.reflect.Executable.declaredAnnotations(Executable.java:597)

at java.lang.reflect.Executable.getAnnotation(Executable.java:570)

at java.lang.reflect.Method.getAnnotation(Method.java:622)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$1.doWith(AutowiredAnnotationBeanPostProcessor.java:250)

at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:530)

at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:247)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1073)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)

at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)

at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)

at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)

at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5140)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

... 44 more

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末芽淡,一起剝皮案震驚了整個濱河市马绝,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌挣菲,老刑警劉巖富稻,帶你破解...
    沈念sama閱讀 212,718評論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件掷邦,死亡現(xiàn)場離奇詭異,居然都是意外死亡椭赋,警方通過查閱死者的電腦和手機(jī)抚岗,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,683評論 3 385
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來哪怔,“玉大人宣蔚,你說我怎么就攤上這事∪暇常” “怎么了胚委?”我有些...
    開封第一講書人閱讀 158,207評論 0 348
  • 文/不壞的土叔 我叫張陵,是天一觀的道長叉信。 經(jīng)常有香客問我亩冬,道長,這世上最難降的妖魔是什么硼身? 我笑而不...
    開封第一講書人閱讀 56,755評論 1 284
  • 正文 為了忘掉前任硅急,我火速辦了婚禮,結(jié)果婚禮上鸠姨,老公的妹妹穿的比我還像新娘铜秆。我一直安慰自己,他們只是感情好讶迁,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,862評論 6 386
  • 文/花漫 我一把揭開白布连茧。 她就那樣靜靜地躺著,像睡著了一般巍糯。 火紅的嫁衣襯著肌膚如雪啸驯。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 50,050評論 1 291
  • 那天祟峦,我揣著相機(jī)與錄音罚斗,去河邊找鬼。 笑死宅楞,一個胖子當(dāng)著我的面吹牛针姿,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播厌衙,決...
    沈念sama閱讀 39,136評論 3 410
  • 文/蒼蘭香墨 我猛地睜開眼距淫,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了婶希?” 一聲冷哼從身側(cè)響起榕暇,我...
    開封第一講書人閱讀 37,882評論 0 268
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后彤枢,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體狰晚,經(jīng)...
    沈念sama閱讀 44,330評論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,651評論 2 327
  • 正文 我和宋清朗相戀三年缴啡,在試婚紗的時候發(fā)現(xiàn)自己被綠了壁晒。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,789評論 1 341
  • 序言:一個原本活蹦亂跳的男人離奇死亡盟猖,死狀恐怖讨衣,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情式镐,我是刑警寧澤,帶...
    沈念sama閱讀 34,477評論 4 333
  • 正文 年R本政府宣布固蚤,位于F島的核電站娘汞,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏夕玩。R本人自食惡果不足惜你弦,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 40,135評論 3 317
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望燎孟。 院中可真熱鬧禽作,春花似錦、人聲如沸揩页。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,864評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽爆侣。三九已至萍程,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間兔仰,已是汗流浹背茫负。 一陣腳步聲響...
    開封第一講書人閱讀 32,099評論 1 267
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留乎赴,地道東北人忍法。 一個月前我還...
    沈念sama閱讀 46,598評論 2 362
  • 正文 我出身青樓,卻偏偏與公主長得像榕吼,于是被迫代替她去往敵國和親饿序。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,697評論 2 351

推薦閱讀更多精彩內(nèi)容