【新手指南】严重: 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

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

目录
相关文章
|
2月前
|
NoSQL 编译器 API
关于thread使用的错误:pure virtual method called terminate called without an active exception
关于thread使用的错误:pure virtual method called terminate called without an active exception
18 1
|
PHP
Fatal error: Can't use method return value in write context in
说明:   php环境测试会报错下面错误:Fatal error: Can't use method return value in write context in    解决方案:   首先检查自己的php版本,支付宝sdk和demo测试需要php5.5以上版本。
866 0
|
2月前
|
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.
|
2月前
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
75 0
|
8月前
|
PHP
set_error_handler()
set_error_handler()
24 0
|
8月前
Error starting ApplicationContext. To display the auto-configuration report re-run your application
Error starting ApplicationContext. To display the auto-configuration report re-run your application
|
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?
1036 0
|
XML Java 数据格式
Exception encountered during context initialization - cancelling refresh attempt
Exception encountered during context initialization - cancelling refresh attempt:
263 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.
224 0
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.
BeanFactory not initialized or already closed - call 'refresh' before access
BeanFactory not initialized or already closed - call 'refresh' before access
202 0