报错
面具人生lql
这个作者很懒,什么都没留下…
展开
-
@ManyToOne references an unknown entity:
报错:@OneToOne or @ManyToOne on com.it.shop.model.Product.category references an unknown entity: com.it.shop.model.Category1.检查hibernate.cfg.xml中是否做了mappingmappingclass="com.it.shop.原创 2016-11-04 13:20:55 · 7228 阅读 · 0 评论 -
object references an unsaved transient instance
报错:object references an unsaved transient instance - save the transient instance before flushing: com.it.shop.model.Publishers解决:设置ManyToOne,OneToMany两边的Cascade策略一致@ManyToOne(fetch = FetchTy原创 2016-11-04 13:23:58 · 531 阅读 · 0 评论 -
sessionfactory.getcurrentsession()获取不到session
1,如果使用hibernate配置 在hibernate.cfg.xml里配置 thread 如果使用的是getCurrentSession()的话,需要配置,否则是空指针。 使用openSession()不需要配置2,如果使用Spring注入 检查sessionFactory配置是否正确 如果sessionFa原创 2016-11-04 13:25:02 · 5466 阅读 · 0 评论 -
解决: org.springframework.beans.factory.BeanNotOfRequiredTypeException
错误信息: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'aisleService' must be of type [com.gdie.whlocation.service.impl.AisleService], but was actually of type [$P转载 2016-11-04 13:27:25 · 31668 阅读 · 5 评论 -
BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type [com.sun.p
org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'applicationService' must be of type [com.meta.dbcenter.application.service.impl.ApplicationServiceImpl], but was actually原创 2016-11-04 13:30:23 · 5202 阅读 · 0 评论 -
TIME_WAIT 导致 Address already in use : connect 异常的解决办法
Address already in use : connect 异常的解决办法在使用java作为http客户端进行压力测试的时候,尤其是在多线程环境下当客户端连续创建连接一段时间后极容易出现端口占用的异常情况:Address already in use : connect ......netstat -aux 查看会有一大堆状态为 TIME_WAIT 的连接问题原因: Java的 Socket原创 2016-11-04 13:57:16 · 4791 阅读 · 0 评论 -
MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
MYSQL: Cannot delete or update a parent row: a foreign key constraint fails 这可能是MySQL在InnoDB中设置了foreign key关联,造成无法更新或删除数据。可以通过设置FOREIGN_KEY_CHECKS变量来避免这种情况。 SET FOREIGN_KEY_CHECKS = 0;原创 2016-11-04 13:26:09 · 738 阅读 · 0 评论