db4o Developer Community

db4o open source object database, native to Java and .NET
Welcome to db4o Developer Community Sign in | Join
in Search
More Search Options

How to use Sync4o ?

Last post 07-16-2008, 08:31 AM by mickaFr. 3 replies.
Sort Posts: Previous Next
  •  07-09-2008, 09:06 AM 50060

    How to use Sync4o ?

    HI,

     

    i don't know how to use sync4o.

     

    i saw this line in the example test :

     

     // For JDK 1.1.8 compatibility we cannot use System.setPropery()...
          Properties props = System.getProperties();
         
          // This sets the root of our config tree to be ./config
          props.put(SimpleDeviceManager.PROP_DM_DIR_BASE, "config");
         
          System.setProperties(props);
         
          // the "." argument specifies the current working directory
          // as the root for sync operations
          SyncManager syncManager = SyncManager.getSyncManager(".");
         
          syncManager.sync();
     

    But i can't use a file in my case. i have to set manualy the properties.

    And i didn't see where you call the sync4o function ?

     

     

     

    Can you help me ?

     

    please

  •  07-11-2008, 02:59 PM 50092 in reply to 50060

    Re: How to use Sync4o ?

    Hi,

     

    i know now how to start the sync, but i've an error, i think that you can help me for that :

     

    it is this line which make an error :

        query.descend("_config").constrain(config);

     

    when i want to print the object config on the log i've that :

     {com.example.Customer,_customerId}

     

    and the error log is :

    ERROR/AndroidRuntime(13558):  Caused by: java.lang.NullPointerException
    ERROR/AndroidRuntime(13558):     at com.db4o.sync4o.SyncDb.findClassInfos(SyncDb.java:773)
    ERROR/AndroidRuntime(13558):     at com.db4o.sync4o.SyncDb.getClassInfo(SyncDb.java:725)
    ERROR/AndroidRuntime(13558):     at com.db4o.sync4o.SyncDb.purge(SyncDb.java:119)

     

     

    thanks you a lot

  •  07-14-2008, 06:24 PM 50128 in reply to 50092

    Re: How to use Sync4o ?

    hi,

     

    can you help me ? please ! i need help

     

     

    thx,

  •  07-16-2008, 08:31 AM 50160 in reply to 50128

    Re: How to use Sync4o ?

    finally it seems that the error is due to a bad datafile, thanks you for your help !!!! ;)
View as RSS news feed in XML