Hi Jeff,

thanks for the tip on compiler option; it does now work but...

I have added the -services compiler option to Flex Builder and have
-locale en_US -services
C:\lcds\tomcat\webapps\lcds-samples\WEB-INF\flex\services-config.xml
-context-root=/

on debugging, the destination for insync is not set and I managed to
load the database content once.
Now I have this problem: (it is related to the database connection now)

full listing:

'cds-consumer-insync-null' consumer set destination to 'insync'.
Configuration for destination='insync':
 <properties>
  <metadata>
    <identity property="contactId" undefined-value="0"/>
  </metadata>
</properties>
New DataService for destination: insync
'95A48922-DF2E-8FFA-31A4-68AD0FB8F7B3' producer set destination to
'insync'.
Creating a new independent data store for destination: insync
Adding data service: insync to the data store: null initialized: false
'my-rtmp' channel endpoint set to rtmp://localhost:2037
start network monitor
handleMonitorStatus() monitor.available: true
Connecting...
'my-rtmp' channel got connect attempt status. (Object)#0
  code = "NetConnection.Connect.Success"
  description = "Connection succeeded."
  details = (null)
  DSMessagingVersion = 1
  id = "EA8E85C2-9208-35F5-18A4-9000B983040F"
  level = "status"
  objectEncoding = 3
'my-rtmp' channel is connected.
'my-rtmp' channel sending message:
(mx.messaging.messages::CommandMessage)
  body=(Object)#0
  clientId=(null)
  correlationId=""
  destination="insync"
  headers=(Object)#0
  messageId="30E89B94-338F-3AB4-4E01-68AD10E1964C"
  operation="client ping"
  timeToLive=0
  timestamp=0
'cds-consumer-insync-null' consumer connected.
'ds-producer-insync' producer connected.
ds.connect(): success
No offline changes to apply
Filling...
ServerConfig.xml
DataService.fill() called for destination: insync with args: []
'ds-producer-insync' producer acknowledge of
'30E89B94-338F-3AB4-4E01-68AD10E196
4C'.
Finished validating destination: insync loadOnDemand/paged
associations: [] sub-
types:
Caught error initializing metadata for datastore: null error:
TypeError: Error #
2007: Parameter value must be non-null.
        at ObjectOutput/writeUTF()
        at
mx.data::MessageBatch/writeExternal()[C:\depot\flex\branches\enterpri
se_corfu_rc\frameworks\projects\data\src\mx\data\MessageBatch.as:738]
        at ObjectOutput/writeObject()
        at
mx.data::DataMessageCache/writeExternal()[C:\depot\flex\branches\ente
rprise_corfu_rc\frameworks\projects\data\src\mx\data\DataMessageCache.as:1110]
        at flash.utils::ByteArray/writeObject()
        at
mx.utils::ObjectUtil$/copy()[E:\dev\3.0.x\frameworks\projects\framewo
rk\src\mx\utils\ObjectUtil.as:100]
        at
mx.data::SQLDBCacheCollection/get()[C:\depot\flex\branches\enterprise
_corfu_rc\frameworks\projects\airfds\src\mx\data\SQLDBCacheCollection.as:90]
        at
mx.data::DataStore/initMessageCache()[C:\depot\flex\branches\enterpri
se_corfu_rc\frameworks\projects\data\src\mx\data\DataStore.as:3493]
        at
<anonymous>()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\p
rojects\data\src\mx\data\DataStore.as:2324]
        at
<anonymous>()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\p
rojects\data\src\mx\data\DataStore.as:2363]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at
mx.data::SQLDBCache/dispatchStatusEvent()[C:\depot\flex\branches\ente
rprise_corfu_rc\frameworks\projects\airfds\src\mx\data\SQLDBCache.as:540]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at
mx.rpc::AsyncDispatcher/timerEventHandler()[E:\dev\3.0.x\frameworks\p
rojects\rpc\src\mx\rpc\AsyncDispatcher.as:50]
        at flash.utils::Timer/_timerDispatch()
        at flash.utils::Timer/tick()
Dispatching fault event for destination: insync
ds.fill(): failure
Could not initialize DataService.
Finished calling fault handlers for destination: insync

Do you know what I should do to solve that?
thanks 
Florence


--- In [email protected], Jeff Vroom <[EMAIL PROTECTED]> wrote:
>
> Hi Florence,
> 
> Thanks for sending that along... we are missing a clear error
message for whatever your problem is - sorry about that.  I have tried
a few things here to try and get that exact error and can't seem to
reproduce it here myself either.
> 
> There are two ways to get configuration into the Flex client.  You
can either compile your Flex app directly against the
"services-config.xml" file and it will compile in a subset of the
server's configuration into the player, or if you define a ChannelSet
on the client you can download the config at runtime after the client
connects.
> 
> It appears that you are getting the configuration at runtime, not
compile time so probably if you set the option to compile against
services-config.xml this will either start working or at least give
you a clearer error message about some configuration that is missing
for the "insync" destination (using the command line compiler, it is
the -services option, or it is settable as a project option in flex
builder).
> 
> From the logs you sent, I see it connecting successfully but it
looks like it is getting an empty definition of the "insync"
destination - i.e. no properties, no <metadata> and no identity
attribute all of which would be required for a valid DMS destination.
  You can see exactly what XML the client gets by looking at the variable:
> 
>   Import mx.messaging.config.ServerConfig
> 
>    ....
> 
>   trace(ServerConfig.xml);
> 
> We use that variable both to store any compiled in destinations as
well as to populate destinations after connect time so doing that
"trace" before and after you get the error would tell me exactly what
the client is seeing for that destination.   I suspect insync is maybe
getting put in there but without a <properties><metadata><identity
name="foo"></metadata></properties> construct.
> 
> Another possible thing that could cause this is that there is an
error initializing that destination on the server at startup.   To
check on that possibility, make sure to check your server's logs for
errors and possibly add "Message.*" and "Service.*" targets to the
services-config.xml's logging section and set level="Debug" there to
get more info.
> 
> Sorry for the difficulties getting this working.  Please let me know
if you do find the problem so I can improve our error messages.
> 
> Jeff
> 
> From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of fkolberg
> Sent: Saturday, July 26, 2008 10:20 AM
> To: [email protected]
> Subject: [flexcoders] Re: LCDS data synchronisation problem
> 
> 
> Hi Jeff,
> 
> I have got a more verbose output:
> 
> 'cds-consumer-insync-null' consumer set destination to 'insync'.
> New DataService for destination: insync
> 'D0C16D6A-7104-39A3-B839-6054DE1ED615' producer set destination to
> 'insync'.
> Creating shared data store with id: ':true' for destination: 'insync'
> Adding data service: insync to the data store: :true initialized: false
> Changing channelSet of a shared data store. It is now used also for
> id: rtmp://
> localhost:2037:true
> 'my-rtmp' channel endpoint set to rtmp://localhost:2037
> Changing channelSet of a shared data store. It is now used also for
> id: my-rtmp
> :true
> start network monitor
> handleMonitorStatus() monitor.available: true
> Connecting...
> 'my-rtmp' channel got connect attempt status. (Object)#0
> code = "NetConnection.Connect.Success"
> description = "Connection succeeded."
> details = (null)
> DSMessagingVersion = 1
> id = "D62F3568-062C-8CD2-6151-47A42CD1D145"
> level = "status"
> objectEncoding = 3
> 'my-rtmp' channel is connected.
> 'my-rtmp' channel sending message:
> (mx.messaging.messages::CommandMessage)
> body=(Object)#0
> clientId=(null)
> correlationId=""
> destination="insync"
> headers=(Object)#0
> messageId="800114A8-F29F-ACD1-B922-6054DFC4CC31"
> operation="client ping"
> timeToLive=0
> timestamp=0
> 'cds-consumer-insync-null' consumer connected.
> 'ds-producer-insync' producer connected.
> ds.connect(): success
> No offline changes to apply
> Filling...
> DataService.fill() called for destination: insync with args: []
> 'ds-producer-insync' producer channel disconnected.
> Error: Unable to initialize destinations on server: ["insync"]
> at
> <anonymous>()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\p
> rojects\data\src\mx\data\DataStore.as:2347]
> at
> <anonymous>()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\p
> rojects\data\src\mx\data\DataStore.as:2363]
> at flash.events::EventDispatcher/dispatchEventFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at
> mx.data::SQLDBCache/dispatchStatusEvent()[C:\depot\flex\branches\ente
>
rprise_corfu_rc\frameworks\projects\airfds\src\mx\data\SQLDBCache.as:540]
> at Function/http://adobe.com/AS3/2006/builtin::apply()
> at
> mx.rpc::AsyncDispatcher/timerEventHandler()[E:\dev\3.0.x\frameworks\p
> rojects\rpc\src\mx\rpc\AsyncDispatcher.as:50]
> at flash.utils::Timer/_timerDispatch()
> at flash.utils::Timer/tick()
> 
> the line "Creating shared data store with id: ':true' for destination:
> 'insync'" looks like an error somewhere, what is this data store
":true"?
> 
> Any idea?
> thanks for your advice and help.
> Florence
> 
> --- In
[email protected]<mailto:flexcoders%40yahoogroups.com>, Jeff
Vroom <jvroom@> wrote:
> >
> > This error occurs for a variety of problems that can occur when
> initializing the destination. You may not have defined that
> destination in the server's configuration or there can be a problem
> with that destination's configuration. If you add the tag:
> <mx:TraceTarget/> it will usually provide additional information in
> the flashlog.txt just before the message is shown.
> >
> > It will also log the destinations the client is configured with in
> the flashlog.
> >
> > Jeff
> >
> > From:
[email protected]<mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>]
> On Behalf Of fkolberg
> > Sent: Friday, July 25, 2008 9:16 AM
> > To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] LCDS data synchronisation problem
> >
> >
> > Hi,
> >
> > I have installed the insync app from
> >
>
http://coenraets.org/blog/2008/05/insync-automatic-offline-data-synchronization-in-air-using-lcds-26
> >
> > and consistently get "cannot fill" error message.
> >
> > I then got the source code and compiled the files under flex builder
> > 3. I ran the debugger and used trace() to output the messages.
> > the error occurs when the dataService invokes fill().
> >
> > I get the following error message:
> > Error: Unable to initialize destinations on server: ["insync"]
> > at
> >
>
<anonymous>()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\DataStore.as:2347]
> > at
> >
>
<anonymous>()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\DataStore.as:2363]
> > at flash.events::EventDispatcher/dispatchEventFunction()
> > at flash.events::EventDispatcher/dispatchEvent()
> > at
> >
>
mx.data::SQLDBCache/dispatchStatusEvent()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\airfds\src\mx\data\SQLDBCache.as:540]
> > at Function/http://adobe.com/AS3/2006/builtin::apply()
> > at
> >
>
mx.rpc::AsyncDispatcher/timerEventHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncDispatcher.as:50]
> > at flash.utils::Timer/_timerDispatch()
> > at flash.utils::Timer/tick()
> >
> > I have no idea what it means and does not really understand where the
> > info related to <anonymous> and the Folder were taken from.
> >
> > Can anybody help please?
> > thanks
> > florence
> >
>


Reply via email to