6 Replies Latest reply on Aug 26, 2008 12:15 PM by zhu zhu

    SOS

    zhu zhu Newbie

      hi all, i've got a big problem ,is there any one can help me out of this puzzle ,thanks very much . i have got an exception as the following :

      21:50:34,989 INFO [STDOUT] Hibernate:
       select
       organizati0_.id as id326_,
       organizati0_.dataInfo as dataInfo326_,
       organizati0_.address as address326_,
       organizati0_.code as code326_,
       organizati0_.unitName as unitName326_,
       organizati0_.memo as memo326_,
       organizati0_.tel as tel326_,
       organizati0_.serialNum as serialNum326_,
       organizati0_.contact as contact326_,
       organizati0_.postalCode as postalCode326_,
       organizati0_.fax as fax326_,
       organizati0_.email as email326_,
       organizati0_.parent_id as parent13_326_
       from
       cattle.BAS_ORGANIZATION organizati0_
       where
       organizati0_.id=?
       order by
       organizati0_.id desc
      21:50:35,016 INFO [STDOUT] Hibernate:
       select
       organizati0_.id as id326_1_,
       organizati0_.dataInfo as dataInfo326_1_,
       organizati0_.address as address326_1_,
       organizati0_.code as code326_1_,
       organizati0_.unitName as unitName326_1_,
       organizati0_.memo as memo326_1_,
       organizati0_.tel as tel326_1_,
       organizati0_.serialNum as serialNum326_1_,
       organizati0_.contact as contact326_1_,
       organizati0_.postalCode as postalCode326_1_,
       organizati0_.fax as fax326_1_,
       organizati0_.email as email326_1_,
       organizati0_.parent_id as parent13_326_1_,
       sonorgs1_.parent_id as parent13_3_,
       sonorgs1_.id as id3_,
       sonorgs1_.id as id326_0_,
       sonorgs1_.dataInfo as dataInfo326_0_,
       sonorgs1_.address as address326_0_,
       sonorgs1_.code as code326_0_,
       sonorgs1_.unitName as unitName326_0_,
       sonorgs1_.memo as memo326_0_,
       sonorgs1_.tel as tel326_0_,
       sonorgs1_.serialNum as serialNum326_0_,
       sonorgs1_.contact as contact326_0_,
       sonorgs1_.postalCode as postalCode326_0_,
       sonorgs1_.fax as fax326_0_,
       sonorgs1_.email as email326_0_,
       sonorgs1_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION organizati0_
       left outer join
       cattle.BAS_ORGANIZATION sonorgs1_
       on organizati0_.id=sonorgs1_.parent_id
       where
       organizati0_.id=?
      21:50:35,061 INFO [STDOUT] Hibernate:
       select
       organizati0_.id as id326_1_,
       organizati0_.dataInfo as dataInfo326_1_,
       organizati0_.address as address326_1_,
       organizati0_.code as code326_1_,
       organizati0_.unitName as unitName326_1_,
       organizati0_.memo as memo326_1_,
       organizati0_.tel as tel326_1_,
       organizati0_.serialNum as serialNum326_1_,
       organizati0_.contact as contact326_1_,
       organizati0_.postalCode as postalCode326_1_,
       organizati0_.fax as fax326_1_,
       organizati0_.email as email326_1_,
       organizati0_.parent_id as parent13_326_1_,
       sonorgs1_.parent_id as parent13_3_,
       sonorgs1_.id as id3_,
       sonorgs1_.id as id326_0_,
       sonorgs1_.dataInfo as dataInfo326_0_,
       sonorgs1_.address as address326_0_,
       sonorgs1_.code as code326_0_,
       sonorgs1_.unitName as unitName326_0_,
       sonorgs1_.memo as memo326_0_,
       sonorgs1_.tel as tel326_0_,
       sonorgs1_.serialNum as serialNum326_0_,
       sonorgs1_.contact as contact326_0_,
       sonorgs1_.postalCode as postalCode326_0_,
       sonorgs1_.fax as fax326_0_,
       sonorgs1_.email as email326_0_,
       sonorgs1_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION organizati0_
       left outer join
       cattle.BAS_ORGANIZATION sonorgs1_
       on organizati0_.id=sonorgs1_.parent_id
       where
       organizati0_.id=?
      21:50:35,087 INFO [STDOUT] Hibernate:
       select
       organizati0_.id as id326_1_,
       organizati0_.dataInfo as dataInfo326_1_,
       organizati0_.address as address326_1_,
       organizati0_.code as code326_1_,
       organizati0_.unitName as unitName326_1_,
       organizati0_.memo as memo326_1_,
       organizati0_.tel as tel326_1_,
       organizati0_.serialNum as serialNum326_1_,
       organizati0_.contact as contact326_1_,
       organizati0_.postalCode as postalCode326_1_,
       organizati0_.fax as fax326_1_,
       organizati0_.email as email326_1_,
       organizati0_.parent_id as parent13_326_1_,
       sonorgs1_.parent_id as parent13_3_,
       sonorgs1_.id as id3_,
       sonorgs1_.id as id326_0_,
       sonorgs1_.dataInfo as dataInfo326_0_,
       sonorgs1_.address as address326_0_,
       sonorgs1_.code as code326_0_,
       sonorgs1_.unitName as unitName326_0_,
       sonorgs1_.memo as memo326_0_,
       sonorgs1_.tel as tel326_0_,
       sonorgs1_.serialNum as serialNum326_0_,
       sonorgs1_.contact as contact326_0_,
       sonorgs1_.postalCode as postalCode326_0_,
       sonorgs1_.fax as fax326_0_,
       sonorgs1_.email as email326_0_,
       sonorgs1_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION organizati0_
       left outer join
       cattle.BAS_ORGANIZATION sonorgs1_
       on organizati0_.id=sonorgs1_.parent_id
       where
       organizati0_.id=?
      21:50:35,157 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,174 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,187 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,200 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,215 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,230 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,244 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,255 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,266 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,277 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,289 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,300 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,313 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,323 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,336 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,349 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,363 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,373 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,384 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,394 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,408 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,420 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,432 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,444 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,454 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,467 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,478 INFO [STDOUT] Hibernate:
       select
       sonorgs0_.parent_id as parent13_1_,
       sonorgs0_.id as id1_,
       sonorgs0_.id as id326_0_,
       sonorgs0_.dataInfo as dataInfo326_0_,
       sonorgs0_.address as address326_0_,
       sonorgs0_.code as code326_0_,
       sonorgs0_.unitName as unitName326_0_,
       sonorgs0_.memo as memo326_0_,
       sonorgs0_.tel as tel326_0_,
       sonorgs0_.serialNum as serialNum326_0_,
       sonorgs0_.contact as contact326_0_,
       sonorgs0_.postalCode as postalCode326_0_,
       sonorgs0_.fax as fax326_0_,
       sonorgs0_.email as email326_0_,
       sonorgs0_.parent_id as parent13_326_0_
       from
       cattle.BAS_ORGANIZATION sonorgs0_
       where
       sonorgs0_.parent_id=?
      21:50:35,496 INFO [STDOUT] Hibernate:
       select
       organizati0_.id as id326_,
       organizati0_.dataInfo as dataInfo326_,
       organizati0_.address as address326_,
       organizati0_.code as code326_,
       organizati0_.unitName as unitName326_,
       organizati0_.memo as memo326_,
       organizati0_.tel as tel326_,
       organizati0_.serialNum as serialNum326_,
       organizati0_.contact as contact326_,
       organizati0_.postalCode as postalCode326_,
       organizati0_.fax as fax326_,
       organizati0_.email as email326_,
       organizati0_.parent_id as parent13_326_
       from
       cattle.BAS_ORGANIZATION organizati0_
       where
       organizati0_.id=?
       order by
       organizati0_.id desc
      21:50:35,516 INFO [STDOUT] Hibernate:
       select
       organizati0_.id as id326_,
       organizati0_.dataInfo as dataInfo326_,
       organizati0_.address as address326_,
       organizati0_.code as code326_,
       organizati0_.unitName as unitName326_,
       organizati0_.memo as memo326_,
       organizati0_.tel as tel326_,
       organizati0_.serialNum as serialNum326_,
       organizati0_.contact as contact326_,
       organizati0_.postalCode as postalCode326_,
       organizati0_.fax as fax326_,
       organizati0_.email as email326_,
       organizati0_.parent_id as parent13_326_
       from
       cattle.BAS_ORGANIZATION organizati0_
       where
       organizati0_.id=?
       order by
       organizati0_.id desc
      21:50:35,528 INFO [STDOUT] Hibernate:
       select
       cattleunit0_.organization_id as organiz48_1_,
       cattleunit0_.id as id1_,
       cattleunit0_.id as id316_0_,
       cattleunit0_.dataInfo as dataInfo316_0_,
       cattleunit0_.owner as owner316_0_,
       cattleunit0_.cattleEarring as cattleEa4_316_0_,
       cattleunit0_.unityNum as unityNum316_0_,
       cattleunit0_.highQualitySeedRegisteredNo as highQual6_316_0_,
       cattleunit0_.memo as memo316_0_,
       cattleunit0_.birthPlace as birthPlace316_0_,
       cattleunit0_.birthDay as birthDay316_0_,
       cattleunit0_.birthWeight as birthWe10_316_0_,
       cattleunit0_.weanedWeight as weanedW11_316_0_,
       cattleunit0_.livingState as livingS12_316_0_,
       cattleunit0_.cattle_father as cattle13_316_0_,
       cattleunit0_.cattle_fatherBreed as cattle14_316_0_,
       cattleunit0_.cattle_fatherBirthWeight as cattle15_316_0_,
       cattleunit0_.cattle_fatherWeanedWeight as cattle16_316_0_,
       cattleunit0_.cattle_mother as cattle17_316_0_,
       cattleunit0_.cattle_motherBreed as cattle18_316_0_,
       cattleunit0_.cattle_motherBirthWeight as cattle19_316_0_,
       cattleunit0_.cattle_motherWeanedWeight as cattle20_316_0_,
       cattleunit0_.cattle_grandFather as cattle21_316_0_,
       cattleunit0_.cattle_grandFatherBreed as cattle22_316_0_,
       cattleunit0_.cattle_grandMother as cattle23_316_0_,
       cattleunit0_.cattle_grandMotherBreed as cattle24_316_0_,
       cattleunit0_.cattle_grandPa as cattle25_316_0_,
       cattleunit0_.cattle_grandPaBreed as cattle26_316_0_,
       cattleunit0_.cattle_grandMa as cattle27_316_0_,
       cattleunit0_.cattle_grandMaBreed as cattle28_316_0_,
       cattleunit0_.pic as pic316_0_,
       cattleunit0_.sex as sex316_0_,
       cattleunit0_.furColor as furColor316_0_,
       cattleunit0_.whereFrom as whereFrom316_0_,
       cattleunit0_.keepInDate as keepInDate316_0_,
       cattleunit0_.breed as breed316_0_,
       cattleunit0_.birthOrder as birthOrder316_0_,
       cattleunit0_.weanedDate as weanedDate316_0_,
       cattleunit0_.currentBirthOrder as current37_316_0_,
       cattleunit0_.groupState as groupState316_0_,
       cattleunit0_.multiplyState as multipl39_316_0_,
       cattleunit0_.firstBreedingTime as firstBr40_316_0_,
       cattleunit0_.firstRut as firstRut316_0_,
       cattleunit0_.latestPregnantDate as latestP42_316_0_,
       cattleunit0_.latestChildBirthDate as latestC43_316_0_,
       cattleunit0_.latestImmunityDate as latestI44_316_0_,
       cattleunit0_.latestQuarantineDate as latestQ45_316_0_,
       cattleunit0_.registerDate as registe46_316_0_,
       cattleunit0_.registrant as registrant316_0_,
       cattleunit0_.organization_id as organiz48_316_0_
       from
       cattle.CATTLE_UNITY cattleunit0_
       where
       cattleunit0_.organization_id=?
      21:50:35,589 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@cac885
      javax.persistence.EntityNotFoundException: deleted entity passed to persist: [jpa.entity.cattle.OrganizationEO#<null>]
       at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:613)
       at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:524)
       at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
       at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:81)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
       at $Proxy212.deleteObj(Unknown Source)
       at com.fstech.cattle.action.basis.MaintOrgsAction.exec(MaintOrgsAction.java:181)
       at com.fstech.cattle.action.mgr.AuthAction.execute(AuthAction.java:263)
       at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
       at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
       at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
       at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
       at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
       at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
       at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at com.fstech.cattle.framework.security.AuthorizationFilter.doFilter(AuthorizationFilter.java:38)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      21:50:35,724 WARN [AbstractExceptionHandler] Unhandled exception
      java.lang.RuntimeException: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transactio
      aborted state
       at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
       at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:81)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
       at $Proxy212.deleteObj(Unknown Source)
       at com.fstech.cattle.action.basis.MaintOrgsAction.exec(MaintOrgsAction.java:181)
       at com.fstech.cattle.action.mgr.AuthAction.execute(AuthAction.java:263)
       at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
       at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
       at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
       at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
       at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
       at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
       at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at com.fstech.cattle.framework.security.AuthorizationFilter.doFilter(AuthorizationFilter.java:38)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted s
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
       ... 54 more
      Caused by: javax.persistence.EntityNotFoundException: deleted entity passed to persist: [jpa.entity.cattle.OrganizationEO#<null>]
       at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:613)
       at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:524)
       at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
       at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
       ... 57 more
      21:50:35,879 WARN [ExceptionCatcher] Exception from exceptionCommand 'servlet-exception'
      java.lang.RuntimeException: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transactio
      aborted state
       at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
       at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:81)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
       at $Proxy212.deleteObj(Unknown Source)
       at com.fstech.cattle.action.basis.MaintOrgsAction.exec(MaintOrgsAction.java:181)
       at com.fstech.cattle.action.mgr.AuthAction.execute(AuthAction.java:263)
       at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
       at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
       at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
       at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
       at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
       at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
       at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at com.fstech.cattle.framework.security.AuthorizationFilter.doFilter(AuthorizationFilter.java:38)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted s
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
       ... 54 more
      Caused by: javax.persistence.EntityNotFoundException: deleted entity passed to persist: [jpa.entity.cattle.OrganizationEO#<null>]
       at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:613)
       at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:524)
       at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
       at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
       ... 57 more
      21:50:36,054 ERROR [[action]] Servlet.service() for servlet action threw exception
      javax.persistence.EntityNotFoundException: deleted entity passed to persist: [jpa.entity.cattle.OrganizationEO#<null>]
       at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:613)
       at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:524)
       at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
       at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:81)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
       at $Proxy212.deleteObj(Unknown Source)
       at com.fstech.cattle.action.basis.MaintOrgsAction.exec(MaintOrgsAction.java:181)
       at com.fstech.cattle.action.mgr.AuthAction.execute(AuthAction.java:263)
       at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
       at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
       at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
       at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
       at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
       at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
       at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at com.fstech.cattle.framework.security.AuthorizationFilter.doFilter(AuthorizationFilter.java:38)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      


        • 1. Re: SOS
          zhu zhu Newbie

          please see the following code :
          OrganizationEO

          package jpa.entity.cattle;
          
          import java.io.Serializable;
          import java.lang.reflect.InvocationTargetException;
          import java.util.List;
          
          import javax.persistence.CascadeType;
          import javax.persistence.Column;
          import javax.persistence.Entity;
          import javax.persistence.FetchType;
          import javax.persistence.GeneratedValue;
          import javax.persistence.GenerationType;
          import javax.persistence.Id;
          import javax.persistence.JoinColumn;
          import javax.persistence.ManyToOne;
          import javax.persistence.OneToMany;
          import javax.persistence.Table;
          import javax.persistence.Transient;
          
          import org.apache.commons.beanutils.BeanUtils;
          
          
          /**
           * 标准组织结构表.
           *
           * @author howard.zhu
           *
           */
          @Entity
          @Table(name="BAS_ORGANIZATION")
          public class OrganizationEO extends SmallToad implements Serializable {
          
           private static final long serialVersionUID = 8137282822392486399L;
          
          
           private int id;
           /**
           * 对应的上级机构的ID.
           * 当本身就属于最高级时,其parentId 值为null.
           */
           private OrganizationEO parentObj;
          // private Integer parentId;
           /**
           * 本级机构�.
           */
           private String unitName;
           /**
           * 本级机构的区域编�.
           * 诸如'��自治区'的区域编�就是'N'.
           * 所有属于'��自治区'的市,县�得以'N'开头,其�跟自身的编��.
           * 该值唯一.
           *
           */
           private String code;
           /**
           * ��.
           */
           private String serialNum;
           /**
           * �系人.
           */
           private String contact;
           /**
           * �系电�.
           */
           private String tel;
           /**
           * 邮政编�.
           */
           private String postalCode;
           /**
           * �系地�.
           */
           private String address;
           /**
           * 传真.
           */
           private String fax;
           /**
           * 电å�邮箱.
           */
           private String email;
           /**
           * 备注
           */
           private String memo;
          
           /**
           * 该组织的直接下属机构.
           */
           private List<OrganizationEO> sonOrgs;
          
           /**
           * 其下挂载的所有的牛的信�.
           */
           private List<CattleUnityEO> cattleUnities;
          
          
           /**
           * @return the id
           */
           @Id
           @GeneratedValue(strategy=GenerationType.AUTO)
           public int getId() {
           return id;
           }
          
           /**
           * @return the parentId
           */
          // public int getParentId() {
          // return parentId;
          // }
          
          
           /**
           * @return the code
           */
           @Column(nullable=false,unique=true)
           public String getCode() {
           return code;
           }
          
           /**
           * @return the contact
           */
           public String getContact() {
           return contact;
           }
          
           /**
           * @return the tel
           */
           public String getTel() {
           return tel;
           }
          
           /**
           * @return the postalCode
           */
           public String getPostalCode() {
           return postalCode;
           }
          
           /**
           * @return the address
           */
           public String getAddress() {
           return address;
           }
          
           /**
           * @return the fax
           */
           public String getFax() {
           return fax;
           }
          
           /**
           * @return the email
           */
           public String getEmail() {
           return email;
           }
          
           /**
           * @return the memo
           */
           public String getMemo() {
           return memo;
           }
          
          
          
          
           /**
           * @return the unitName
           */
           @Column(nullable=false,length=32)
           public String getUnitName() {
           return unitName;
           }
          
          
          
           /**
           * @return the sonOrgs
           */
           @OneToMany(cascade={CascadeType.ALL},mappedBy="parentObj",fetch=FetchType.EAGER)
           public List<OrganizationEO> getSonOrgs() {
           return sonOrgs;
           }
          
          
          
          
           /**
           * @return the parentObj
           */
           @ManyToOne
           @JoinColumn(name = "parent_id")
           public OrganizationEO getParentObj() {
           return parentObj;
           }
          
          
          
           /**
           * @return the cattleUnities
           */
           @OneToMany(cascade={CascadeType.ALL},fetch=FetchType.LAZY,mappedBy="organization")
           public List<CattleUnityEO> getCattleUnities() {
           return cattleUnities;
           }
          
          
           @Column(nullable=false)
           public String getSerialNum() {
           return serialNum;
           }
          
           public void setSerialNum(String serialNum) {
           this.serialNum = serialNum;
           }
          
           /**
           * @param cattleUnities the cattleUnities to set
           */
           public void setCattleUnities(List<CattleUnityEO> cattleUnities) {
           this.cattleUnities = cattleUnities;
           }
          
           /**
           * @param parentObj the parentObj to set
           */
           public void setParentObj(OrganizationEO parentObj) {
           this.parentObj = parentObj;
           }
          
           /**
           * @param sonOrgs the sonOrgs to set
           */
           public void setSonOrgs(List<OrganizationEO> sonOrgs) {
           this.sonOrgs = sonOrgs;
           }
          
           /**
           * @param unitName the unitName to set
           */
           public void setUnitName(String unitName) {
           this.unitName = unitName;
           }
          
           /**
           * @param id
           * the id to set
           */
           public void setId(int id) {
           this.id = id;
           }
          
           /**
           * @param parentId
           * the parentId to set
           */
          // public void setParentId(int parentId) {
          // this.parentId = parentId;
          // }
          
           /**
           * @param code
           * the code to set
           */
           public void setCode(String code) {
           this.code = code;
           }
          
           /**
           * @param contact
           * the contact to set
           */
           public void setContact(String contact) {
           this.contact = contact;
           }
          
           /**
           * @param tel
           * the tel to set
           */
           public void setTel(String tel) {
           this.tel = tel;
           }
          
           /**
           * @param postalCode
           * the postalCode to set
           */
           public void setPostalCode(String postalCode) {
           this.postalCode = postalCode;
           }
          
           /**
           * @param address
           * the address to set
           */
           public void setAddress(String address) {
           this.address = address;
           }
          
           /**
           * @param fax
           * the fax to set
           */
           public void setFax(String fax) {
           this.fax = fax;
           }
          
           /**
           * @param email
           * the email to set
           */
           public void setEmail(String email) {
           this.email = email;
           }
          
           /**
           * @param memo
           * the memo to set
           */
           public void setMemo(String memo) {
           this.memo = memo;
           }
          
           /**
           * @param parentId the parentId to set
           */
          // public void setParentId(Integer parentId) {
          // this.parentId = parentId;
          // }
          
          
          
          
          
           /* (non-Javadoc)
           * @see java.lang.Object#hashCode()
           */
           @Override
           public int hashCode() {
           final int prime = 31;
           int result = 1;
           result = prime * result + ((code == null) ? 0 : code.hashCode());
           result = prime * result + ((address == null) ? 0 : address.hashCode());
           result = prime * result + ((contact == null) ? 0 : contact.hashCode());
           result = prime * result + ((email == null) ? 0 : email.hashCode());
           result = prime * result + ((fax == null) ? 0 : fax.hashCode());
           result = prime * result + id;
           result = prime * result + ((memo == null) ? 0 : memo.hashCode());
          // result = prime * result
          // + ((parentId == null) ? 0 : parentId.hashCode());
           result = prime * result
           + ((postalCode == null) ? 0 : postalCode.hashCode());
           result = prime * result + ((tel == null) ? 0 : tel.hashCode());
           result = prime * result
           + ((unitName == null) ? 0 : unitName.hashCode());
           return result;
           }
          
           /* (non-Javadoc)
           * @see java.lang.Object#equals(java.lang.Object)
           */
           @Override
           public boolean equals(Object obj) {
           if (this == obj)
           return true;
           if (obj == null)
           return false;
           if (!(obj instanceof OrganizationEO))
           return false;
           OrganizationEO other = (OrganizationEO) obj;
           if (code == null) {
           if (other.code != null)
           return false;
           } else if (!code.equals(other.code))
           return false;
           if (address == null) {
           if (other.address != null)
           return false;
           } else if (!address.equals(other.address))
           return false;
           if (contact == null) {
           if (other.contact != null)
           return false;
           } else if (!contact.equals(other.contact))
           return false;
           if (email == null) {
           if (other.email != null)
           return false;
           } else if (!email.equals(other.email))
           return false;
           if (fax == null) {
           if (other.fax != null)
           return false;
           } else if (!fax.equals(other.fax))
           return false;
           if (id != other.id)
           return false;
           if (memo == null) {
           if (other.memo != null)
           return false;
           } else if (!memo.equals(other.memo))
           return false;
          // if (parentId == null) {
          // if (other.parentId != null)
          // return false;
          // } else if (!parentId.equals(other.parentId))
          // return false;
           if (postalCode == null) {
           if (other.postalCode != null)
           return false;
           } else if (!postalCode.equals(other.postalCode))
           return false;
           if (tel == null) {
           if (other.tel != null)
           return false;
           } else if (!tel.equals(other.tel))
           return false;
           if (unitName == null) {
           if (other.unitName != null)
           return false;
           } else if (!unitName.equals(other.unitName))
           return false;
           return true;
           }
          
           @Transient
           @Override
           public boolean checkInsertable() {
           if(null == this.getUnitName() ||("".equals(this.getUnitName().trim())))
           {
           return false;
           }
           if(null == this.getCode() ||("".equals(this.getCode().trim())))
           {
           return false;
           }
           if(null == this.getSerialNum() ||("".equals(this.getSerialNum().trim())))
           {
           return false;
           }
          
           return true;
           }
          
           @Transient
           @Override
           public boolean checkupdateble()
           {
           if(this.getId() < 0)
           {
           return false;
           }
           if(null == this.getUnitName() ||("".equals(this.getUnitName().trim())))
           {
           return false;
           }
           if(null == this.getCode() ||("".equals(this.getCode().trim())))
           {
           return false;
           }
           if(null == this.getSerialNum() ||("".equals(this.getSerialNum().trim())))
           {
           return false;
           }
          
           return true;
           }
          
           @Transient
           @Override
           public boolean checkdeleted(){
           if((id <= 0))
           {
           return false;
           }
           return true;
           }
          
          
           @Transient
           @Override
           public int getIdAfterInsert()
           {
           return this.getId();
           }
          
           @Transient
           @Override
           public <T extends SmallToad> void copy(T t)
           {
           if(t instanceof OrganizationEO)
           {
           OrganizationEO oo = (OrganizationEO)t;
           try {
           BeanUtils.copyProperties(this,oo);
           } catch (IllegalAccessException e) {
           e.printStackTrace();
           } catch (InvocationTargetException e) {
           e.printStackTrace();
           }
           }
           }
          
          }
          
          


          • 2. Re: SOS
            zhu zhu Newbie

            SmallToad:

            package jpa.entity.cattle;
            
            import javax.persistence.Column;
            import javax.persistence.EnumType;
            import javax.persistence.Enumerated;
            import javax.persistence.MappedSuperclass;
            import javax.persistence.PrePersist;
            import javax.persistence.PreRemove;
            import javax.persistence.PreUpdate;
            import javax.persistence.Transient;
            
            import jpa.common.client.DataInfo;
            import jpa.exp.client.InvalidObjException;
            
            /**
             * 用于定义一些特殊的共用的属性.
             * @author howard.zhu
             *
             */
            @MappedSuperclass
            public class SmallToad extends SuperToad {
            
             private static final long serialVersionUID = -8753479989758787365L;
            
             /**
             * 标记数�是�是基本数�
             */
             private DataInfo dataInfo = DataInfo.EXTEND;
            
             @Enumerated(value=EnumType.STRING)
             @Column(nullable=false,unique=false,updatable=true)
             public DataInfo getDataInfo() {
             return dataInfo;
             }
            
             public void setDataInfo(DataInfo dataInfo) {
             this.dataInfo = dataInfo;
             }
            
            
             //回调方法,由�久化�供者调用,�EJB容器调用
             @PrePersist
             public void prePersist()
             {
             if(!checkInsertable())
             {
             //FIXME �供的异常信�比较原始
             throw new InvalidObjException("Invalid Object ,check it!");
             }
             }
            
            
             @PreUpdate
             public void preUpdate()
             {
             if(!checkupdateble())
             {
             //FIXME �供的异常信�比较原始
             throw new InvalidObjException("Invalid Object ,check it!");
             }
             }
            
             @PreRemove
             public void preRemove()
             {
             if(!checkupdateble())
             {
             //FIXME �供的异常信�比较原始
             throw new InvalidObjException("Invalid Object ,check it!");
             }
             }
            
             /*
             * @Overrideæ ‡ç¾ä¸�能把父类的方法ä¸çš„@Transient属性传递给å�类,所以在å�ç±»ä¸ä»�然需è¦�定义该方法为@Transientæ‰�å�¯ä»¥.
             */
            
             @Transient
             @Override
             public boolean checkInsertable() {
             // to be override
             return false;
             }
             @Transient
             @Override
             public boolean checkdeleted() {
             // to be override
             return false;
             }
             @Transient
             @Override
             public boolean checkupdateble() {
             // to be override
             return false;
             }
             @Transient
             @Override
             public <T extends SmallToad> void copy(T t) {
             // to be override
            
             }
             @Transient
             @Override
             public int getIdAfterInsert() {
             // to be override
             return 0;
             }
            
            
            
            }
            
            


            • 3. Re: SOS
              zhu zhu Newbie

              ROrganizationService:

              package jpa.service.remote.cattle.impl;
              
              import java.util.ArrayList;
              import java.util.List;
              
              import javax.ejb.EJB;
              import javax.ejb.Local;
              import javax.ejb.Remote;
              import javax.ejb.Stateless;
              import javax.ejb.TransactionAttribute;
              import javax.ejb.TransactionAttributeType;
              import javax.persistence.EntityManager;
              import javax.persistence.PersistenceContext;
              
              import org.apache.log4j.Logger;
              import org.jboss.annotation.ejb.LocalBinding;
              import org.jboss.annotation.ejb.RemoteBinding;
              
              import jpa.common.CommonDBAction;
              import jpa.entity.cattle.OrganizationEO;
              import jpa.exp.client.DuplicateObjExp;
              import jpa.service.local.cattle.ILOrganizationService;
              import jpa.service.remote.cattle.IROrganizationService;
              
              @Remote(value = IROrganizationService.class)
              @RemoteBinding(jndiBinding = "ROrganizationService/remote")
              @Local(value = ILOrganizationService.class)
              @LocalBinding(jndiBinding = "LOrganizationService/local")
              @Stateless
              public class ROrganizationService implements IROrganizationService,
               ILOrganizationService {
              
              
               @PersistenceContext(unitName = "cattle_ora_jpa")
               private EntityManager em;
              
               //日志记录
               private static Logger logger = Logger.getLogger(ROrganizationService.class);
              
               public int deleteObj(int id) {
               return CommonDBAction.deleteObjById(id, em, queryByID(id));
               }
              
               public List<OrganizationEO> queryAll() {
               return CommonDBAction.queryAllObjs("organizationeo_queryall", em, OrganizationEO.class);
               }
              
               //@TransactionAttribute(value = TransactionAttributeType.REQUIRES_NEW)
               public OrganizationEO queryByID(int id) {
               return CommonDBAction.queryByID(id, em, "organizationeo_querybyid", "id", OrganizationEO.class);
               }
              
               public OrganizationEO queryByName(String name) {
               return CommonDBAction.queryByName(name, em, "organizationeo_querybyname", "name",OrganizationEO.class);
               }
              
               public int storeObj(OrganizationEO eo) {
               List<OrganizationEO> mayMultyObjs = new ArrayList<OrganizationEO>();
               if(null != eo)
               {
               mayMultyObjs.add(this.queryByName(eo.getUnitName()));
               }
               return CommonDBAction.storeObj(eo, em,mayMultyObjs);
               }
              
               public OrganizationEO updateObj(OrganizationEO eo)
               throws DuplicateObjExp {
               List<OrganizationEO> mayMultyObjs = new ArrayList<OrganizationEO>();
               if(null != eo)
               {
               mayMultyObjs.add(this.queryByName(eo.getUnitName()));
               }
               return CommonDBAction.updateObj(eo, em, mayMultyObjs, this.queryByID(eo.getId()));
               }
              }
              
              


              • 4. Re: SOS
                zhu zhu Newbie

                CommonDBAction:

                package jpa.common;
                
                import java.util.List;
                
                import javax.ejb.TransactionAttribute;
                import javax.ejb.TransactionAttributeType;
                import javax.persistence.EntityManager;
                import javax.persistence.FlushModeType;
                import javax.persistence.Query;
                
                
                import jpa.common.client.CommonUtil;
                import jpa.common.client.DataInfo;
                import jpa.entity.cattle.SmallToad;
                import jpa.exp.client.DuplicateObjExp;
                
                /**
                 * 该类ä¸é’ˆå¯¹ä¸€äº›é€šç”¨çš„æ•°æ�®åº“æ“�作方å¼�æ��供了å°�装.
                 * 从而为serviceä¸çš„调用æ��供了支æŒ�,简化了代ç �.
                 * @author howard.zhu
                 *
                 */
                public class CommonDBAction {
                
                 /**
                 * 删除一个对象,æ¤æ—¶éœ€è¦�æ��供一个根æ�®ID查询得到的对象.
                 * @param <T>
                 * @param id
                 * @param em
                 * @param eo
                 * @return
                 */
                 //@TransactionAttribute(value = TransactionAttributeType.REQUIRES_NEW)
                 public static <T extends SmallToad> int deleteObjById(int id,EntityManager em ,T eo ) {
                 if(id < 0 )
                 {
                 return CommonUtil.persistResult.INVALID_BEDELETEDOBJ;
                 }
                
                 if(null == eo )
                 {
                 return CommonUtil.persistResult.INVALID_BEDELETEDOBJ;
                 }
                 if(eo.getDataInfo().equals(DataInfo.BASIC))
                 {
                 //��护的数�,��许删除.
                 return CommonUtil.persistResult.PROTECTED_OBJ;
                 }else
                 {
                 em.remove(eo);
                 }
                 return CommonUtil.persistResult.SUCCESS ;
                 }
                
                 /**
                 * 查询所有的该类对象.
                 * @return
                 */
                 @SuppressWarnings("unchecked")
                 public static <T> List<T> queryAllObjs(String namedQuery,EntityManager em,Class<? extends Object> T) {
                 Query query = em.createNamedQuery(namedQuery);
                 //�处�查询失败的情况,没有查询到值,则默认返回一个null;
                 if(null == query)
                 {
                 return null;
                 }
                
                 return (List<T>)query.getResultList();
                 }
                
                
                 @SuppressWarnings("unchecked")
                 public static <T> T queryByID(int id,EntityManager em,String namedQuery,String paramName ,Class<? extends Object> T) {
                 if(id < 0)
                 {
                 return null;
                 }
                 Query query = em.createNamedQuery(namedQuery).setParameter(paramName, id);
                
                 if(null == query)
                 {
                 return null;
                 }
                 if(null == query.getResultList() || query.getResultList().size() <= 0)
                 {
                 return null;
                 }
                 return (T)query.getSingleResult();
                 }
                
                
                 @SuppressWarnings("unchecked")
                 public static <T> T queryByName(String name,EntityManager em,String namedQuery,String paramName ,Class<? extends Object> T) {
                 if(null == name || "".equals(name.trim()))
                 {
                 return null;
                 }
                 Query query = em.createNamedQuery(namedQuery).setParameter(paramName, name);
                 if(null == query)
                 {
                 return null;
                 }
                 if(null == query.getResultList() || query.getResultList().size() <= 0)
                 {
                 return null;
                 }
                 return (T)query.getSingleResult();
                 }
                
                
                
                 public static <T extends SmallToad> int storeObj(T eo,EntityManager em,List<T> mayMultyObjs) {
                
                 if(!eo.checkInsertable())
                 {
                 //无效的对象
                 return CommonUtil.persistResult.INVALID_OBJECT;
                 }
                 int result = CommonUtil.persistResult.FAILURE;
                 if(null != mayMultyObjs && (mayMultyObjs.size() > 0) )
                 {
                 for(T t : mayMultyObjs)
                 {
                 if(null != t)
                 {
                 return CommonUtil.persistResult.ALREADY_EXIST;
                 }
                 }
                 }
                 em.persist(eo);
                 result = eo.getIdAfterInsert();
                 return result;
                 }
                
                
                 public static <T extends SmallToad> T updateObj(T eo,EntityManager em,List<T> mayMultyObjs,T existsObj)
                 throws DuplicateObjExp {
                
                 if(!eo.checkupdateble())
                 {
                 //无效的对象
                 return null ;
                 }
                 if(null != mayMultyObjs)
                 {
                 for(T t : mayMultyObjs)
                 {
                 if(null != t && (t.getIdAfterInsert() != eo.getIdAfterInsert()))
                 {
                 //对象已ç»�å˜åœ¨
                 throw new DuplicateObjExp("multy stype in db! update failure !");
                 }
                 }
                 }
                
                 if(null == existsObj)
                 {
                 return null;
                 }else{
                 if(eo.getDataInfo().equals(DataInfo.BASIC))
                 {
                 //基础数�,�更新.
                 return existsObj;
                 }else
                 {
                 existsObj.copy(eo);
                 return em.merge(existsObj);
                 }
                 }
                 }
                
                }
                
                


                • 5. Re: SOS
                  zhu zhu Newbie

                  when i invoke the method named "ROrganizationService#deleteObj(int id)",and then i got the exception above.
                  it is very tedious to see all of the contents above,is there somebody to help me to resolve this problem ,Thanks Very Very Very Much...........

                  • 6. Re: SOS
                    zhu zhu Newbie

                    i have resolved this problem,
                    ROrganizationService

                     public int deleteObj(int id) {
                     OrganizationEO org = queryByID(id);
                     if(null != org && null != org.getParentObj())
                     {
                     OrganizationEO superOrg = queryByID(org.getParentObj().getId());
                     if(null != superOrg && null != superOrg.getSonOrgs())
                     {
                     superOrg.getSonOrgs().remove(org);
                     em.merge(superOrg);
                     }
                     }
                     return CommonDBAction.deleteObjById(id, em, org);
                     }
                    

                    because of the parentOrganization who referenced to current Organization,it is impossable to delete current organization.now it can runs well..