异常-Dispatcher initialization failed

本文解决了Struts与Spring框架整合时出现的FATAL ERROR问题,指出可能的原因是配置缺失或struts提供的jar包冲突,并提供了具体的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

严重:   ********** FATAL ERROR STARTING UP STRUTS-SPRING INTEGRATION **********
Looks like the Spring listener was not configured for your web app! 
Nothing will work until WebApplicationContextUtils returns a valid ApplicationContext.
You might need to add the following to web.xml: 
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
严重:   Dispatcher initialization failed
java.lang.NullPointerException
    at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:220)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:530)

原因:struts和spring整合的jar包
解决方法:删除struts提供的这个jar包,如果没有进行整合两个框架的话。

(索引):283 ErrorEvent isTrusted : true bubbles : false cancelBubble : false cancelable : true colno : 15 composed : false currentTarget : Window {window: Window, self: Window, document: document, name: '', location: Location, …} defaultPrevented : false error : TypeError: Cannot read properties of undefined (reading '2') at GameManager.checkGuideItem (http://localhost:7456/scripting/x/chunks/e1/e13c7011a671a5698bfebd0ffa86245e4820df57.js:1209:44) at GameManager.onTouchMove (http://localhost:7456/scripting/x/chunks/e1/e13c7011a671a5698bfebd0ffa86245e4820df57.js:433:30) at CallbacksInvoker.emit (http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js:150439:28) at NodeEventProcessor.dispatchEvent (http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js:51043:33) at Node.dispatchEvent (http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js:52586:32) at NodeEventProcessor._handleTouchMove (http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js:51380:16) at NodeEventProcessor._handleEventTouch (http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js:51344:29) at PointerEventDispatcher.dispatchEventTouch (http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js:101085:41) at PointerEventDispatcher.dispatchEvent (http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js:101005:25) at Input._emitEvent (http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js:18724:31) eventPhase : 0 filename : "http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js" lineno : 18730 message : "Uncaught TypeError: Cannot read properties of undefined (reading '2')" returnValue : true srcElement : Window {window: Window, self: Window, document: document, name: '', location: Location, …} target : Window {window: Window, self: Window, document: document, name: '', location: Location, …} timeStamp : 5475.60000000149 type : "error" [[Prototype]] : ErrorEvent errorHandle @ (索引):283 input.ts:347 Uncaught TypeError: Cannot read properties of undefined (reading '2') at GameManager.checkGuideItem (GameManager.ts:1120:27) at GameManager.onTouchMove (GameManager.ts:368:37) at CallbacksInvoker.emit (callbacks-invoker.ts:344:34) at NodeEventProcessor.dispatchEvent (node-event-processor.ts:290:33) at Node.dispatchEvent (node.ts:1238:30) at NodeEventProcessor._handleTouchMove (node-event-processor.ts:659:14) at NodeEventProcessor._handleEventTouch (node-event-processor.ts:617:29) at PointerEventDispatcher.dispatchEventTouch (pointer-event-dispatcher.ts:157:47) at PointerEventDispatcher.dispatchEvent (pointer-event-dispatcher.ts:72:25) at Input._emitEvent (input.ts:341:33)  这两段代码存在如上报错
最新发布
06-17
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值