cancel
Showing results for 
Search instead for 
Did you mean: 

Error while Smart Sync inbound processing: IPersistenceException

Former Member
0 Kudos

We are using Mobile Infrastructure 2.5 SP 13 WAS 640 to run SmartSync applications with FileIO persistence.

the steps for replicate the problem are:

1. my client request to R3 data filtered by username.

R3 assign orders to my username (ME-SYNC_USER variable).

2. my first sync is ok : my user request successfully data using getList (TOP list)+ getDetail(ITEM detail) function in R3.

3. into R3 layer, my administrator adding a row (an item) in the order. my client synchronize with backend and the message returned from java method messageReplyReceived(MessageReply arg0) into arg0.getText() code is:

<b>"Error while Smart Sync inbound processing: com.sap.ip.me.spi.persist.IPersistenceException: Cannot insert as entity already exists for IClassDescriptor/Key: cZSYNMP_P13_010/1000513

"</b>

-> your solution in the code:

we have tried to delete the row key : 1000513 in the local persistence (from file system) but we have no result. The exception persist.

the code is:

<i>else if ( arg0.getType()==MessageReplyType.ERROR)

{

String Text = arg0.getText();

String RKey = Text.substring((Text.lastIndexOf('/')+1));

SmartSyncDBAccess dba = new SmartSyncDBAccess();

try

{

dba.DeleteRow2("ZSYNMP_P13", RKey);

...

public void DeleteRow2 () {

SmartSyncDBAccess dba = new SmartSyncDBAccess();

try

{

MeIterator sbs = dba.getSyncBoInstances(SyncBoName, 0, 200, -1, true, "");

if(sbs.elementCount() > 0)

{

while(sbs.hasNext())

{

SyncBo s = (SyncBo) sbs.next();

SmartSyncTransactionManager transactionManager = dataFacade.getSmartSyncTransactionManager();

transactionManager.beginTransaction();

s.deleteRow(RKey);

...

}</i>

this is a bug of local persistence layer?

help!

- eliana

Accepted Solutions (1)

Accepted Solutions (1)

kishorg
Advisor
Advisor
0 Kudos

Hi Elina,

this error is because,

same data is inserting again in the persistence.

(just like violating the primary key concept in database.)

This type of error can happen,

1) insufficient number of key field mapping.

because of the improper key field mapping in in Synch Bo . just check the key fields u have selected during synch Bo Creation.

I am sure , the key u have selected is selecting the same data more than once (using the same key).

Here what u have to do is ,,

in the merep_sbuilder select ur sync Bo ,

in the key filed mapping screen of ur GET DETAIL function module .. select the table 010 .. here maintain proper keys..

2)

if u have maintained proper keys there , then it might be because of the improper data present in the back end system.. then delete the data which is not satisfying with the key field mapping.

Let me know ..

Regards

Kishor Gopinathan

Former Member
0 Kudos

hello kishor,

can you explain me how to modify a sync bo from the sync bo builder?

kishorg
Advisor
Advisor
0 Kudos

Hi Elina,

1)just run transaction merep_sbuilder in MI server.

2) Here enter ur sync bo , here have the provision to edit ur sync bo .

i think here the problem is with 010 table (so go to GETDETAIL BAPI Wrapper ).

here check whether the keys are proper or not?

Regards

Kishor Gopinathan

Former Member
0 Kudos

ok kishor,

thanks a lot!

1. we are modify in the backend layer the keys for your syncbo: we have added 1 key in the items structure.

2. in the client layer, i dont't have redeployed my JSP Application & i have launched the Eclipse debugger. I have synchronized, the backend as changed the field value for an item, i have synchronized and the error 'Error while Smart Sync inbound processing: IPersistenceException' is solved.

3. in my client the patch level 12 for my SP 13 is not necessary.

thanks !

Former Member
0 Kudos

PLS REFER TO THIS AND HELP ME

Answers (1)

Answers (1)

Former Member
0 Kudos

hello eliana,

what's the SP level of your client?

try applying the latest patch especially for SP13.

regards

jo

Former Member
0 Kudos

Hello JO

my MI Client is 2.5 SP 13 Patch 12 Build 200602201212.

The patch level is correct?

thanks,

eliana