这里有新鲜出炉的 JSP 由浅入深,程序狗速度看过来!
JSP 全名为 Java Server Pages - java 服务器页面是由 Sun Microsystems 公司倡导、许多公司参与一起建立的一种动态网页技术标准。JSP 技术有点类似 ASP 技术,它是在传统的网页 html(标准通用标记语言的子集)文件 (*.htm,*.html) 中插入 Java 程序段 (Scriptlet) 和 JSP 标记(tag),从而形成 JSP 文件,后缀名为(*.jsp)。
这篇文章主要介绍了 SSH 整合异常解决(creating bean with name 'sessionFactory' defined in class path)的相关资料, 需要的朋友可以参考下
SSH 整合异常解决(creating bean with name 'sessionFactory' defined in class path)
整合 SSH 注解的方式,但是一直有异常。还是解决了,贴出来。
- [org.springframework.web.context.ContextLoader]: Context initialization failed
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource
- [spring-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException:
- Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
看到这个异常,首先我以为我没导 hibernate 的相关包,所以去找包,但是发现没少;最后又把包整合了一下,还是没少 hibernate 的相关包。
一个包一个包找所有包都找了一遍发现好像少了一个 javassist 的包,然后把这个包导进去,奇迹般的不报错了;然后启动服务器好了。
特意去网上找了 javassist 包的作用,描述如下:
javassist---- 代码生成工具,Hibernate 用它在运行时扩展 Java 类和实现,同 cglib 包。
来源: http://www.phperz.com/article/17/0813/338933.html