org.springframework.beans.factory.BeanCreationException: Error creating bean
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginService' defined in file [D:\Tomcat 5.5\webapps\Demo\WEB-INF\classes\applicationContext-actions.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.
BeanCreationException: Error creating bean with name 'txAdvice': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.
BeanCreationException: Error creating bean with name 'transactionManager' defined in file [D:\Tomcat 5.5\webapps\Demo\WEB-INF\classes\applicationContext-common.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.Bean
CreationException: Error creating bean with name 'sessionFactory' defined in file [D:\Tomcat 5.5\webapps\Demo\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is
org.hibernate.MappingException: An association from the table t_person refers to an unmapped class: int
------最佳解决方案--------------------Invocation of init method failed; nested exception is org.hibernate.
MappingException: An association from the table t_person refers to an unmapped class: int
看错了,你的map貌似没加载成功,看看hibernate.cfg.xml这个吧
------其他解决方案--------------------com/demo/model/Person.hbm.xml 文件干嘛不贴一下问题就在这里了
------其他解决方案--------------------hibernate.cfg.xml 这个代码贴一下,还有sqlmap文件
------其他解决方案--------------------Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'
不是说 你配置 通知器的 时候 没 注入 事务管理器么?
------其他解决方案-------------------- An association from the table t_person refers to an unmapped class: int
很明显一个表字段映射错误了吧
------其他解决方案--------------------Person.hbm.xml 这个配置文件 配置的persion实体对应的数据库类型检查下 特别是 int的类型
------其他解决方案--------------------包没有冲突
------其他解决方案--------------------applicationContext-common.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Application context definition for JPetStore's&nb