初学hibernate的问题,高手进来看看,急急

sally0156 2005-03-03 04:20:17
数据库是IBM的AS400, 我试了一天了,怎么着都不行,老出下面的错误,急死了
打印出来的SQL是insert into table(col1,col2..) values(?,?..)
这是怎么回事??

Hibernate: insert into cd69 (CCB532, AAB004, CCD664, CCD665, CCD666, CCD667, CCD668, CCD669, CCD670, CCD671, AAC003, CCD672, AAE015, CCD673, AAC004, CCD674, AAC017, CCD675, CCD676, CCD677, CCD678, CCD679, CCD680, CCD501, AAE011, AAE017, CCD500) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

2005-03-03 16:20:24 [net.sf.hibernate.impl.BatcherImpl]-[DEBUG] preparing statement

2005-03-03 16:20:25 [net.sf.hibernate.persister.EntityPersister]-[DEBUG] Dehydrating entity: [com.mcm.introjob.taking.Cd69#com.mcm.introjob.taking.Cd69PK@3f4a21[aae017=SZS,ccd500=22]]

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 1

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding 'fdsfds' to parameter: 2

2005-03-03 16:20:25 [net.sf.hibernate.type.IntegerType]-[DEBUG] binding '0' to parameter: 3

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 4

2005-03-03 16:20:25 [net.sf.hibernate.type.DateType]-[DEBUG] binding '14 三月 2005' to parameter: 5

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 6

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 7

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 8

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 9

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '1' to parameter: 10

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 11

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 12

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 13

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 14

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '1' to parameter: 15

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '1' to parameter: 16

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '1' to parameter: 17

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 18

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 19

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 20

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '1' to parameter: 21

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '1' to parameter: 22

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '1' to parameter: 23

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '0' to parameter: 24

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding '' to parameter: 25

2005-03-03 16:20:25 [net.sf.hibernate.type.StringType]-[DEBUG] binding 'SZS' to parameter: 26

2005-03-03 16:20:25 [net.sf.hibernate.type.LongType]-[DEBUG] binding '22' to parameter: 27

2005-03-03 16:20:25 [net.sf.hibernate.impl.BatcherImpl]-[DEBUG] done closing: 0 open PreparedStatements, 0 open ResultSets

2005-03-03 16:20:25 [net.sf.hibernate.impl.BatcherImpl]-[DEBUG] closing statement

2005-03-03 16:20:25 [net.sf.hibernate.util.JDBCExceptionReporter]-[DEBUG] SQL Exception

java.sql.SQLException: [SQL7008] CD69 in LDZJLIB not valid for operation.

at com.ibm.as400.access.JDError.throwSQLException(JDError.java:367)

at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:616)

at com.ibm.as400.access.AS400JDBCPreparedStatement.executeUpdate(AS400JDBCPreparedStatement.java:948)

at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)

at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:468)

at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:439)

at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)

at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2414)

at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2367)

at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2236)

at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)

at com.mcm.introjob.taking.TrackImpl.create(TrackImpl.java:32)

at com.mcm.introjob.taking.web.TrackAction.execute(TrackAction.java:36)

at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at com.mcm.util.tools.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:119)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)

at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)

at java.lang.Thread.run(Thread.java:534)

2005-03-03 16:20:25 [net.sf.hibernate.util.JDBCExceptionReporter]-[WARN] SQL Error: -7008, SQLState: 55019
...全文
128 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
sally0156 2005-03-04
数据库设置没有问题啊
查询可以,就是增加不行
回复
programeyonger 2005-03-04
hibernate.cfg.xml文件里数据库的设置有没有问题啊?
回复
sally0156 2005-03-04
谢谢各位捧场,搞定了,散分,嘿嘿
回复
sally0156 2005-03-03
不知道是不是Dialect用错了
我用的是DB2400Dialect这个

增加不行,查询什么的都可以,真是奇了怪了
回复
j_shock 2005-03-03
java.sql.SQLException: [SQL7008] CD69 in LDZJLIB not valid for operation.
看一下数据库的文档
回复
blackhost 2005-03-03
没用过这个数据库,猜测一下吧,好象这个表对这个表的操作是不合法的操作,你跟踪一下看看,到底在那里出的错误!最好能跟到hibernate里面看看!
回复
发帖
Java EE
创建于2007-09-28

6.6w+

社区成员

J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
申请成为版主
帖子事件
创建了帖子
2005-03-03 04:20
社区公告
暂无公告