【新手指南】严重: Exception sending context initialized event to listener instance of class

简介: 【新手指南】严重: Exception sending context initialized event to listener instance of class

一般像这种错误,主要去观察caused by:后边的提示,问题基本都能找到:

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoSupport': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionTemplate' defined in class path resource [spring/ApplicationContext-dataSource.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/ApplicationContext-dataSource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis1/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error registering typeAlias for 'Page'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.alphaviae.base.entity.Page
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/ApplicationContext-dataSource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis1/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error registering typeAlias for 'Page'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.alphaviae.base.entity.Page
Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis1/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error registering typeAlias for 'Page'. Cause: java.lang.ClassNotFoundException: Cannot find class: org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)
  ... 44 more
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error registering typeAlias for 'Page'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.alphaviae.base.entity.Page
  ... 49 more

error定位:[spring/ApplicationContext-dataSource.xml]  &&  [mybatis1/mybatis-config.xml]

8fa9c1482e873709d94b6ce158714e4.png

解决方案:修改当前对应引用包  

94c938ab44744f6356f404014930041.png

可能大家还会有其他的原因,我遇到目前是这个,希望可以帮助到大家

目录
相关文章
|
6月前
|
NoSQL 编译器 API
关于thread使用的错误:pure virtual method called terminate called without an active exception
关于thread使用的错误:pure virtual method called terminate called without an active exception
127 1
|
Web App开发 前端开发
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
789 0
|
3月前
|
Java Maven
Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
71 0
|
5月前
|
存储 缓存 自然语言处理
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
47 1
|
6月前
|
JavaScript
【报错】onMounted is called when there is no active component instance too be associated with.
【报错】onMounted is called when there is no active component instance too be associated with.
424 4
|
程序员
解决报错Exception encountered during context initialization
程序员不是在去生产bug的路上,那就是在去解决bug的路上。
145 1
|
Java Maven Android开发
成功解决FATAL ERROR in native method: JDWP on getting class status, jvmtiError=JVMTI_ERROR_WRONG_PHASE
成功解决FATAL ERROR in native method: JDWP on getting class status, jvmtiError=JVMTI_ERROR_WRONG_PHASE
|
Java Spring
Redisson BUG: Failed to submit a listener notification task. Event loop shut down?
Redisson BUG: Failed to submit a listener notification task. Event loop shut down?
1395 0
|
Java 应用服务中间件
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.
291 0
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.
|
XML Java 数据格式
Exception encountered during context initialization - cancelling refresh attempt
Exception encountered during context initialization - cancelling refresh attempt:
325 0