梦开始的地方----

梦延续的港湾----

常用链接

统计

积分与排名

最新评论

2005年10月31日 #

hibernate修改出错,

在订单中ORDERS,把A部门为B部门,出现
identifier of an instance of com.kink.model.Department altered from 2 to 4; nested exception is org.hibernate.HibernateException: identifier of an instance of com.kink.model.Department altered from 2 to 4 ,是不是哪个地方没设置好,2是A部门原来的值,4是要修改成的值。

注:Orders表的字段为 id(PK),dept_id(FK),remark,
Order_item 表的字段为id,order_id(FK),item_no,qty,price,
Department 表的字段为id(PK),code,name,
出现以上操作错误是在对orders进行UPDATE时出现的,步骤是取出Orders 然后把订单中的A部门修改成B部门,就出现错误,而我却没有对Department表进行操作,不知道是怎么回事,请问有人知道原因吗

posted @ 2006-08-25 13:41 梦延续的港湾----依然是蓝 阅读(1300) | 评论 (2)编辑 收藏

征集hibernate错误答案

Q:identifier of an instance of com.lanhan.poos.vo.Ck was altered from 1 to 2; nested exception is org.hibernate.HibernateException: identifier of an instance of com.lanhan.poos.vo.Ck was altered from 1 to 2
Stack Trace is :

org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of com.lanhan.poos.vo.Ck was altered from 1 to 2; nested exception is org.hibernate.HibernateException: identifier of an instance of com.lanhan.poos.vo.Ck was altered from 1 to 2
Caused by: org.hibernate.HibernateException: identifier of an instance of com.lanhan.poos.vo.Ck was altered from 1 to 2
 at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:51)
 at org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:150)
 at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:106)
 at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195)
 at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
 at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
 at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
 at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:356)
 at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
 at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:580)
 at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:539)
 at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:509)
 at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:275)
 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
 at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:647)
 at com.lh.pos.dao.impl.BorrowDAOImpl$$EnhancerByCGLIB$$61171362.updateBorrow()
 at com.lh.pos.web.ck.BorrowController.update(BorrowController.java:152)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
 at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:162)
 at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:114)
 at com.lh.pos.web.ck.BorrowController.handleRequest(BorrowController.java:67)
 at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:728)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
 at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:151)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
 at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
 at java.lang.Thread.run(Unknown Source)

更新记录时出错以上错误,有知道问题的答案吗,很想搞清楚问题出在哪里

posted @ 2006-08-19 22:12 梦延续的港湾----依然是蓝 阅读(2027) | 评论 (6)编辑 收藏

Mysql 5.0的BUG

     摘要: mysql 5.0的BUG,当数据类型设计为decimal 时,在spring,hibernate项目运行会出现246错误.点击
这里查看详细  阅读全文

posted @ 2006-06-04 22:29 梦延续的港湾----依然是蓝 阅读(1219) | 评论 (1)编辑 收藏

weblogic 出现关闭的连接解决方法

     摘要: weblogic 出现关闭的连接解决方法,点击这里查看全文。  阅读全文

posted @ 2005-11-21 14:29 梦延续的港湾----依然是蓝 阅读(2478) | 评论 (4)编辑 收藏

weblogic 服务器在windows &linux自动关闭脚本

     摘要: weblogic 服务器在windows &linux自动关闭脚本,点击这里查看全文。  阅读全文

posted @ 2005-11-14 13:19 梦延续的港湾----依然是蓝 阅读(2096) | 评论 (0)编辑 收藏

jasperreport 实现同一个字段变色显示(即change field color)

jasperreport 实现同一个字段变色显示(即field change color),只需要设定两个相同的字段,然后print when expression处设定根据不同的条件显示不同颜色的字段,最后把两个字段重叠在一起就可以了,如果两个字段没有叠在一起是不会有显示的

posted @ 2005-11-11 12:07 梦延续的港湾----依然是蓝 阅读(645) | 评论 (1)编辑 收藏

Mysql5.0

1、Mysql 5.0的管理用户ROOT居然可以删除。当把所有用户删除之后就不能再登陆了,也不能重新配置了,会提示出错,需要把以前旧的数据库删掉再重装才行。(不知道以前的版本是不是也有这个问题,ROOT用户可以删除)

2、mysql 5.0安装时如果选择典型安装是不是改变mysql 的安装目录的,不过有个办法可以解决,先选择自定义安装,然后在下一部改变安装目录之后,再回到上一步选择典型安装就可以了。

3、其他功能暂时还没有时间试,不知道效果怎么样了。

4、mysql5.0下载地址http://dev.mysql.com/downloads/mysql/5.0.html

5、再续吧......


posted @ 2005-10-31 12:47 梦延续的港湾----依然是蓝 阅读(447) | 评论 (0)编辑 收藏