Announcement

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

    Exception caught: [Ljava.lang.Object; cannot be cast to ...RecordList

    There appears to be some kind of behaviour change with respect to CanvasItem and the storing of values. We upgraded to 5.1 and functionality that worked before is blowing up with the following exception.

    FF 24.8.1 ESR
    SmartClient Version: SNAPSHOT_v10.1d_2015-07-27/Pro Deployment (built 2015-07-27)

    Thanks

    Code:
    10:12:50.832 [ERROR] [xxxxx] onUncaughtException
    
    com.google.gwt.event.shared.UmbrellaException: Exception caught: [Ljava.lang.Object; cannot be cast to com.smartgwt.client.data.RecordList
        at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
        at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
        at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        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.invokeNativeObject(ModuleSpace.java:284)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
        at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        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.reactToMessages(BrowserChannelServer.java:293)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.smartgwt.client.data.RecordList
        at com.smartgwt.client.widgets.form.fields.FormItem.getValueAsRecordList(FormItem.java)
    ...
        at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:112)
        at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
        at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
        at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
        at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
        at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
        at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
        at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
        at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        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.invokeNativeObject(ModuleSpace.java:284)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
        at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        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.reactToMessages(BrowserChannelServer.java:293)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
        at java.lang.Thread.run(Unknown Source)
    Last edited by stonebranch2; 29 Jul 2015, 09:16.

    #2
    We need more information to figure out if this is a regression or bad usage that is now being caught.

    You seem to be calling getValueAsRecordList() but the field value is just a java.lang.Object.

    How did you populate the field value?

    What would you expect it to contain?

    What kind of FormItem is this?

    Is this a multiple:true item?

    Comment


      #3
      How did you populate the field value?
      What would you expect it to contain?
      > We are editing a record, of a particular datasource, where the field value is a "List<Map<String, Object>>".

      What is interesting is the CanvasItem has a ShowValueHandler and the data value on that event converts to a RecordList just fine.

      Code:
              addShowValueHandler(new ShowValueHandler() {
                  @Override
                  public void onShowValue(ShowValueEvent event) {
                      RecordList recordList = event.getDataValueAsRecordList();
                  }
              });
      What kind of FormItem is this?
      > Is it an extension of CanvasItem.

      Is this a multiple:true item?
      > Yes, it is.

      Comment


        #4
        It looks like you trimmed off a critical part of the stack trace with ... - could you show that part please?

        Comment


          #5
          Here is the missing stack trace section with some internal class names xxx'd out.

          Code:
          ...
          Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.smartgwt.client.data.RecordList
              at com.smartgwt.client.widgets.form.fields.FormItem.getValueAsRecordList(FormItem.java)
              at com.xxxxx.xxxxx.client.component.xxxxxItem.someCustomMethod(xxxxxItem.java:217)
              at com.xxxxx.xxxxx.client.component.form.xxxxxFormGenerator.preSaveCallback(xxxxxFormGenerator.java:350)
              at com.xxxxx.xxxxx.client.component.form.xxxxxFormGenerator.doSaveOperation(xxxxxFormGenerator.java:571)
              at com.xxxxx.xxxxx.client.component.form.xxxxxFormGenerator.doUpdateOperation(xxxxxFormGenerator.java:567)
              at com.xxxxx.xxxxx.client.component.form.xxxxxFormGenerator$6.onClick(xxxxxFormGenerator.java:560)
              at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:112)
              at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
          ...
          Regards

          Comment


            #6
            Hi Isomorphic,
            Do you have any updates on this issue? We have a number of product features blocked due to the change in behaviour after upgrading to 5.1.
            Thanks

            Comment


              #7
              At the moment, we don't have a way to reproduce the problem (initial attempts didn't work), and we were discussing some changes that would be a speculative fix. A test case would speed things along, as well as clarify whether this results from a usage error or not.

              Comment


                #8
                A quick follow up on this. We are now reproducing the problem and looking at how best to address it. We'll follow up when we have more information for you, probably Monday.

                Regards
                Isomorphic Software

                Comment


                  #9
                  Thank you for the follow up.

                  Comment


                    #10
                    Hi Isomorphic,
                    You had mentioned you were able to reproduce the issue and would be following up potentially last Monday. Wondering if you have any update on this as I have not heard anything since then.
                    Thanks

                    Comment


                      #11
                      We have made a change which we believe will address this issue. Please try the next nightly build dated Aug 18 or above.

                      Regards
                      Isomorphic Software

                      Comment


                        #12
                        Thank you, will do...

                        Comment


                          #13
                          Hi Isomorphic,
                          I haven't seen a build since 2015-08-16. Do you know when the next nightly build will be completed?
                          Thanks

                          Comment


                            #14
                            There was an instability which was leading to us having to suppress public builds for a few days.
                            At this stage, we believe we should have a new nightly build up tomorrow.

                            Regards
                            Isomorphic Software

                            Comment

                            Working...
                            X