1 Reply Latest reply on Mar 16, 2003 1:46 PM by Giovani Salvador

    Can not catch ejbexception

    Giovani Salvador Newbie

      Hi all....

      i am using jboss 3.0.4 with sql server 2000 and microsft (merant) jdbc driver.
      I have the following problem:
      i have an entity bean cmp. Suppose that this entity has a field that in the database its size is varchar 30. When i set a value to the entity´s field thats greater than 30, an error must occur, ok? Yes, but i can not catch this error. In the jboss console appears the followinfg error:

      Store failed on entity: 5
      javax.ejb.EJBException: Store failed; CausedByException is:
      [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.

      I have all try/catch blocks in my session bean that communicates with the entity, but no catch gets none error. Only after the execution of all methods, the error appears in the console.

      Please, i need any help.