
异常处理
sdyy321
这个作者很懒,什么都没留下…
展开
-
项目Redeploy异常---Illegal access: this web application instance has been stopped already.
信息: Illegal access: this web application instance has been stopped already. Could not load java.net.BindException. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which原创 2010-10-30 10:10:00 · 11474 阅读 · 2 评论 -
org.hibernate.TransientObjectException: object references an unsaved transient instance
这主要是在ManyToOne级联操作时遇到,比如new了一个新对象,在未保存之前将它保存进了一个新new的对象(也即不是持久态)。解决办法是在保存或更新之前把这个对象查出来(这样就是一个持久态)。解决办法是将many-to-one的级联设为: cascade="save-update,persist"原创 2010-11-03 11:25:00 · 19395 阅读 · 0 评论 -
org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists:
<br />org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists:<br /> <br />解决办法:将<many-to-one>的not-found="ignore";<br /> <br />not-found:指定的外键引用的数据不存在时如何处理。ignore表示忽略,会将行数据不存在视为一个空(null)关联。except原创 2010-11-03 18:08:00 · 8530 阅读 · 0 评论