- 博客(29)
- 资源 (4)
- 收藏
- 关注
原创 Hibernate:Caused by: java.sql.SQLException: Incorrect string value: '\xE8\x8F异常
今天在学习Hibernate插入数据时,一直报错:Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute statementCaused by: java.sql.SQLException: Incorrect string value: '\xE8\x
2016-05-29 21:07:58 4427 1
原创 关于Eclipse项目前有红叹号的解决方案
出现这种情况的原因就是导入的Jar路径不对,可能是因为你之前将Jar文件导入项目后,又将Jar文件换了存放位置。解决方案:右键项目工程 -> Build Path -> Configure Build Path .在出现的窗口中找到出现红色X号的jar包,这个Jar文件就是路径不对的文件,将这个Jar文件Remove掉,并重新导入Jar文件即可。
2016-05-27 23:34:13 1011
原创 Exception in thread "main" org.hibernate.TransactionException: commit failed
Caused by: java.sql.SQLException: You can't operate on a closed Connection!!!
2016-05-27 19:25:07 2282
原创 Exception in thread "main" org.hibernate.HibernateException: No CurrentSessionContext configured!
Hibernate使用缓存查询时报错:Exception in thread "main" org.hibernate.HibernateException: No CurrentSessionContext configured! at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImp
2016-05-27 12:58:26 1001
转载 SQL、HQL中left join、right join、inner join的区别
SQL、HQL中left join、right join、inner join的区别
2016-05-19 22:00:36 5119
原创 Exception in thread "main" org.hibernate.QueryException: illegal attempt to dereference collection
Exception in thread "main" org.hibernate.QueryException: illegal attempt to dereference collection
2016-05-18 23:47:32 2160
原创 Exception in thread "main" org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token:
Exception in thread "main" org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: p near line 1, column 45 [select distinct p from com.mao.Person pjoin p.myEvent
2016-05-18 18:18:29 6127
原创 MySQL导入.sql文件以及#1146 - Table 'hibernate.person_email' doesn't exist
这里MySQL用的是XAMPP,1:直接找到相应的数据库--->导入--->选择文件--->文件的字符集--->执行--->OK2:选择你需要导入的文件--->通过记事本打开--->复制代码--->找到相应数据库--->点击SQL--->粘贴代码--->执行--->OK今天在学习李刚老师的《轻量级JavaEE企业应用实战》时,需要导入一个data.sql文件,我按照步骤
2016-05-18 13:14:33 4270
原创 Hibernate中的级联策略和object references an unsaved transient instance - save the transient instance before
本片博文整理关于Hibernate中级联策略cascade和它导致的异常:Exception in thread "main" org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: com.mao.Address
2016-05-11 21:59:34 19648 2
原创 Hibeinate: Could not determine type for: java.util.List, at table: address_inf, for columns: [org.hi
Hibernate中:Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: address_inf, for columns: [org.hibernate.mapping.Column(address_Detail)]导致原因:
2016-05-11 17:32:44 4717 1
原创 Hibernate中Caused by: java.sql.SQLException: Field 'address_id'doesn't have a default value
Hibernate中Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute statementCaused by: java.sql.SQLException: Field 'address_id' doesn't have a default value
2016-05-10 18:38:35 7016
原创 Hibernate Type mismatch: cannot convert from CascadeType to CascadeType[]
Hibernate Type mismatch: cannot convert from CascadeType to CascadeType[]improt 引用错误
2016-05-09 18:17:00 3467
原创 Exception in thread "main" org.hibernate.MappingException: Unknown entity: com.mao.PersonSet
Exception in thread "main" org.hibernate.MappingException: Unknown entity: XXX
2016-05-06 21:37:40 2168
原创 Exception in thread "main" org.hibernate.AnnotationException: List/array has to be annotated with an
Hibernate:Exception in thread "main" org.hibernate.AnnotationException: List/array has to be annotated with an @OrderColumn (or @IndexColumn): com.mao.PersonArray.school
2016-05-06 17:31:40 1057
原创 Exception in thread "main" org.hibernate.HibernateException: Access to DialectResolutionInfo cannot
Exception in thread "main" org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
2016-05-04 18:28:27 5518
原创 Exception in thread "main" org.hibernate.MappingException: invalid configuration
Exception in thread "main" org.hibernate.MappingException: invalid configurationCaused by: org.xml.sax.SAXParseException; lineNumber: 28; columnNumber: 23; 元素类型为 "session-factory" 的内容必须匹配 "(property*,mapping*,(class-cache|collection-cache)*,event*,listene
2016-05-04 17:27:30 2881
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人