Announcement

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

    Warning:Attempted to call getRecord() on a DSResponse with null DataSource

    I'm testing SmartClient_SC_SNAPSHOT-2012-02-19_v82p_Pro.

    I'm using a custom datasource logic like in your example "/examples/server_integration/custom_datasource_operations/SupplyItemDMI.java".
    As in your example I do not use a DataSource and therefore a Datasource is not set in dsResponse.

    With SC 8.2 I get on every
    Code:
    rpc.send(dsRequest, dsResponse);
    following warning:
    Code:
    [com.isomorphic.datasource.DSResponse] Attempted to call getRecord() on a DSResponse with null DataSource
    Everything works like before in SC 8.0, but the message is annoying.
    This message appears in your “Custom DataSource” example as well.

    Can you turn off this message?

    Thanks
    Burkhard

    #2
    Because you're using DMI, there's still a DataSource. Set it on the dsResponse object to eliminate this warning.

    Comment


      #3
      Sorry, but think this is not solution for me. Let me explain how I use SmartClient:

      On client side I use SmartClient with RPCManager.actionURL set to my java servlet. On server side I use only RPCManager and do all database access without a DataSource. For every DSRequest I generate a DSResponse with all properties set like startRow, endRow, totalRows and data (as list of maps). Everything works fine and without a DataSource. And it still works fine with SC 8.2 except of the warning on every RPCManager.send().

      I want to avoid this warning because there are so many warnings generated that they may hide more important warnings or errors.

      Comment


        #4
        If the warnings really bother you, you could create a single stub DataSource and provide it on every response. Note that you most likely will find reasons to create real DataSources in the future, such as Export or validation.

        Comment

        Working...
        X