Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

can not catch ejbexception

843829Mar 14 2003 — edited Mar 17 2003
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.

Thanks.
Giovani
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2003
Added on Mar 14 2003
7 comments
37 views