Uploaded image for project: 'Errai'
  1. Errai
  2. ERRAI-679

Observing java.lang.Object on client leads to code overload in BootsrapperImpl

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.0.0.CR1
    • Component/s: None
    • Labels:
      None

      Description

      While trying to troubleshoot an UberFire ToolBar issue, I needed a way of logging all CDI events in sequence. So I added this method to my entry point bean:

      private void eventSnooper(@Observes Object anyEvent)

      { GWT.log("Event: " + anyEvent.getClass() + " " + anyEvent); }

      This caused the generated BootstrapperImpl to exceed the maximum method size. Here's the error that happened at rebind time:

      00:25:53.796 [ERROR] Failed to create an instance of 'org.jboss.errai.ioc.client.Bootstrapper' via deferred binding
      java.lang.Error: Unresolved compilation problem:
      The code of constructor BootstrapperImpl() is exceeding the 65535 bytes limit

      at org.jboss.errai.ioc.client.BootstrapperImpl.<init>(BootstrapperImpl.java:365)
      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.ModuleSpace.rebindAndCreate(ModuleSpace.java:475)
      at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
      at com.google.gwt.core.shared.GWT.create(GWT.java:57)
      at com.google.gwt.core.client.GWT.create(GWT.java:85)
      at org.jboss.errai.ioc.client.Container.bootstrapContainer(Container.java:62)
      at org.jboss.errai.ioc.client.Container.onModuleLoad(Container.java:39)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406)
      at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
      at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
      at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
      at java.lang.Thread.run(Thread.java:724)

      Note that we solved a similar problem with bean definitions in the past (ERRAI-346). Perhaps we can apply a similar solution to this problem.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                csa Christian Sadilek
                Reporter:
                jfuerth Jonathan Fuerth
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: