Skip to Content
author's profile photo Former Member
Former Member

Setting synchronous processing of data in SAP Mi

Hi,

We are using MAM2.5 application.

We are not getting all the updates from the MI server to MI Client in one sync.

We are in asynchronous mode of synchronization.

When we synchronize we get a message that "Data is not complete"

I have used the repetitive synchronization option.

Still we need to make around 4 synchronizations to get the complete data.

I have read the synchronous processing of data can be set to get all the updates in one sync

Please let us know as to how to set the synchronous processing of data.

Is it a configuraiton in MI server or MI client ?

What can be the impact of going for synchronous processing when there are multiple users.

Thanks

Raj

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2006 at 02:09 AM

    hi raja,

    there are 2 ways to do this.

    1) setting you syncbo to synchronous thru your metadata.

    when you define your syncbo, you can define the send type of your syncbo. by

    default it is set to async. now after you have changed your metadata, you have

    to redownload the xml metadata and include it into your application archive.

    re-upload your application and redeploy it.

    2) via the SyncBoDeltaFacade interface

    if you don't want to modify your syncbo metadata, you can set the send type of a

    certain syncbo programatically. e.g.

    SyncBoOutDeltaFacade outDeltaFacade = smartSyncRuntime.getSyncBoOutDeltaFacade();
    outDeltaFacade.setSendType(syncBoDescriptor, SyncBoOutDeltaSendType.SEND_DIRECT);

    regards

    jo

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2006 at 04:54 AM

    Hi Raja,

    You cannot make changes in the structure of the standard MAM syncbos from the MI server side. The metarep.xml is generated based on the settings done in the merep_sbuilder, which for any standard syncBO will not be editable. Therefore on the MI server it would not be possible to make standard syncBOs aync or sync, as per your requirement.

    Regards,

    Rahul

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2006 at 07:14 AM

    Hi Raj,

    If you are using MAM2.5 application. You can change the syncBo settings in the client from async to sync.

    This can be done by setting the parameter

    UPD_SYNCTYPE=SYNC (from ASYNC)

    DWN_SYNCTYPE=SYNC (from SYNC)

    in the ALMConfig.properties file. This will be present in your webapps/MAM25/WEB-INF/classes folder.

    This will make all your syncBo's synchronous.

    Using synchronous processing the sync times of the client would increase.

    You can also play around with your repetitive sync settings to get the data back in lesser number of syncs. This can be done by increasing the value in

    MobileEngine.Sync.TimeBetweenRepetitiveSyncs.

    You can enable the syncBo MIAuth in the middleware to make Repetitive sync work better for you. Let me know if you need more information on this.

    Best Regards,

    Karthik

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 12:07 AM

    Hi,

    Karthik, Thanks for your reply.

    We have done the modifications suggested by you..

    Sometimes, the synchronous synchronization doesnt complete. The synchronization runs for hours but doesnt end. I have to restart MI client for the sync to work on the MI client again

    The trace.txt displays errors related to setting synchronous option to the local sync BOs that we have created.

    Are they causing for the synchronous sync issues..

    Please let us know of any work around.

    Is there any option to selectively set the Sync BOs to synchronous.

    Thanks

    Raj

    The trace.txt log is as follows

    -


    [20070108 23:23:59:763] I [MI/API/Logging ] ***** LOG / TRACE SWITCHED ON

    [20070108 23:23:59:763] I [MI/API/Logging ] ***** Mobile Engine version: MI 25 SP 16 Patch 00 Build 200602132039

    [20070108 23:23:59:763] I [MI/API/Logging ] ***** Current timezone: America/New_York

    [20070108 23:26:57:841] E [Unknown ] *****Error : Could not set :PIA_INF to synchronous.

    java.lang.NullPointerException

    at com.sap.mbs.mam.sync.SyncInboxObserver.handleSyncDownRequest(SyncInboxObserver.java:382)

    at com.sap.mbs.mam.sync.SyncInboxObserver.messageReplyReceived(SyncInboxObserver.java:197)

    at com.sap.ip.me.smartsync.syncOut.SyncOutRuntimeImpl.processSyncStartActivities(SyncOutRuntimeImpl.java:515)

    at com.sap.ip.me.smartsync.core.SmartSyncRuntimeImpl.actionPerformed(SmartSyncRuntimeImpl.java:443)

    at com.sap.ip.me.smartsync.core.SmartSyncRuntimeManager.actionPerformed(SmartSyncRuntimeManager.java:268)

    at com.sap.ip.me.smartsync.core.SyncAdapter.actionPerformed(SyncAdapter.java:64)

    at com.sap.ip.me.sync.SyncEventRegistryImpl.fireSyncEventNotifierMethod(SyncEventRegistryImpl.java:315)

    at com.sap.ip.me.sync.SyncManagerImpl.raiseSyncEvent(SyncManagerImpl.java:1230)

    at com.sap.ip.me.sync.SyncManagerImpl.synchronizeWithBackend(SyncManagerImpl.java:429)

    at com.sap.ip.me.sync.SyncManagerImpl.synchronizeWithBackend(SyncManagerImpl.java:288)

    at com.sap.ip.me.api.sync.SyncManager.synchronizeWithBackend(SyncManager.java:79)

    at com.sap.ip.me.apps.jsp.Home$SyncRunnable.run(Home.java:471)

    at java.lang.Thread.run(Thread.java:534)

    [20070108 23:26:57:873] E [Unknown ] *****Error : Could not set :FL_SCAN to synchronous.

    java.lang.NullPointerException

    at com.sap.mbs.mam.sync.SyncInboxObserver.handleSyncDownRequest(SyncInboxObserver.java:382)

    at com.sap.mbs.mam.sync.SyncInboxObserver.messageReplyReceived(SyncInboxObserver.java:197)

    at com.sap.ip.me.smartsync.syncOut.SyncOutRuntimeImpl.processSyncStartActivities(SyncOutRuntimeImpl.java:515)

    at com.sap.ip.me.smartsync.core.SmartSyncRuntimeImpl.actionPerformed(SmartSyncRuntimeImpl.java:443)

    at com.sap.ip.me.smartsync.core.SmartSyncRuntimeManager.actionPerformed(SmartSyncRuntimeManager.java:268)

    at com.sap.ip.me.smartsync.core.SyncAdapter.actionPerformed(SyncAdapter.java:64)

    at com.sap.ip.me.sync.SyncEventRegistryImpl.fireSyncEventNotifierMethod(SyncEventRegistryImpl.java:315)

    at com.sap.ip.me.sync.SyncManagerImpl.raiseSyncEvent(SyncManagerImpl.java:1230)

    at com.sap.ip.me.sync.SyncManagerImpl.synchronizeWithBackend(SyncManagerImpl.java:429)

    at com.sap.ip.me.sync.SyncManagerImpl.synchronizeWithBackend(SyncManagerImpl.java:288)

    at com.sap.ip.me.api.sync.SyncManager.synchronizeWithBackend(SyncManager.java:79)

    at com.sap.ip.me.apps.jsp.Home$SyncRunnable.run(Home.java:471)

    at java.lang.Thread.run(Thread.java:534)

    [20070108 23:26:57:904] E [Unknown ] *****Error : Could not set :ORD_ST to synchronous.

    java.lang.NullPointerException

    at com.sap.mbs.mam.sync.SyncInboxObserver.handleSyncDownRequest(SyncInboxObserver.java:382)

    at com.sap.mbs.mam.sync.SyncInboxObserver.messageReplyReceived(SyncInboxObserver.java:197)

    at com.sap.ip.me.smartsync.syncOut.SyncOutRuntimeImpl.processSyncStartActivities(SyncOutRuntimeImpl.java:515)

    at com.sap.ip.me.smartsync.core.SmartSyncRuntimeImpl.actionPerformed(SmartSyncRuntimeImpl.java:443)

    at com.sap.ip.me.smartsync.core.SmartSyncRuntimeManager.actionPerformed(SmartSyncRuntimeManager.java:268)

    at com.sap.ip.me.smartsync.core.SyncAdapter.actionPerformed(SyncAdapter.java:64)

    at com.sap.ip.me.sync.SyncEventRegistryImpl.fireSyncEventNotifierMethod(SyncEventRegistryImpl.java:315)

    at com.sap.ip.me.sync.SyncManagerImpl.raiseSyncEvent(SyncManagerImpl.java:1230)

    at com.sap.ip.me.sync.SyncManagerImpl.synchronizeWithBackend(SyncManagerImpl.java:429)

    at com.sap.ip.me.sync.SyncManagerImpl.synchronizeWithBackend(SyncManagerImpl.java:288)

    at com.sap.ip.me.api.sync.SyncManager.synchronizeWithBackend(SyncManager.java:79)

    at com.sap.ip.me.apps.jsp.Home$SyncRunnable.run(Home.java:471)

    at java.lang.Thread.run(Thread.java:534)

    -


    The sync BO definition of the local Sync BO in the meRepmeta.xml file are as follows

    - <SyncBO id="ORD_ST" versionfiltered="1" type="timedTwoWay" allowCreate="true" allowModify="true" allowDelete="true" reqDirectSync="false" suppressDownload="true" suppressUpload="true" downloadOrder="1">

    - <TopStructure name="TOP">

    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

    <Input type="create">false</Input>

    <Input type="modify">false</Input>

    </Field>

    <Field name="ORD_KEY" type="C" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    - <ChildStructure name="010">

    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

    <Input type="create">false</Input>

    <Input type="modify">false</Input>

    </Field>

    <Field name="MEASURE_PT_NO" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    <Field name="MEASURE_PT_STATUS" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    <Field name="MEASURE_PT_TYPE" type="C" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    </ChildStructure>

    - <ChildStructure name="020">

    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

    <Input type="create">false</Input>

    <Input type="modify">false</Input>

    </Field>

    <Field name="ORDER_STATUS" type="C" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    </ChildStructure>

    - <ChildStructure name="030">

    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

    <Input type="create">false</Input>

    <Input type="modify">false</Input>

    </Field>

    <Field name="ORDER_CONFIRM" type="C" length="10" decimalLength="0" signed="false" isKey="false" sIndex="false" />

    </ChildStructure>

    - <ChildStructure name="040">

    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

    <Input type="create">false</Input>

    <Input type="modify">false</Input>

    </Field>

    <Field name="MEASURE_PT_NO" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    <Field name="SUCCESS" type="C" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    </ChildStructure>

    - <ChildStructure name="050">

    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

    <Input type="create">false</Input>

    <Input type="modify">false</Input>

    </Field>

    <Field name="MAT_NUM" type="C" length="18" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    <Field name="RETN_CONF" type="C" length="1" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    </ChildStructure>

    </TopStructure>

    </SyncBO>

    - <SyncBO id="FL_SCAN" versionfiltered="1" type="timedTwoWay" allowCreate="true" allowModify="true" allowDelete="true" reqDirectSync="false" suppressDownload="true" suppressUpload="true" downloadOrder="1">

    - <TopStructure name="TOP">

    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

    <Input type="create">false</Input>

    <Input type="modify">false</Input>

    </Field>

    <Field name="FL_NUMBER" type="N" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    </TopStructure>

    </SyncBO>

    - <SyncBO id="PIA_INF" versionfiltered="1" type="timedTwoWay" allowCreate="true" allowModify="true" allowDelete="true" reqDirectSync="false" suppressDownload="true" suppressUpload="true" downloadOrder="1">

    - <TopStructure name="TOP">

    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

    <Input type="create">false</Input>

    <Input type="modify">false</Input>

    </Field>

    <Field name="PIA_NUMBER" type="N" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false" />

    </TopStructure>

    </SyncBO>

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      hello raja,

      for the local syncbos, the way MAM's SyncInboxObserver is implemented would

      likely throw this exception. from the line on the handleSyncDownRequest method:

      deltaFacade.getSyncBoDeltaRequest(desc).setProcessing(SyncBoDeltaRequestType.DIRECT_REQUEST);

      this will surely cause the NullPointerException since for local syncbos, the

      SyncBoDeltaRequest is not set i.e. null value. thus the call to

      <b>deltaFacade.getSyncBoDeltaRequest(descriptorOfLocalSyncBo)</b>

      will always be null.

      it could be a bug on the MAM's side or in the MI side...

      the fast workaround is to rebuild the SyncInboxObserver implementation in such a

      way that it will check for null value i.e.

      SyncBoDeltaRequest req = deltaFacade.getSyncBoDeltaRequest(desc);
      if(req!=null)
      req.setProcessing(SyncBoDeltaRequestType.DIRECT_REQUEST);

      hope this help

      regards

      jo

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 09:22 AM

    Jo, Thanks for your reply.

    What I am looking for is the reason for the synchronous synchronization not getting finished and a probable fix for it.

    So, do you think that exception regarding the local sync BO is not the reason for the Sync getting finished.

    Can we have configuration for the Sync to get timed out so that we can prevent it from running for ever ?

    Thanks

    Raj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      hello raja,

      >So, do you think that exception regarding the local sync BO is not the reason

      >for the Sync getting finished.

      an exception is caught in the observer; and this causes the synchronization to

      stop prematurely and this is the cause.

      >Can we have configuration for the Sync to get timed out so that we can prevent

      >it from running for ever ?

      setting a timeout here won't solve the problem. the exception will still be thrown

      if your observer is registered by the time you sync the client.

      [how to fix]

      changing the sync settings in the ALMconfig.properties alone will not work if you

      have local syncbos. in order for this to work, you have to update that code line

      and rebuild the observer which is throwing the exception as i have suggested in my

      previous post.

      regards

      jo

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 03:39 PM

    Jo, Thanks for your reply.

    We have implemented the code as per your suggestion and MAM errors related to Sync BO have disappeared.

    The problem I still have is that the Sync doesnt end.

    It keeps displaying the message "Synchronization in progress. Please wait"

    We are not sure of the actual cause of the Sync problem

    I could notice the following errors in the trace.txt file.

    Is the Bind exception because of port already occupied. I am not running any other MI client on my machine.

    Please let me know if we have any work around for this.

    [20070110 19:36:05:062] E [Unknown ] Mobile Asset Management Error end.

    [20070110 19:55:36:109] I [MI/API/Logging ] ***** LOG / TRACE SWITCHED ON

    [20070110 19:55:36:109] I [MI/API/Logging ] ***** Mobile Engine version: MI 25 SP 16 Patch 00 Build 200602132039

    [20070110 19:55:36:109] I [MI/API/Logging ] ***** Current timezone: America/New_York

    [20070110 19:55:39:140] E [MI/ComServer ] Exception while running communication server:

    java.net.BindException: Address already in use: JVM_Bind

    at java.net.PlainSocketImpl.socketBind(Native Method)

    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)

    at java.net.ServerSocket.bind(ServerSocket.java:318)

    at java.net.ServerSocket.<init>(ServerSocket.java:185)

    at java.net.ServerSocket.<init>(ServerSocket.java:97)

    at com.sap.ip.me.core.CommunicationServer.run(CommunicationServer.java:89)

    at java.lang.Thread.run(Thread.java:534)

    [20070110 20:06:41:960] I [MI/API/Logging ] ***** LOG / TRACE SWITCHED ON

    [20070110 20:06:41:960] I [MI/API/Logging ] ***** Mobile Engine version: MI 25 SP 16 Patch 00 Build 200602132039

    [20070110 20:06:41:960] I [MI/API/Logging ] ***** Current timezone: America/New_York

    [20070110 20:07:14:596] E [Unknown ] Mobile Asset Management Error begin:

    [20070110 20:07:14:596] E [Unknown ] Error in CstmCustomController

    [20070110 20:07:14:596] E [Unknown ] java.lang.NullPointerException: no message available

    java.lang.NullPointerException

    at com.sap.mbs.mam.bo.impl.Mam095ManagerImpl.getMam095Item030s(Mam095ManagerImpl.java:2977)

    at com.sap.mbs.mam.cstm.impl.CstmCustomControllerImpl.getBusinessProcess(CstmCustomControllerImpl.java:229)

    at com.sap.mbs.mam.rfid.util.impl.RFIDProtocolImpl.setRFIDScenarios(RFIDProtocolImpl.java:169)

    at com.sap.mbs.mam.rfid.util.RFID.setProtocol(RFID.java:37)

    at com.sap.mbs.mam.application.web.FrontServlet.init(FrontServlet.java:173)

    at javax.servlet.GenericServlet.init(GenericServlet.java:258)

    at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)

    at org.apache.tomcat.core.Handler.init(Handler.java:215)

    at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)

    at org.apache.tomcat.core.Handler.service(Handler.java:254)

    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

    at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)

    at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)

    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:423)

    at mam_0005fstart._jspService(mam_0005fstart.java:62)

    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

    at org.apache.tomcat.core.Handler.service(Handler.java:287)

    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)

    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)

    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)

    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

    at java.lang.Thread.run(Thread.java:534)

    [20070110 20:07:14:596] E [Unknown ] Mobile Asset Management Error end.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Vipin,

      You can check if any data is available in the client by using the link

      http://localhost:4444/<MAM name>/start.jsp

      We have a thread which takes care of synchronization,

      but one of the first methods it calls is

      SyncManager.synchronizeWithBackend().

      Let me know if you need anymore information.

      Regards,

      Karthik

  • author's profile photo Former Member
    Former Member
    Posted on Jan 12, 2007 at 05:21 PM

    Hi Karthik,

    Thanks for your timely responses.

    Sometimes I waited for more than an hour to finish the synchronization.

    I could see the synchronization mentioned in the worklist monitor of the MI server.

    But the MI client keeps on trying to synchronize. This problem doesnt happen on every synchronization.

    I couldnt find patch 4 of SP16 but I installed patch 3 on my MI client. After installation, I restarted my MI client and tried sync again. The first sync was successful but the second sync was not. The trace file contents are below

    Is there any other way that I could try to find out the cause of the issue..

    Thanks

    Raj

    [20070112 16:23:58:968] I [MI/API/Logging ] ***** LOG / TRACE SWITCHED ON

    [20070112 16:23:58:968] I [MI/API/Logging ] ***** Mobile Engine version: MI 25 SP 16 Patch 03 Build 200607280509

    [20070112 16:23:58:968] I [MI/API/Logging ] ***** Current timezone: America/New_York

    [20070112 16:24:14:531] E [MI/Core ] Exception while reading installation log file (root cause: C:\Program Files\SAP Mobile Infrastructure\bin\ci\archives\MI25SP16_P3_JSP\1.0\install.log (The system cannot find the path specified) [java.io.FileNotFoundException])

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2007 at 03:23 PM

    Concerning the endless synchronization: we had the same problem once and it eventually turned out to depend on the package size that is send. Adjusting UMT settings for the server corrected this. I can get more detials if needed.

    Regards,

    Ron Van Cleef

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Thanks for your reply.

      This problem still exists for us and we are searching for a solutions.

      I would greatly appreciate if you can let us know as to how you could resolve the problem

      Thanks

      Raja

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.