Skip navigation
Currently Being Moderated

LCDS fails at initializing DataStore

Apr 6, 2012 6:55 AM



we're using ADEP 4.6 Dataservices' datamanagement and we're getting a strange but explainable error. We have an AIR desktop app with a dataservice and offline cache.


The situation is that I commited a property value change on an item in a managed collection. Let's say:

FileDto with id: 10 and isFavorite: true.

Commit works and isFavorite is now true for this item in the backend database.


After that we do a synchronizeFill operation which return FileDto with id:10 as a deleted item, so LCDS automatically deletes this record from my offline cache. Again, no problems here.


I close my app and restart it. The first thing it wants to do when initializing my dataservice instance is initialize my datastore. This is were things go wrong.

For some reason (i'm guessing for rollbacks) the datastore has to restore the "committed and sent message batches" which has a reference to FileDto with id: 10. But obviously, when it tries to get this from the offline cache, it doesn't find it and throws a null pointer exception.


Why is this happening if LCDS previously got a command to delete this record? And why does it try to restore "committed and sent message batches"?


Any help would be appreciated.




This is the actual error thrown


Caught error initializing metadata for datastore: null error: TypeError: Error #1009: Cannot access a property or method of a null object reference.

    at[C:\depot\DataServices\branc hes\milestone\adepds46_rc\frameworks\projects\airfds\src\mx\data\offli ne\]

    at[C:\depot\DataServices\branch es\milestone\adepds46_rc\frameworks\projects\airfds\src\mx\data\SQLite]

    at[C:\depot\DataServices\bra nches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\DataS]

    at[C:\depot\DataServi ces\branches\milestone\adepds46_rc\frameworks\projects\data\src\mx\dat a\]

    at Function/<anonymous>()[C:\depot\DataServices\branches\milestone\adepd s46_rc\frameworks\projects\data\src\mx\data\]

    at[C:\depot\DataServices\branches\ milestone\adepds46_rc\frameworks\projects\data\src\mx\data\DataStore.a s:4486]

    at Function/<anonymous>()[C:\depot\DataServices\branches\milestone\adepd s46_rc\frameworks\projects\data\src\mx\data\]

    at Function/<anonymous>()[C:\depot\DataServices\branches\milestone\adepd s46_rc\frameworks\projects\data\src\mx\data\]

    at[C:\depot\DataServices\br anches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\Data]

    at Function/<anonymous>()[C:\depot\DataServices\branches\milestone\adepd s46_rc\frameworks\projects\data\src\mx\data\]

    at mx.rpc::Responder/result()[E:\dev\4.x\frameworks\projects\rpc\src\mx\ rpc\]

    at mx.rpc::AsyncToken/[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\]

    at Function/

    at mx.rpc::AsyncDispatcher/timerEventHandler()[E:\dev\4.x\frameworks\pro jects\rpc\src\mx\rpc\]

    at flash.utils::Timer/_timerDispatch()

    at flash.utils::Timer/tick()


More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points