Announcement

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

    Unexpected null on the client from DataSource.getDataSource("realtime-data-source")

    SmartClient Version: SC_SNAPSHOT-2011-01-06/PowerEdition Deployment (built 2011-01-06)

    IE9

    I have been working on getting a DynamicDSGenerator working in my app, and all is good. Now in another part of the app, where no code changes have been made, I am not able to get a DataSource when I try to use it. It is a more traditional DataSource defined by a *.ds.xml file, and it's been stable and working in the app for quite some time, no changes.

    Now all of a sudden, when the call DataSource.getDataSource("realtime-data-source") is called, it returns a NULL. I see in my logfile on the server the DataSource is indeed loaded upon startup:

    Code:
    === 2013-05-15 12:42:08,956 [84-2] DEBUG XML - Parsed XML from C:\Documents and Settings\smitj01\My Documents\NetBeansProjects\dev\App\build\web\ds\realtime-data-source.ds.xml: 0ms
    One details is that my dynamic DataSource that is generated by my DynamicDSGenerator is called first and loads the dynamic DataSource just fine. Then when I go to the other part of the app, the simple call DataSource.getDataSource("realtime-data-source") returns NULL.

    The dynamic DataSource generated by DyanmicDSGenerator is not related to my other static realtime-data-source.ds.xml.

    Any thoughts?

    #2
    Another detail is this part of the application that is now suddenly having problems with DataSource.getDataSource() is running in a separately spawn browser window than the main app.

    To reiterate, this was working just fine before I began using DynamicDSGenerator to generate dynamic data sources.

    Comment


      #3
      Here is the error in the Console:
      [CODE]
      [ERROR] Uncaught exception escaped
      java.lang.NullPointerException: null
      at com.smartgwt.client.widgets.grid.ListGrid.setDataSource(ListGrid.java:12553)
      at com.ancerno.tz.client.ui.realtime.TradeDetail.activate(TradeDetail.java:341)
      at com.ancerno.tz.client.ui.realtime.TradeDetail$8.onSuccess(TradeDetail.java:221)
      at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:215)
      at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl(Request.java:264)
      at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch(Request.java:236)
      at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:227)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
      at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
      at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
      at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
      at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
      at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
      at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
      at com.google.gwt.dev.SwtHostedModeBase.processEvents(SwtHostedModeBase.java:264)
      at com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:557)
      at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
      at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
      [\CODE]

      this error is generated when ListGrid.setDataSource(ds) is called, and ds is NULL from DataSource ds = DataSource.getDataSource("realtime-data-source");

      Comment


        #4
        This FAQ has basic troubleshooting procedures for this.

        In *addition* to the above steps, since you think this might be related to your DynamicDSGenerator, be sure your code is returning null when it is asked for "realtime-data-source".

        Note also that "realtime-data-source" is not a valid DataSource ID (they must be identifiers, so "-" is not allowed). You should change this first, although it may or may not be the cause here.

        Comment

        Working...
        X