Error creating bean with name 'userDAO' defined in class path resource [applicationContext.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 class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
2 回答

動(dòng)漫人物
TA貢獻(xiàn)1815條經(jīng)驗(yàn) 獲得超10個(gè)贊
這是spring配置文件報(bào)錯(cuò) 就是說你在配置實(shí)體類的value的時(shí)候 類型不匹配 比如你的實(shí)體類里定義了一個(gè) private int age; int類型 而你在配置文件里注入的是<constructor-arg value="中文" index="3" type="int"></constructor-arg>中文 無法轉(zhuǎn)換成int 就報(bào)錯(cuò)了!
- 2 回答
- 0 關(guān)注
- 95 瀏覽
添加回答
舉報(bào)
0/150
提交
取消