hibernate 碰到数据库的触发器的时候出错了,急呀,帮看看

fmdsaco 2006-07-17 03:31:42
我在HIBERNATE 里对一个表插入数据的时候,这个表有触发器的,又更改了其它表,因为这数据结构不能改,现在HIBERNA在插入的时候报错了 ERROR AbstractFlushingEventListener:277 - Could not synchronize database state with session
...全文
152 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
fmdsaco 2006-07-17
  • 打赏
  • 举报
回复
绝对JAVA挑战
fmdsaco 2006-07-17
  • 打赏
  • 举报
回复
楼上兄弟帮帮忙
fmdsaco 2006-07-17
  • 打赏
  • 举报
回复
15:23:37,688 WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: file:/G:/FMDBAT/ebcm_net/WEB-INF/classes/ehcache-failsafe.xml
ooooooo&&&&
15:23:41,985 WARN JDBCExceptionReporter:71 - SQL Error: 30002, SQLState: HY000
15:23:41,985 ERROR JDBCExceptionReporter:72 - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Parent does not exist in "menu_function". Cannot create child in "user_function".
15:23:41,985 ERROR AbstractFlushingEventListener:277 - Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not insert: [com.power.hibernate.FUser_function]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at com.power.publics.GetSession.SessionInsert(GetSession.java:44)
at com.power.publics.GetSession.main(GetSession.java:447)
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Parent does not exist in "menu_function". Cannot create child in "user_function".
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1853)
... 10 more
15:23:42,001 WARN JDBCExceptionReporter:48 - SQL Warning: 0, SQLState:
15:23:42,001 WARN JDBCExceptionReporter:49 - [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to det_java_jy
15:23:42,001 WARN JDBCExceptionReporter:48 - SQL Warning: 0, SQLState:
15:23:42,001 WARN JDBCExceptionReporter:49 - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]已将数据库上下文改为 'det_java_jy'。
15:23:42,001 WARN JDBCExceptionReporter:48 - SQL Warning: 0, SQLState:
15:23:42,001 WARN JDBCExceptionReporter:49 - [Microsoft][SQLServer 2000 Driver for JDBC]Language changed to 简体中文
15:23:42,001 WARN JDBCExceptionReporter:48 - SQL Warning: 0, SQLState:
15:23:42,001 WARN JDBCExceptionReporter:49 - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]已将语言设置改为 简体中文。
kingdoom 2006-07-17
  • 打赏
  • 举报
回复
错误信息不全,是不是你在什么地方把session关了

67,542

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧