Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    updateCaches and "WARN:Log:findByKeys"

    SmartClient Version: v9.1p_2014-07-06/Pro Deployment (built 2014-07-06)
    FF 24.6.0 ESR

    We have a ListGrid bound to datasource "baseDs".

    We have several datasources that "inheritsFrom" from datasource "baseDs".

    When a user clicks on a particular record in the ListGrid bound to the "baseDs" datasource, we fetch the extended record and display it in a form, specifically, the record for the datasource that extends the "baseDs" (let's call it "extendedDs").

    We want the ListGrid, which is bound to the "baseDs" to be updated so that it is not out of sync with the form bound to the "extendedDs", so we update the cache for both the "baseDs" and the "extendedDs" using the fetched "extendedDs" record.

    Code:
    DSResponse cacheResponse = new DSResponse();
    cacheResponse.setData(record);
    cacheResponse.setOperationType(DSOperationType.UPDATE);
    baseDs.updateCaches(cacheResponse);
            
    DSResponse cacheResponse = new DSResponse();
    cacheResponse.setData(record);
    cacheResponse.setOperationType(DSOperationType.UPDATE);
    extendedDs.updateCaches(cacheResponse);
    Occationally, calling baseDs.updateCaches(cacheResponse); results in the warning "WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'".

    The record does indeed include the key field and this only seems to happen if we have two ListGrids bound to "baseDs" open at the same time.

    Could you provide some guidance on what could be producing such warnings?

    Thanks

    #2
    We can't see a cause for this message other than exactly what the message says (passed record doesn't have a value).

    Perhaps the record is being changed in between the two calls to updateCaches()?

    Comment


      #3
      We are doing some logging before each call to updateCaches and the primary key is in the record prior to the call.

      [INFO] [xxxx] - Updating ds extensionDs with ourPrimaryKey: e23c972e560147bebc3e6a7b09f24f2a
      [INFO] [xxxx] - Updating ds baseDs with ourPrimaryKey: e23c972e560147bebc3e6a7b09f24f2a
      [ERROR] [xxxx] - 00:23:33.823:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'
      [ERROR] [xxxx] - 00:23:33.834:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'
      [ERROR] [xxxx] - 00:23:33.845:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'
      [ERROR] [xxxx] - 00:23:33.854:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'
      [ERROR] [xxxx] - 00:23:33.866:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'
      [ERROR] [xxxx] - 00:23:33.876:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'
      [ERROR] [xxxx] - 00:23:33.885:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'
      [ERROR] [xxxx] - 00:23:33.902:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'

      The stack trace is:

      Code:
      00:23:34.870 [ERROR] [xxxx] 00:23:33.885:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'
      
      com.smartgwt.client.core.JsObject$SGWT_WARN: 00:23:33.885:XRP7:WARN:Log:findByKeys: passed record does not have a value for key field 'ourPrimaryKey'
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
          at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
          at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
          at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
          at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
          at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
          at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
          at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
          at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304)
          at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
          at com.smartgwt.client.data.DataSource.updateCaches(DataSource.java)
          ...
      Furthermore, when we only have a single list grid open backed by the "baseDs" datasource, the same updateCaches logic is called, yet the warnings do not appear. They only appear when we have multiple list grids open backed by the same "baseDs" datasource.

      Any further suggestions would be appreciated.

      Thanks

      Comment


        #4
        Unfortunately, we have never seen this behavior and it's hard to comment in any definitive way from your description. The fact that the ListGrid has to be present is interested - presumably some ListGrid logic is executing which is somehow interacting with the DataSource with invalid data - but it's hard to theorize as to exactly what's happening.

        The best way to proceed would be to show us a way to reproduce the problem. Presumably you could do this with two simple DataSource definitions (possibly clientOnly, or possibly using one of the Samples which includes a databound grid as a starting point) and a simple entry point, which defines the 2 grids and has a button to execute the updateCaches calls which are causing these problems.

        If you can get us a way to reproduce the issue, we'll happily take a look.

        Regards
        Isomorphic Software

        Comment


          #5
          I will see what I can do to extract a reproducible test case.
          Thank you

          Comment

          Working...
          X