Java问题:tomcat启动报错,如下!
严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframewor...
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
错误提示:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\jiejing\WEB-INF\classes\com\jiejing\model\sys\Information.class]; nested exception is java.lang.UnsupportedClassVersionError: org/hibernate/search/annotations/Indexed : Unsupported major.minor version 51.0 (unable to load class org.hibernate.search.annotations.Indexed)
错误提示:Caused by: java.lang.UnsupportedClassVersionError: org/hibernate/search/annotations/Indexed : Unsupported major.minor version 51.0 (unable to load class org.hibernate.search.annotations.Indexed)
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
错误提示:java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext 展开
错误提示:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\jiejing\WEB-INF\classes\com\jiejing\model\sys\Information.class]; nested exception is java.lang.UnsupportedClassVersionError: org/hibernate/search/annotations/Indexed : Unsupported major.minor version 51.0 (unable to load class org.hibernate.search.annotations.Indexed)
错误提示:Caused by: java.lang.UnsupportedClassVersionError: org/hibernate/search/annotations/Indexed : Unsupported major.minor version 51.0 (unable to load class org.hibernate.search.annotations.Indexed)
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
错误提示:java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext 展开
2个回答
展开全部
原因:这个是JDK版本不对造成的。
解决方法:
1、即你用某版本的JDK编译的class,放在另一版本JDK上去运行,就容易发生这种异常了(常常是高版本编译在低版本上运行时发生)。
2、这里显然你的Tomcat用的JDK与你编译用的JDK不一样,换成一致的版本就OK了。
方法二:
1、在对应DaoImpl中加入sessionfactory的set方法、get方法。
private SessionFactory sessionFactory;
public SessionFactory getSessionFactory() {
return sessionFactory;
}
public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
继承JdbcDaoSupport。
UserDaoImpl extends JdbcDaoSupport
浙江启扬智能科技有限公司
2023-06-12 广告
2023-06-12 广告
Linux 嵌入式系统中,USB 启动模式能够烧写 ARM 的 uboot 的原因主要有以下几个方面:1. USB 启动模式相对于传统的 BIOS 启动模式来说,具有更高的兼容性和灵活性,可以支持更多的硬件设备和操作系统。2. USB 启动...
点击进入详情页
本回答由浙江启扬智能科技有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询