1. 程式人生 > >Weblogic 執行專案  Cannot set web app root system property when WAR file is not

Weblogic 執行專案  Cannot set web app root system property when WAR file is not

開發十年,就只剩下這套架構體系了! >>>   

在tomcat 環境執行沒問題,但是weblogic 出現。

報錯資訊: Cannot set web app root system property when WAR file is not

[2019-03-16 03:21:25,105] Artifact MdmQueBroadcast:war: Artifact is being deployed, please wait...
<2019-3-16 下午03時21分27秒 CST> <Warning> <Server> <BEA-002611> <Hostname "fz-hp", maps to multiple IP addresses: 169.254.159.225, 169.254.63.9, 192.168.10.11, fe80:0:0:0:dde0:f16d:b140:9fe1%15, fe80:0:0:0:e56d:474a:69ee:3f09%17, fe80:0:0:0:7c63:3d1d:8648:c3e5%10> 
<2019-3-16 下午03時21分30秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.util.Log4jConfigListener failed: java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded.
java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded
	at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:149)
	at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:117)
	at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:46)
	at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	Truncated. see log file for complete stacktrace
> 
<2019-3-16 下午03時21分30秒 CST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1552720885402' for task '0'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException: 
	at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1520)
	at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)
	at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
	at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
	at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
	Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded
	at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:149)
	at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:117)
	at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:46)
	at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	Truncated. see log file for complete stacktrace
> 
<2019-3-16 下午03時21分30秒 CST> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application 'MdmQueBroadcast_war'.> 
<2019-3-16 下午03時21分30秒 CST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'MdmQueBroadcast_war'.> 
<2019-3-16 下午03時21分30秒 CST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: 
	at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1520)
	at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)
	at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
	at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
	at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
	Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded
	at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:149)
	at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:117)
	at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:46)
	at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	Truncated. see log file for complete stacktrace
> 

原因:weblogic 執行時不會自動解壓war檔案,如圖需要選擇第二中釋出方式才能正常執行。