Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applica

简介:


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [com/app/server/bean/Customer.hbm.xml] cannot be opened because it does not exist


异常说找不到这个资源[com/app/server/bean/Customer.hbm.xml]

1,因为在配置文件里并没有使用和配置这个资源,所以是缓存问题,在我把服务器删除重建之后,重启服务器就好了。

2,如果在配置文件里配置了这个资源,请检查一下hibernate映射路径是否正确。

3,如果配置路径也正确,请检查一下jar包,是否有冲突,用rar打开hibernate3.jar,里面已经包含annotations相关包,与老版冲突。

     解决的方法:将lib目录下的:hibernate-annotations.jar和hibernate-commons-annotations.jar删除后重新部署即可。


相关文章
An error happened during template parsing (template: “ServletContext resource [/WEB-INF/templates/in
An error happened during template parsing (template: “ServletContext resource [/WEB-INF/templates/in
338 2
|
网络安全
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://xxxx.svc.cluster.local:8080/xxxx": Connection reset; nested exception is java.net.SocketException: Connection reset 什么原因导致得
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "xxxx.svc.cluster.local:8080/xxxx ": Connection reset; nested exception is java.net.SocketException: Connection reset 什么原因导致得
5573 0
Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml]【解决方案】
Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml]【解决方案】
|
Java 应用服务中间件 Spring
【终极解决方案】Could not open ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
【终极解决方案】Could not open ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
644 0
|
前端开发 JavaScript
【Azure 环境】前端Web通过Azure AD获取Token时发生跨域问题(CORS Error)
【Azure 环境】前端Web通过Azure AD获取Token时发生跨域问题(CORS Error)
425 0
|
机器学习/深度学习 运维 Serverless
函数计算产品使用问题之打开SD web UI域名时显示resource throttled,是什么原因
函数计算产品作为一种事件驱动的全托管计算服务,让用户能够专注于业务逻辑的编写,而无需关心底层服务器的管理与运维。你可以有效地利用函数计算产品来支撑各类应用场景,从简单的数据处理到复杂的业务逻辑,实现快速、高效、低成本的云上部署与运维。以下是一些关于使用函数计算产品的合集和要点,帮助你更好地理解和应用这一服务。
338 0
|
安全 前端开发 Java
Java Web项目登录报Session Error
Java Web项目登录报Session Error
413 0
|
前端开发 Java Spring
解决Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/Servlet
解决Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/Servlet
1214 0
|
Java 应用服务中间件 Maven
Error configuring application listener of class org.springframework.web.context.ContextLoaderListene
Error configuring application listener of class org.springframework.web.context.ContextLoaderListene
|
算法 Java Go
【GoGin】(1)上手Go Gin 基于Go语言开发的Web框架,本文介绍了各种路由的配置信息;包含各场景下请求参数的基本传入接收
gin 框架中采用的路优酷是基于httprouter做的是一个高性能的 HTTP 请求路由器,适用于 Go 语言。它的设计目标是提供高效的路由匹配和低内存占用,特别适合需要高性能和简单路由的应用场景。
957 4

热门文章

最新文章