Announcement

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

    [WARN] Malformed JSNI reference 'constructor'; expect subsequent failures

    When my application start. gwt development shell report many warn like below

    [WARN] Malformed JSNI reference 'constructor'; expect subsequent failures
    java.lang.NoSuchFieldError: constructor
    at com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getDispId(CompilingClassLoader.java:119)
    at com.google.gwt.dev.shell.CompilingClassLoader.getDispId(CompilingClassLoader.java:531)
    at com.google.gwt.dev.shell.ie.IDispatchProxy.getIDsOfNames(IDispatchProxy.java:124)
    at com.google.gwt.dev.shell.ie.IDispatchImpl.GetIDsOfNames(IDispatchImpl.java:273)
    at com.google.gwt.dev.shell.ie.IDispatchImpl.method5(IDispatchImpl.java:189)
    at org.eclipse.swt.internal.ole.win32.COMObject.callback5(COMObject.java:108)
    at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method)
    at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:64)
    at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:493)
    at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:417)
    at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow(ModuleSpaceIE6.java:67)
    at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke(ModuleSpaceIE6.java:152)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:447)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:248)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.smartgwt.client.widgets.BaseWidget.draw(BaseWidget.java)
    at com.mimu.client.Yoda.onModuleLoad(Yoda.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:320)
    at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:329)
    at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300(BrowserWidgetIE6.java:37)
    at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:76)
    at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:139)
    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.GWTShell.pumpEventLoop(GWTShell.java:720)
    at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
    at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)

    #2
    This is a harmless message and can be ignored. I had investigated the cause and determined why this is being reported. It occurs in host mode only and can be safely ignored. Will look into getting rid of this annoyance in the next release.

    Comment


      #3
      Not quite harmless as in my case because of this warning gwt does not free memory so after some page refreshes in hosted mode browser(only) used memory easily passes 500Mb.
      discussion about this in here: http://forums.smartclient.com/showthread.php?t=3739

      Comment


        #4
        Have you tried setting the GWTShell -logLevel to ERROR and confirmed that it doesn't exhibit this behavior?

        Sanjiv

        Comment


          #5
          stack overflow at line 0

          I'm getting the same error plus stack overflow at line 0 running in hosted mode. Setting log level to ERROR doesn't fix it. I'm running in eclipse.
          any ideas?
          thanks
          Max

          Comment


            #6
            Originally posted by maxradin
            I'm getting the same error plus stack overflow at line 0 running in hosted mode. Setting log level to ERROR doesn't fix it. I'm running in eclipse.
            any ideas?
            thanks
            Max
            Can you post a simplified test case where you get the "stack overflow at line 0 "? Is this only in host mode, or even in web mode? Which version / build of SmartGWT are you using?

            Sanjiv

            Comment


              #7
              Is this definately a warning that can be ignored? Not that i'm Small Business Insurance you but last time when someone said that a warning could be ignored it crashed my computer eventually.

              I don't for one moment think that this is what will happen but just checkin.
              Last edited by nathan3011; 7 May 2009, 07:00.

              Comment


                #8
                temporarily resolved it

                a simple workaround:

                The stack trace told me it's the gwt class com.google.gwt.dev.shell.CompilingClassLoader, contained in gwt-dev-{platform}.jar
                1. copy the java source of CompilingClassLoader to somewhere, e.g. a own project
                2. comment that specific log message
                3. add the class/project onto the very first entry of your launcher classpath.

                No, it's really not a solution, thats simply a poor workaround


                It's line 119 in GWT 1.5.3
                Code:
                JsniRef parsed = JsniRef.parse(jsniMemberRef);
                      if (parsed == null) {
                    	//logger.log(TreeLogger.WARN, "WOOO Malformed JSNI reference '"
                        //    + jsniMemberRef + "'; expect subsequent failures",
                        //    new NoSuchFieldError(jsniMemberRef));
                        return -1;
                      }

                Comment


                  #9
                  I've checked in a change that should get rid of most of these warnings. Hosted mode should now run noticeably faster.

                  If you find the warning being reported, please try to identify to the relevant code in your application that is causing it and post it here.

                  Thanks,
                  Sanjiv

                  Comment


                    #10
                    Hello, I'm still getting the error after upgrading to smartgwt 1.1. (or should I try to checkout the dev version?)

                    The offending error is here:
                    Code:
                    	    dialogBox.addItem(form);
                    In this code:
                    Code:
                    	public MMCClientData(HTMLPane scroller) {
                    		this.scroller = scroller;		
                    		dialogBox = new Window();
                    		dialogBox.setTitle("Remote Procedure Call");
                    		dialogBox.setAutoSize(true);    
                    		dialogBox.setLeft(0);  
                    		dialogBox.setCanDragReposition(true);  
                    		dialogBox.setCanDragResize(true);  
                    		dialogBox.setSize("250", "150");
                    		dialogBox.setAutoCenter(true);
                    				
                    		Label label1 = new Label("InstitutionCode sent to server:");
                    		label1.setHeight("25");
                    		label1.setWidth100();		
                    		dialogBox.addItem(label1);
                    		
                    		textToServerLabel.setHeight("25");
                    		textToServerLabel.setWidth("100%");
                    		dialogBox.addItem(textToServerLabel);						
                    				
                    	    final DynamicForm form = new DynamicForm();
                    	    form.setWidth(250);
                    	    
                    	    final TextItem instField = new TextItem();
                    	    instField.setTitle("Institution Code");
                    	    instField.setRequired(true);
                    	    instField.setDefaultValue("RK");
                    		
                    	    form.setFields(new FormItem[] {instField});
                    	    
                    	    IButton submitButton = new IButton("Send to Server");
                    	    submitButton.addClickHandler(new ClickHandler() {
                    	        public void onClick(ClickEvent event) {
                    	        	setNameField(instField.getDisplayValue());
                    				System.out.println("Button sendNameToServer:" + getNameField());
                    				sendNameToServer();
                    	        }
                    	    });
                    	    dialogBox.addItem(form);
                    	    dialogBox.addItem(submitButton);
                    	}
                    Do you need the stacktrace?

                    Code:
                    [WARN] Malformed JSNI reference 'constructor'; expect subsequent failures
                    java.lang.NoSuchFieldError: constructor
                    	at com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getDispId(CompilingClassLoader.java:119)
                    	at com.google.gwt.dev.shell.CompilingClassLoader.getDispId(CompilingClassLoader.java:531)
                    	at com.google.gwt.dev.shell.ie.IDispatchProxy.getIDsOfNames(IDispatchProxy.java:124)
                    	at com.google.gwt.dev.shell.ie.IDispatchImpl.GetIDsOfNames(IDispatchImpl.java:273)
                    	at com.google.gwt.dev.shell.ie.IDispatchImpl.method5(IDispatchImpl.java:189)
                    	at org.eclipse.swt.internal.ole.win32.COMObject.callback5(COMObject.java:108)
                    	at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method)
                    	at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:64)
                    	at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:493)
                    	at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:417)
                    	at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow(ModuleSpaceIE6.java:67)
                    	at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke(ModuleSpaceIE6.java:152)
                    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:447)
                    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:228)
                    	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
                    	at com.smartgwt.client.widgets.form.DynamicForm.create(DynamicForm.java)
                    	at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:318)
                    	at com.smartgwt.client.widgets.Window.addItem(Window.java:1061)
                    	at ca.bccampus.mmcclient.client.MMCClientData.<init>(MMCClientData.java:93)
                    	at ca.bccampus.mmcclient.client.monitorcanvas.MonitorCanvas.<init>(MonitorCanvas.java:50)
                    	at ca.bccampus.mmcclient.client.MMCClient.onModuleLoad(MMCClient.java:73)
                    	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:585)
                    	at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:320)
                    	at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:329)
                    	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300(BrowserWidgetIE6.java:37)
                    	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:76)
                    	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:139)
                    	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.GWTShell.pumpEventLoop(GWTShell.java:720)
                    	at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
                    	at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)

                    Comment


                      #11
                      The change was made post 1.1. Pick up a nightly build.

                      Comment

                      Working...
                      X