I have created a entity bean with the cmp 2.0 standard, with Jbuilder8.
When adding a new line to the table corresponding to the entity bean,
if I try to insert a record of type string for which the string length
is too long, I get the following error :
<Jun 9, 2005 10:13:42 AM CEST> <Error> <EJB> <BEA-010026> <Exception
occurred during commit of transaction Name=[EJB
abcinterface.EJB.TRSMonthlyTsQualification2ImportedSessionFacadeBean.createTimespent(abcinterface.EJB.TRSMonthlyTsQualification2ImportedDto)],Xid=BEA1-002DD99F3683860F7BA7(16484305),Status=Rolled
back. [Reason=weblogic.utils.NestedRuntimeException: Error writing from
beforeCompletion - with nested exception:
[java.sql.SQLException: [BEA][SQLServer JDBC Driver][SQLServer]String
or binary data would be
truncated.]],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since
begin=0,seconds
left=30,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=mylocserver)
Is this normal ? I would think that the truncation would be done
automatically on the entity bean side with the column description ?
Does the truncation/verification of the field length need to be coded ?
Thanks for your help,
Regards,
Sebastien.