Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Duplicate events

Help
antonio t
2010-10-26
2013-04-25
1 2 > >> (Page 1 of 2)
  • antonio t
    antonio t
    2010-10-26

    Hi all,
    I have this structure: Zimbra 6.x on linux 64 bit and Funambol 8.5 with
    ZimbraConnector 0.6.02 on linux 32 bit. Blackberry users are using funambol
    client to synchronize their calendars
    Every works fine. However sometime that event occurs
    "  ….  
    Last stored anchor '1285209644579' is different from the current
    anchor sent by the client '1285238443925'. A slow sync will be forced."
    A slow sync duplicates calendar events on both side: blackberry phone
    and zimbra server.
    Have you a suggestion?
    Regards
    antonio

     
  • Michiel
    Michiel
    2010-10-26

    You can turn on debugging with this connector. If debugging is turned on, does it give you more information?

     
  • antonio t
    antonio t
    2010-10-26

    Hi,
    debug is set on.
    Problem seems bound to twin detection process. When start a slow sync, connector is not able to detect twin. Question is: why matching fail?  Can you suggest  an investigation area?
    Regard

     
  • Michiel
    Michiel
    2010-10-26

    I  don't know if you know JAVA as programming language, but twin detection of the Calendar items, as well as te tasks happen at the following function:

    ru.korusconsulting.connector.manager.CalendarManager.getTwins(Calendar)

    Here you can find the JAVA code of the twin detection: http://pastie.org/1251232 When I'll have time, I can check into it myself though, but not today.

     
  • antonio t
    antonio t
    2010-10-27

    Hi meghuizen,
    I'm not a java developer, but looking at sources seems that twin detection process is based on matching of these field: Target, isTask, subject, startDate, endDate.
    Can you confirm?
    Regards

     
  • Michiel
    Michiel
    2010-10-27

    Hi Rostov,

    Yes, that is correct. And if it is an all day event, it also matches on that. But you are correct on noticing that yes.

    I do however think that in this procedure, there happens some kind of translation between funambol and blackberry, on which the funambol connector cannot recognize the appointment as twin, when it comes back to the server. Although I don't have a blackberry to test these things out. Maybe I can tryout with some other Funambol client, to force those things. I've currently a test server running with the newest SVN version of Zimbra Funambol connector. Which is not that much of a difference with the one you are using.

    Can you tell when it happens? Does it happen only at slow sync? And also on what types of appointments? Can you recognize patterns in it? Or are all appointments doubled when that happens?

     
  • Michiel
    Michiel
    2010-10-27

    You do have a fallback option though, if the Zimbra connector is not working OK for Calendar, you could also combine the Zimbra connector with the CalDav connector (See: https://sourceforge.net/projects/funambol-caldav/ ). Because Zimbra also supports CalDav. You could leave the syncsources in tact, with the contacts and stuff and use the calendar, via the CalDav connector. Maybe that works better for you.

    I need to find a way to test this connector, via the tests Funambol delivers with their SDK, so I can see where this connector gets wrong in it's code, because currently even for me it's a bit of a blackbox.

     
  • antonio t
    antonio t
    2010-10-27

    Hi,
    events duplication happen after a slow sync. All event are duplicated on both side: server and mobile.
    If in the logs twin are evaluated as false why items are duplicates? In the source code the method twins.add(allItems.get(i)) is called if twin is true.
    I can you send you the server-log, if yuo prefer. And last: can you explain the procedure to build source code?
    Many thanks

     
  • Michiel
    Michiel
    2010-10-27

    Please if you can send me the server logs, I can maybe detect some things from it.

    Procedure to build the code is:
    svn co http://mysvnrepo
    cd workingcopy
    install ant sun-java6-jdk sun-java6-jre
    ant source

    that will get you a fresh .s4j

     
  • antonio t
    antonio t
    2010-10-28

    Hi Meghuizen,
    thanks a lot for help. I will try version 0.6.03 today.
    Server log is available here http://atcom.110mb.com/ds-server.zip.
    Any hint will be apreciated

     
  • antonio t
    antonio t
    2010-10-28

    Looking at server log, I noted that startDate and endDate in the SOURCE side are not correctly identified. Can be this the problem?

     
  • Michiel
    Michiel
    2010-10-28

    No need to try 0.6.03. That one doesn't work either, so you don't have to test that.

    Looking at the server logs, indeed you are right. This is a snippet of the logs I found in your logs, which explains what happens: http://pastie.org/1255221

    I will however ask you this evening I guess, to test another version of the code, which will supply more debug info. Because I need the type of values the startDate and endDate are having. So if they are String, Date, Calendar, etc. So I will solve this twin matching in all ways I can think of.

    But as far as I see, this problem can be solved. Those logs are truly helpfull.

     
  • antonio t
    antonio t
    2010-10-28

    Hi,
    I have just tried version 0.6.03….effectively it didn't work.
    I'm willing to try new versions. Waiting for your news
    Regards

     
  • antonio t
    antonio t
    2010-10-28

    I can confirm that the problem is in the matching startDate and endDate.
    I have recompiled source isolating these matching fields (matching on isTask, allDay, subject). Now twin detection occurs correctly. No duplicated items
    Regards

     
  • antonio t
    antonio t
    2010-10-28

    Just tried new version.
    Now starDate and endDate are in correct format. However there is a difference of two hours between SOURCE and TARGET.
    http://pastie.org/1256402
    I have made many settings on Zimbra and Funambol, but the difference are alway the same.
    Regards

     
  • Michiel
    Michiel
    2010-10-28

    It looks like it has to do with timezone settings. As well as Zimbra can have timezone settings as your phone. Hmm need to think about that on how to tackle that. Does Zimbra as well as your phone have the same timezone settings? And do you use Daylight Saving Time?

     
  • antonio t
    antonio t
    2010-10-29

    Yes. Zimbra and phone have the same timezone and I use Daylight Saving Time.
    Here http://pastie.org/1257438 there is the content of ics calendar.
    Regards

     
  • antonio t
    antonio t
    2010-10-29

    Hi,
    can I access to last version (0.6.03.1) source code?
    Many thanks

     
  • Michiel
    Michiel
    2010-10-29

    Yeah, you can, however it's currently uncommited code, so it's not in SVN. I can commit that this evening. Then you can update the SVN repository to include the new code.

     
  • Michiel
    Michiel
    2010-10-30

    The code is currently commited, so a simple svn up, should be enough to get the new code with the changes included.

     
  • antonio t
    antonio t
    2010-10-30

    Hi,
    I will take a look.
    Have you some hint for timezone problem?
    Regards

     
  • antonio t
    antonio t
    2010-10-30

    I'm trying many solutions but none of these works.
    However I have excluded start and end hour from matching. Now twin matching is limited to isTask, isAllDay, subject, start and end day (as day number in the year).  Not a perfect solution, but it working (at least for my needs)
    Regards

     
  • Michiel
    Michiel
    2010-10-31

    Hi, can you help me to fix this once and for all. I have a feeling I'm almost their to fix this with timezones support.

    The new code, I just committed, has timezone support. I even compiled it, so you can hook it right into Funambol. Which adds debug data, to the logs. Can I get a dump of the logs with that one, so I can see the timezone values.

    The following functions in getTwins() as well as getHash():
        dtStart = CalendarUtils.getInstance().getLocalDate(dtStartStr, 0);
        dtEnd = CalendarUtils.getInstance().getLocalDate(dtEndStr, 0);

    So I want to try that out to see if I can use the timezone value to match those start and end date. If we can fix that, the whole problem will be solved.

     
1 2 > >> (Page 1 of 2)