Hibernate配置問題: could not execute query

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Hibernate: select notice0_.noticeId as noticeId2_, notice0_.noticeTitle as noticeTi2_2_, notice0_.noticeContent as noticeCo3_2_, notice0_.noticeDate as noticeDate2_, notice0_.endDate as endDate2_, notice0_.aempId as aempId2_, notice0_.deptId as deptId2_, notice0_.remark as remark2_ from rock.notice notice0_


Exception in thread "main" org.hibernate.exception.DataException: could not execute query
 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
 at org.hibernate.loader.Loader.doList(Loader.java:2148)
 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
 at org.hibernate.loader.Loader.list(Loader.java:2024)
 at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
 at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
 at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
 at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
 at test.Test.get(Test.java:17)
 at test.Test.main(Test.java:23)


Caused by: java.sql.SQLException: The value supplied cannot be converted to INTEGER.
 at net.sourceforge.jtds.jdbc.Support.convert(Support.java:570)
 at net.sourceforge.jtds.jdbc.JtdsResultSet.getInt(JtdsResultSet.java:657)
 at net.sourceforge.jtds.jdbc.JtdsResultSet.getInt(JtdsResultSet.java:980)
 at org.hibernate.type.IntegerType.get(IntegerType.java:28)
 at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
 at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
 at org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:95)
 at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:1899)
 at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1372)
 at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1300)
 at org.hibernate.loader.Loader.getRow(Loader.java:1197)
 at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:569)
 at org.hibernate.loader.Loader.doQuery(Loader.java:689)
 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
 at org.hibernate.loader.Loader.doList(Loader.java:2145)
 ... 9 more

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值