1 Reply Latest reply on May 13, 2002 6:34 PM by Dain Sundstrom

    CreateException instead of SQLException

    Raphael Newbie

      Hi all!

      Here my problem:

      Every kind of Exception generated by the database (e.g. required fields, triggers, ...) throws a CreateException with the message "Fractional Truncation" and not any kind of SQLException in the stack trace.

      In our design we have implemented some triggers that do consitency checks on the database (MS SQL). These triggers raise Exceptions if something go wrong. In the EJB code we expect an SQLException containing the message that was generated by the trigger. But we always get the CreateException.

      Can anybody help us? Thanks.

      Raphael

        • 1. Re: CreateException instead of SQLException
          Dain Sundstrom Master

          Unfortunately, there is nothing you can do. SQLExceptions are black boxes, there is no categorization beyond it failed. To make this even worse, EJB create exceptions do not support a root cause.

          You could go bitch at the spec comities, but don't hold your breath.

          When David and I get arround to writing the JBossCMP to JCA layer you will be able to handle db level transactions in a custom JCA wrapper, but that won't happen until atleast JBoss 4.0.