码迷,mamicode.com
首页 > 其他好文 > 详细

异常总结

时间:2018-07-30 15:36:50      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:ssh   name   property   col   too   nsa   ring   出现   spi   

SSH中的异常

1.这个异常出现的原因是,先建立的Customer对象以及表中,没有引用外键,后来加了一个BaseDict基础字典表,Customer把几个字段设置成了BaseDict的外键,所以在启动的时候就报错

  解决的方法是:关闭hibernate配置中的自动更新

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionManager‘ 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.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table cst_customer add constraint FKeh5g36duab8g1h051pdjfwcgd foreign key (cust_source) references base_dict (dict_id)]

 

异常总结

标签:ssh   name   property   col   too   nsa   ring   出现   spi   

原文地址:https://www.cnblogs.com/ms-grf/p/9390664.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!