cancel
Showing results for 
Search instead for 
Did you mean: 

7.1: Insert-Exception only appears in trace-file ?

Former Member
0 Kudos

Hello,

this is a question relating to SAP Mobile 7.1, we are developing an application for Handhelds.

I have the following situation:

- In my Services Component I define the DO "Equip" with an unique index on attribute "nr".

- I create a new Equip and set its attribute "nr" to an already existing value in the DB.

- I perform a commit.

=> I only can see in the application trace-file that an SQLException occoured ("Error inserting row --> java.sql.SQLException: Duplicate unique index") but the exception isn't propagated to my application so my application has no chance to notice that something went wrong. Even worse: The complete record is lost !

What do I have to do to receive this exception so I am able to notify the user that the record contains invalid data before it is lost ?

Thanks a lot,

Björn

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

we have another situation in which the framework catches an exception and just drops it silently, and drops the data as well.

In another support message we noted the following behaviour:

- form field length: 20

- db field length: 10

- insert succeeded (in an older Patch Level)

- but an error happened during the sync (SAP message 510534)

we just received a fix (SP05 PL04) and this is what happens now:

- insert throws an exception (text see below)

- the framework catches the exception

- and drops it silently

- the application does not see that anything went wrong

ok, I understand that I just should fix the length in the form field. Easy.

But the whole exception handling in the persistence layer should be reviewed.

Cheers, Andre

<r id="1219153804103" t="15:50:04" d="2008-08-19" s="E" c="000" u="ZKIAGE" g="en" m="Error inserting row --&gt; java.sql.SQLException: Value is too large, column: EQUIP_NR

at com.sap.sdb.minDB.util.ErrorMsg.newSQLException(Unknown Source)

at com.sap.sdb.minDB.util.ErrorMsg.conversionError(Unknown Source)

at com.sap.sdb.minDB.common.ColumnDesc.checkColumnSize(Unknown Source)

stefan_henke
Contributor
0 Kudos

Hi Bjoern,

I tried to reproduce this on 7.1 SP5 (I guess you are using this version, right?). I was facing the same issue as describd by you. This looks very much like a bug to me. Could you create an OSS message for this issue? We can then handle this appropriately and provide you a fix for it if necessary.

Regards,

Stefan

Former Member
0 Kudos

Hello Stefan,

you are right, i am using the Mobile Client 7.1 SP05 (PL04).

I created an OSS message (649737/2008).

Regards,

Björn