Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xm
2016-06-02 19:35
751 查看
sessionFactory创建失败,诸多的小细节自己漏了,我的查找范围是,先看看sessionFactory这个bean有没有错,再看hibernate.cfg.xml配置(粗心是魔鬼),最后看实体类的映射文件配置有没有问题。
果然,最后在一个entity的映射文件中发现class只有路径,漏了entity类名。。。果然故障是70%出自自己的粗心。。
ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
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.MappingException:
entity class not found: cn.bdqn.stock.entity
粗心还可以造就找故障和解决方法的效率,自己动脑子了和知识面广了才能铺好自己的路,当然粗心是要不得滴
果然,最后在一个entity的映射文件中发现class只有路径,漏了entity类名。。。果然故障是70%出自自己的粗心。。
ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
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.MappingException:
entity class not found: cn.bdqn.stock.entity
粗心还可以造就找故障和解决方法的效率,自己动脑子了和知识面广了才能铺好自己的路,当然粗心是要不得滴
相关文章推荐
- Android JavascriptBridge 详解(二)
- Android JavascriptBridge 详解(二)
- 浅谈android中的异步加载一
- android SeekBar 样式设置(包含自定义样式)
- Android 屏幕适配相关知识
- Android中获得上下文
- android之CollapsingToolbarLayout的使用
- Google I/O 2015 为 Android 开发者带来了哪些福利?
- android之ScrollView里嵌套ListView或GridView解决冲突
- IOS 实现3D Touch在tableView的简单应用(swift版)
- Android进化史
- android 机顶盒 listview 获取焦点改变item背景
- Android Uri获取不到视频文件路径的问题
- android开发步步为营之105:解决键盘弹起页面被顶上去问题
- Android NDK开发Crash错误定位
- 安卓输入法的显示和隐藏
- DrawerLayout侧滑菜单
- Ndk(jni)调用第三方的so库
- 使用MFMailComposeViewController在iOS应用内编辑邮件使用方法及常见问题
- iOS手势的添加与使用