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.BeanCreationException: 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
An association from the table t_person refers to an unmapped class: int
很明显一个表字段映射错误了吧com/demo/model/Person.hbm.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
看错了,你的map貌似没加载成功,看看hibernate.cfg.xml这个吧hibernate.cfg.xml 这个代码贴一下,还有sqlmap文件Person.hbm.xml 这个配置文件 配置的persion实体对应的数据库类型检查下 特别是 int的类型Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'
不是说 你配置 通知器的 时候 没 注入 事务管理器么?