 |
上一主题
有一个新闻表T_NEWS中的DOCHITS字段设置为
create table t_news(
... ...
dochits number(9),
... ...
)
在java,采用j..
|
|
下一主题
BANQ老大,一个数据表中有500条记录,我需要一次全部检索读出来,为何只能读200条记录呢?
这个能数能在需要修改的时候屏蔽吗?
|
|
|
|
|
|
|
|
关于EJB3.0的一个捕捉异常的问题。
|
2006年09月01日 17:48
|
|
|
标签列表
|
|
最近在做一个项目,用到了EJB3,遇到一个问题,请教一下各位: 我现在的意图是为了达到更好的交互性需要捕捉到具体的信息,举个例子来说吧: 如果有外键关联在删除中就会出错,现在我要捕捉的就是那个外键KEY,但是在EJB3的EntityManager中却无法得得到那个ERROR,拿一个我的项目中测试的例子来看吧,如下面的信息: 17:24:02,140 WARN JDBCExceptionReporter SQL Error: 0, SQLState: null 17:24:02,140 ERROR JDBCExceptionReporter Batch entry 0 delete from T_CM_BASE_DICTTYPE where id=1 was aborted. Call getNextException to see the cause. 17:24:02,140 WARN JDBCExceptionReporter SQL Error: 0, SQLState: 23503 17:24:02,140 ERROR JDBCExceptionReporter ERROR: update or delete on "t_cm_base_dicttype" violates foreign key constraint "fk_t_cm_base_dictvalue_1" on "t_cm_base_dictvalue" 17:24:02,140 ERROR AbstractFlushingEventListener Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
我现在只能得到 org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update 但是我相得到 update or delete on "t_cm_base_dicttype" violates foreign key constraint "fk_t_cm_base_dictvalue_1" on "t_cm_base_dictvalue"
本来在如果是在JDBC中执行SQL语句的话肯定可以捕捉得到的,但是在EJB3的EntityManager中却怎么也得不到 搞了我一天也没办法,不知道哪位大虾能帮下忙呀!!!!!
|
|
|
|
|
|
Re: 关于EJB3.0的一个捕捉异常的问题。
|
2006年09月05日 10:05
|
|
|
|
这就涉及容器的透明性,我们需要更透明可由我们定制的框架。
|
|
|
|
热点TAG:
AOP
cache
缓存
DDD
EJB
集群
设计模式
Hibernate
IOC
JiveJdon
OO
RBAC
Seam
Spring
Struts
anti spam
|