4 Replies Latest reply on Jun 11, 2012 8:35 AM by beli.clarke

    NPE in .errai/BootstrapperImpl.java when creating view with a SimplePanel

    beli.clarke

      Hello,

       

       

      When the application tries to create a view object that contains

      only a SimplePanel with a Label, it fails with NPE.

       

       

      Application initialization succeeds. When the user requests

      application URL for the first time, the application creates

      all views. When creating one of them, it fails.

       

      What's interesting is that the application first succeeded with

      creation of this view. Then I changed the view definition

      to contain VerticalPanel with a label and button. At that

      moment, it started to fail with NPE. Even when I went back

      to the original view with just a SimplePanel containing

      a Label, the application still failed with the same NPE.

      All that happens in development mode which's started

      via mvn clean install gwt:run

       

       

      I'm using Errai CDI 2.0.0.Final with GWT 2.4.0.

       

       

      Here's the standard out:

       

       

      mvnsh(/):~/var/pkgs/test/ErraiCdiTest2> mvn clean install gwt:run

      [INFO] Scanning for projects...

      [INFO]

      [INFO] -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

      [INFO] Building ErraiCdiTest2 1.0-SNAPSHOT

      [INFO] -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

      [INFO]

      [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ ErraiCdiTest2 ---

      [INFO] Deleting /home/petrfiser/var/pkgs/test/ErraiCdiTest2/target

      [INFO] Deleting /home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/main/webapp/WEB-INF/classes

      [INFO] Deleting /home/petrfiser/var/pkgs/test/ErraiCdiTest2 (includes = [www-test/**, .gwt/**, .errai/**, src/main/webapp/app/**, src/main/webapp/WEB-INF/deploy/**, src/main/webapp/WEB-INF/lib/**, src/main/webapp/WEB-INF/classes/**, **/gwt-unitCache/**, **/*.JUnit/**], excludes = [])

      [INFO]

      [INFO] --- gwt-maven-plugin:2.4.0:clean (gwt-clean) @ ErraiCdiTest2 ---

      [INFO] auto discovered modules [pf.test.App]

      [INFO]

      [INFO] --- jacoco-gwt-maven-plugin:0.5.4.201202141554:prepare-agent (jacoco-gwt-prepare-agent) @ ErraiCdiTest2 ---

      [INFO] argLine set to -javaagent:/home/petrfiser/.m2/repository/org/jboss/errai/jacoco-gwt-maven-plugin/0.5.4.201202141554/jacoco-gwt-maven-plugin-0.5.4.201202141554.jar=snapshotDirectory=/home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/snapshot-classes,snapshotClassLoaders=*gwt* -javaagent:/home/petrfiser/.m2/repository/org/jacoco/org.jacoco.agent/0.5.4.201111111111/org.jacoco.agent-0.5.4.201111111111-runtime.jar=destfile=/home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/jacoco.exec

      [INFO]

      [INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ ErraiCdiTest2 ---

      [INFO] Using 'UTF-8' encoding to copy filtered resources.

      [INFO] Copying 6 resources

      [INFO]

      [INFO] --- gwt-maven-plugin:2.4.0:resources (gwt-compile) @ ErraiCdiTest2 ---

      [INFO] auto discovered modules [pf.test.App]

      [INFO] 23 source files from GWT module pf.test.App

      [INFO]

      [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ ErraiCdiTest2 ---

      [INFO] Compiling 23 source files to /home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/main/webapp/WEB-INF/classes

      [INFO]

      [INFO] --- maven-resources-plugin:2.4.1:testResources (default-testResources) @ ErraiCdiTest2 ---

      [INFO] Using 'UTF-8' encoding to copy filtered resources.

      [INFO] Copying 3 resources

      [INFO]

      [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ ErraiCdiTest2 ---

      [INFO] Compiling 2 source files to /home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/test-classes

      [INFO]

      [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ ErraiCdiTest2 ---

      [INFO] Tests are skipped.

      [INFO]

      [INFO] --- gwt-maven-plugin:2.4.0:compile (gwt-compile) @ ErraiCdiTest2 ---

      [INFO] auto discovered modules [pf.test.App]

      [INFO] Compiling module pf.test.App

      [ERROR] SLF4J: Class path contains multiple SLF4J bindings.

      [ERROR] SLF4J: Found binding in [jar:file:/home/petrfiser/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]

      [ERROR] SLF4J: Found binding in [jar:file:/home/petrfiser/.m2/repository/org/jboss/weld/servlet/weld-servlet/1.1.6.Final/weld-servlet-1.1.6.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]

      [ERROR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

      [INFO]    Scanning for additional dependencies: jar:file:/home/petrfiser/.m2/repository/org/jboss/errai/errai-ioc/2.0.0.Final/errai-ioc-2.0.0.Final.jar!/org/jboss/errai/ioc/client/Container.java

      [INFO]       Computing all possible rebind results for 'org.jboss.errai.ioc.client.Bootstrapper'

      [INFO]          Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]             Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]                Generating Extensions Bootstrapper...

      [INFO] INFO [IOCBootstrapGenerator] generating IOC bootstrapping class...

      [INFO] INFO [Reflections] Reflections took 1456 ms to scan 8 urls, producing 299 keys and 1046 values

      [INFO] INFO [Reflections] Reflections took 318 ms to scan 8 urls, producing 299 keys and 1046 values

      [INFO]                Checking ErraiApp.properties for configured types ...

      [INFO] INFO [IOCBootstrapGenerator] generated IOC bootstrapping class in 3161ms

      [INFO] INFO [IOCBootstrapGenerator] using IOC bootstrapping code at: /home/petrfiser/var/pkgs/test/ErraiCdiTest2/.errai/BootstrapperImpl.java

      [INFO]          Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]             Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]                Generating Extensions Bootstrapper...

      [INFO]          Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]             Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]                Generating Extensions Bootstrapper...

      [INFO]          Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]             Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]                Generating Extensions Bootstrapper...

      [INFO]          Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]             Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]                Generating Extensions Bootstrapper...

      [INFO]          Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]             Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]                Generating Extensions Bootstrapper...

      [INFO]    Scanning for additional dependencies: jar:file:/home/petrfiser/.m2/repository/org/jboss/errai/errai-marshalling/2.0.0.Final/errai-marshalling-2.0.0.Final.jar!/org/jboss/errai/marshalling/client/api/MarshallerFramework.java

      [INFO]       Computing all possible rebind results for 'org.jboss.errai.marshalling.client.api.MarshallerFactory'

      [INFO]          Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO]             Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator

      [INFO]                Generating Marshallers Bootstrapper...

      [INFO] INFO [MarshallerGeneratorFactory] generating marshalling class...

      [INFO] INFO [MarshallerGeneratorFactory] generated marshalling class in 313ms.

      [INFO] INFO [Generator] considering '/home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/main/webapp/WEB-INF/classes/' as module output path ...

      [INFO] INFO [Generator]    found '/home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/main/webapp/WEB-INF/classes' output directory

      [INFO] INFO [Generator] ** deposited marshaller class in : /home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/main/webapp/WEB-INF/classes

      [INFO] INFO [MarshallerGeneratorFactory] generating marshalling class...

      [INFO] INFO [MarshallerGeneratorFactory] generated marshalling class in 197ms.

      [INFO]          Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO]             Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator

      [INFO]                Generating Marshallers Bootstrapper...

      [INFO]          Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO]             Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator

      [INFO]                Generating Marshallers Bootstrapper...

      [INFO]          Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO]             Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator

      [INFO]                Generating Marshallers Bootstrapper...

      [INFO]          Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO]             Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator

      [INFO]                Generating Marshallers Bootstrapper...

      [INFO]          Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO]             Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator

      [INFO]                Generating Marshallers Bootstrapper...

      [INFO] INFO [RpcProxyLoaderGenerator] generating rpc proxy loader class.

      [INFO]    Compiling 6 permutations

      [INFO]       Compiling permutation 2...

      [INFO]       Process output

      [INFO]          Compiling

      [INFO]             Compiling permutation 5...

      [INFO]       Process output

      [INFO]          Compiling

      [INFO]             Compiling permutation 4...

      [INFO]       Process output

      [INFO]          Compiling

      [INFO]             Compiling permutation 1...

      [INFO]       Process output

      [INFO]          Compiling

      [INFO]             Compiling permutation 0...

      [INFO]       Process output

      [INFO]          Compiling

      [INFO]             Compiling permutation 3...

      [INFO]    Compile of permutations succeeded

      [INFO] Linking into /home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/ErraiCdiTest2-1.0-SNAPSHOT/app

      [INFO]    Link succeeded

      [INFO]    Compilation succeeded -- 38.952s

      [INFO]

      [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ ErraiCdiTest2 ---

      [INFO] Packaging webapp

      [INFO] Assembling webapp [ErraiCdiTest2] in [/home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/ErraiCdiTest2-1.0-SNAPSHOT]

      [INFO] Processing war project

      [INFO] Copying webapp webResources [/home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/jetty] to [/home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/ErraiCdiTest2-1.0-SNAPSHOT]

      [INFO] Copying webapp resources [/home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/main/webapp]

      [INFO] Webapp assembled in [145 msecs]

      [INFO] Building war: /home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/ErraiCdiTest2.war

      [INFO] WEB-INF/web.xml already added, skipping

      [INFO]

      [INFO] --- maven-install-plugin:2.3:install (default-install) @ ErraiCdiTest2 ---

      [INFO] Installing /home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/ErraiCdiTest2.war to /home/petrfiser/.m2/repository/pf/test/ErraiCdiTest2/1.0-SNAPSHOT/ErraiCdiTest2-1.0-SNAPSHOT.war

      [INFO]

      [INFO] --- jacoco-gwt-maven-plugin:0.5.4.201202141554:prepare-agent (jacoco-gwt-prepare-agent) @ ErraiCdiTest2 ---

      [INFO] argLine set to -javaagent:/home/petrfiser/.m2/repository/org/jboss/errai/jacoco-gwt-maven-plugin/0.5.4.201202141554/jacoco-gwt-maven-plugin-0.5.4.201202141554.jar=snapshotDirectory=/home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/snapshot-classes,snapshotClassLoaders=*gwt* -javaagent:/home/petrfiser/.m2/repository/org/jacoco/org.jacoco.agent/0.5.4.201111111111/org.jacoco.agent-0.5.4.201111111111-runtime.jar=destfile=/home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/jacoco.exec -javaagent:/home/petrfiser/.m2/repository/org/jboss/errai/jacoco-gwt-maven-plugin/0.5.4.201202141554/jacoco-gwt-maven-plugin-0.5.4.201202141554.jar=snapshotDirectory=/home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/snapshot-classes,snapshotClassLoaders=*gwt* -javaagent:/home/petrfiser/.m2/repository/org/jacoco/org.jacoco.agent/0.5.4.201111111111/org.jacoco.agent-0.5.4.201111111111-runtime.jar=destfile=/home/petrfiser/var/pkgs/test/ErraiCdiTest2/target/jacoco.exec

      [INFO]

      [INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ ErraiCdiTest2 ---

      [INFO] Using 'UTF-8' encoding to copy filtered resources.

      [INFO] Copying 6 resources

      [INFO]

      [INFO] --- gwt-maven-plugin:2.4.0:resources (gwt-compile) @ ErraiCdiTest2 ---

      [INFO] auto discovered modules [pf.test.App]

      [INFO] 23 source files from GWT module pf.test.App

      [INFO]

      [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ ErraiCdiTest2 ---

      [INFO] Nothing to compile - all classes are up to date

      [INFO]

      [INFO] --- gwt-maven-plugin:2.4.0:run (default-cli) @ ErraiCdiTest2 ---

      [INFO] create exploded Jetty webapp in /home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/main/webapp

      [INFO] auto discovered modules [pf.test.App]

      [ERROR] SLF4J: Class path contains multiple SLF4J bindings.

      [ERROR] SLF4J: Found binding in [jar:file:/home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/main/webapp/WEB-INF/lib/weld-servlet-1.1.6.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]

      [ERROR] SLF4J: Found binding in [jar:file:/home/petrfiser/var/pkgs/test/ErraiCdiTest2/src/main/webapp/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]

      [ERROR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

      [ERROR] Jun 08, 2012 12:48:18 PM org.jboss.weld.bootstrap.WeldBootstrap <clinit>

      [ERROR] INFO: WELD-000900 1.1.6 (Final)

      [ERROR] Jun 08, 2012 12:48:18 PM org.jboss.weld.bootstrap.WeldBootstrap startContainer

      [ERROR] INFO: WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.

      [ERROR] Jun 08, 2012 12:48:18 PM org.jboss.errai.cdi.server.CDIExtensionPoints beforeBeanDiscovery

      [ERROR] INFO: starting errai cdi ...

      [ERROR] Jun 08, 2012 12:48:18 PM org.jboss.errai.container.CDIServletStateListener contextInitialized

      [ERROR] INFO: Jetty detected, JSR-299 injection will be available in Servlets and Filters. Injection into Listeners is not supported.

      [ERROR] Jun 08, 2012 12:48:19 PM org.jboss.errai.reflections.Reflections scan

      [ERROR] INFO: Reflections took 530 ms to scan 7 urls, producing 300 keys and 1087 values

      [ERROR] Jun 08, 2012 12:48:19 PM org.jboss.errai.reflections.Reflections scan

      [ERROR] INFO: Reflections took 370 ms to scan 7 urls, producing 300 keys and 1087 values

      [ERROR] Jun 08, 2012 12:48:20 PM org.jboss.errai.bus.server.service.bootstrap.OrderedBootstrap execute

      [ERROR] INFO: starting errai bus ...

      [ERROR] Jun 08, 2012 12:48:20 PM org.jboss.errai.bus.server.service.bootstrap.DefaultComponents execute

      [ERROR] INFO: authentication adapter configured: org.jboss.errai.bus.server.security.auth.JAASAdapter

      [ERROR] Jun 08, 2012 12:48:20 PM org.jboss.errai.bus.server.service.bootstrap.DefaultComponents$2 configure

      [ERROR] INFO: using dispatcher implementation: org.jboss.errai.bus.server.SimpleDispatcher

      [ERROR] Jun 08, 2012 12:48:20 PM org.jboss.errai.bus.server.service.bootstrap.DefaultComponents$3 configure

      [ERROR] INFO: using session provider implementation: org.jboss.errai.bus.server.HttpSessionProvider

      [ERROR] Jun 08, 2012 12:48:20 PM org.jboss.errai.bus.server.service.bootstrap.LoadExtensions execute

      [ERROR] INFO: searching for errai extensions ...

      [ERROR] Jun 08, 2012 12:48:20 PM org.jboss.errai.bus.server.service.bootstrap.LoadExtensions execute

      [ERROR] INFO: found extension org.jboss.errai.tools.monitoring.MonitorExtension

      [ERROR] Jun 08, 2012 12:48:20 PM org.jboss.errai.bus.server.service.bootstrap.OrderedBootstrap execute

      [ERROR] INFO: errai bus started.

      [ERROR] SLF4J: Class path contains multiple SLF4J bindings.

      [ERROR] SLF4J: Found binding in [jar:file:/home/petrfiser/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]

      [ERROR] SLF4J: Found binding in [jar:file:/home/petrfiser/.m2/repository/org/jboss/weld/servlet/weld-servlet/1.1.6.Final/weld-servlet-1.1.6.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]

      [ERROR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

      [INFO] INFO [MarshallerGeneratorFactory] generating marshalling class...

      [INFO] INFO [Reflections] Reflections took 836 ms to scan 8 urls, producing 300 keys and 1087 values

      [INFO] INFO [Reflections] Reflections took 633 ms to scan 8 urls, producing 300 keys and 1087 values

      [INFO] INFO [MarshallerGeneratorFactory] generated marshalling class in 1886ms.

      [INFO] INFO [MarshallersGenerator] *** using temporary path: /tmp/errai/9b7aa5188f67a0ef791b4a2e7fbc823f816bb5d8ff76d59abb2856bb46218af/errai.marshalling/gen ***

      [INFO] INFO [MarshallerGeneratorFactory] generating marshalling class...

      [INFO] INFO [MarshallerGeneratorFactory] generated marshalling class in 186ms.

      [INFO] INFO [IOCBootstrapGenerator] generating IOC bootstrapping class...

      [INFO] INFO [IOCBootstrapGenerator] generated IOC bootstrapping class in 1553ms

      [INFO] INFO [IOCBootstrapGenerator] using IOC bootstrapping code at: /home/petrfiser/var/pkgs/test/ErraiCdiTest2/.errai/BootstrapperImpl.java

      [INFO] ApplicationController.ApplicationController:                      entering

      [INFO] ApplicationController.ApplicationController:                      exiting

      [INFO] LoginView.LoginView:                      entering

      [INFO] LoginView.LoginView:                       exiting

      [INFO] WelcomeView.WelcomeView:                       entering

      [ERROR] java.lang.NullPointerException

      [ERROR]           at org.jboss.errai.ioc.client.BootstrapperImpl$pf_test_client_shared_demo_ui_WelcomeView_inj1721_proxy.isAttached(BootstrapperImpl.java:93)

      [ERROR]           at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:474)

      [ERROR]           at com.google.gwt.user.client.ui.Composite.initWidget(Composite.java:160)

      [ERROR]           at pf.test.client.shared.demo.ui.WelcomeView.<init>(WelcomeView.java:25)

      [ERROR]           at org.jboss.errai.ioc.client.BootstrapperImpl$pf_test_client_shared_demo_ui_WelcomeView_inj1721_proxy.<init>(BootstrapperImpl.java:86)

      [ERROR]           at org.jboss.errai.ioc.client.BootstrapperImpl$6.getInstance(BootstrapperImpl.java:409)

      [ERROR]           at org.jboss.errai.ioc.client.BootstrapperImpl$6.getInstance(BootstrapperImpl.java:1)

      [ERROR]           at org.jboss.errai.ioc.client.BootstrapperImpl.bootstrapContainer(BootstrapperImpl.java:425)

      [ERROR]           at org.jboss.errai.ioc.client.Container.boostrapContainer(Container.java:48)

      [ERROR]           at org.jboss.errai.ioc.client.Container.onModuleLoad(Container.java:34)

      [ERROR]           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      [ERROR]           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      [ERROR]           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      [ERROR]           at java.lang.reflect.Method.invoke(Method.java:601)

      [ERROR]           at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)

      [ERROR]           at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)

      [ERROR]           at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)

      [ERROR]           at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)

      [ERROR]           at java.lang.Thread.run(Thread.java:722)

       

       

      The browser displayed the following:

       

       

      onModuleLoad() threw an exception

      Exception while loading module org.jboss.errai.ioc.client.Container. See Development Mode for details.

       

       

      java.lang.reflect.InvocationTargetException

                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:601)

                at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)

                at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)

                at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)

                at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)

                at java.lang.Thread.run(Thread.java:722)

      Caused by: java.lang.RuntimeException: critical error in IOC container bootstrap

                at org.jboss.errai.ioc.client.Container.boostrapContainer(Container.java:63)

                at org.jboss.errai.ioc.client.Container.onModuleLoad(Container.java:34)

                ... 9 more

      Caused by: java.lang.NullPointerException

                at org.jboss.errai.ioc.client.BootstrapperImpl$pf_test_client_shared_demo_ui_WelcomeView_inj1721_proxy.isAttached(BootstrapperImpl.java:93)

                at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:474)

                at com.google.gwt.user.client.ui.Composite.initWidget(Composite.java:160)

                at pf.test.client.shared.demo.ui.WelcomeView.(WelcomeView.java:26)

                at org.jboss.errai.ioc.client.BootstrapperImpl$pf_test_client_shared_demo_ui_WelcomeView_inj1721_proxy.(BootstrapperImpl.java:86)

                at org.jboss.errai.ioc.client.BootstrapperImpl$6.getInstance(BootstrapperImpl.java:409)

                at org.jboss.errai.ioc.client.BootstrapperImpl$6.getInstance(BootstrapperImpl.java:1)

                at org.jboss.errai.ioc.client.BootstrapperImpl.bootstrapContainer(BootstrapperImpl.java:425)

                at org.jboss.errai.ioc.client.Container.boostrapContainer(Container.java:48)

                ... 10 more

       

       

      Here's the view class at the beginning:

       

       

      package pf.test.client.shared.demo.ui;

       

       

      import com.google.gwt.user.client.ui.Composite;

      import com.google.gwt.user.client.ui.Label;

      import com.google.gwt.user.client.ui.VerticalPanel;

       

       

      import javax.enterprise.context.ApplicationScoped;

       

       

      /**

      */

      @ApplicationScoped

      public class WelcomeView extends Composite {

       

       

          // public methods ----------------------------------------------------------

          private Label nameLabel;

       

       

          // public constructors -----------------------------------------------------

          public WelcomeView() {

       

       

              System.out.println("WelcomeView.WelcomeView: \t\t  entering");

              VerticalPanel panel = new VerticalPanel();

              nameLabel = new Label();

              panel.add(nameLabel);

              System.out.println("WelcomeView.WelcomeView: \t\t label added to panel");

              initWidget(panel);

       

       

              System.out.println("WelcomeView.WelcomeView: \t\t  exiting");

          }

       

       

          // public methods ----------------------------------------------------------

          public void setName(String name) {

              nameLabel.setText("Welcome, " + name);

          }

       

       

      }

       

       

      (It will not be application scoped, but it worked this way for at least 10 compilations.)

      Here's the slightly more complicated version that started the permanent failure:

       

       

      package pf.test.client.shared.demo.ui;

       

       

      import com.google.gwt.event.dom.client.ClickEvent;

      import com.google.gwt.event.dom.client.ClickHandler;

      import com.google.gwt.user.client.ui.Button;

      import com.google.gwt.user.client.ui.Composite;

      import com.google.gwt.user.client.ui.Label;

      import com.google.gwt.user.client.ui.VerticalPanel;

      import pf.test.client.shared.demo.activity.WelcomeActivity;

       

       

      import javax.enterprise.context.ApplicationScoped;

       

       

      /**

      */

      @ApplicationScoped

      public class WelcomeView extends Composite {

       

       

          // public methods ----------------------------------------------------------

          private WelcomeActivity activity;

          private Label nameLabel;

       

       

          // public constructors -----------------------------------------------------

          public WelcomeView() {

       

       

              System.out.println("WelcomeView.WelcomeView: \t\t  entering");

              VerticalPanel panel = new VerticalPanel();

              nameLabel = new Label();

              panel.add(nameLabel);

              Button gotoAddress = new Button("Go to address");

              gotoAddress.addClickHandler(new ClickHandler() {

                  @Override

                  public void onClick(ClickEvent event) {

                      System.out.println("WelcomeView.onClick");

                      activity.gotoAddress();

                  }

              });

              panel.add(gotoAddress);

              initWidget(panel);

       

       

              System.out.println("WelcomeView.WelcomeView: \t\t  exiting");

          }

       

       

          // public methods ----------------------------------------------------------

          public void setActivity(WelcomeActivity activity) {

              this.activity = activity;

          }

       

       

          public void setName(String name) {

              nameLabel.setText("Welcome, " + name);

          }

       

       

      }

       

       

      Even when reverting to the previous view (which worked before), the

      compilation failed with NPE.

       

       

      Here's the POM:

       

       

      <?xml version="1.0" encoding="UTF-8"?>

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

        <modelVersion>4.0.0</modelVersion>

        <name>ErraiCdiTest2</name>

        <groupId>pf.test</groupId>

        <artifactId>ErraiCdiTest2</artifactId>

        <packaging>war</packaging>

       

       

        <version>1.0-SNAPSHOT</version>

       

       

        <properties>

          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

          <errai.version>2.0.0.Final</errai.version>

          <gwt.version>2.4.0</gwt.version>

          <weld.version>1.1.6.Final</weld.version>

          <gwt.maven.version>2.4.0</gwt.maven.version>

          <mvel.version>2.1.Beta8</mvel.version>

          <jetty.version>6.1.25</jetty.version>

          <slf4j.version>1.6.1</slf4j.version>

          <uel.impl.version>2.1.2-b04</uel.impl.version>

        </properties>

       

       

        <dependencies>

          <dependency>

            <groupId>javax.servlet</groupId>

            <artifactId>servlet-api</artifactId>

            <version>2.5</version>

            <scope>provided</scope>

          </dependency>

       

       

          <dependency>

            <groupId>javax.servlet</groupId>

            <artifactId>jsp-api</artifactId>

            <version>2.0</version>

            <scope>provided</scope>

          </dependency>

       

       

          <dependency>

            <groupId>log4j</groupId>

            <artifactId>log4j</artifactId>

            <version>1.2.16</version>

          </dependency>

       

       

          <dependency>

            <groupId>junit</groupId>

            <artifactId>junit</artifactId>

            <version>4.10</version>

            <scope>test</scope>

          </dependency>

       

       

          <dependency>

            <groupId>org.jboss.ejb3</groupId>

            <artifactId>jboss-ejb3-api</artifactId>

            <scope>provided</scope>

            <version>3.1.0</version>

          </dependency>

       

       

          <dependency>

            <groupId>javax.enterprise</groupId>

            <artifactId>cdi-api</artifactId>

            <scope>provided</scope>

            <version>1.0-SP4</version>

          </dependency>

       

       

          <!-- Errai Core -->

          <dependency>

            <groupId>org.jboss.errai</groupId>

            <artifactId>errai-bus</artifactId>

            <version>${errai.version}</version>

            <exclusions>

              <exclusion>

                <groupId>javax.inject</groupId>

                <artifactId>javax.inject</artifactId>

              </exclusion>

              <exclusion>

                <groupId>javax.annotation</groupId>

                <artifactId>jsr250-api</artifactId>

              </exclusion>

            </exclusions>

          </dependency>

          <dependency>

            <groupId>org.jboss.errai</groupId>

            <artifactId>errai-ioc</artifactId>

            <version>${errai.version}</version>

            <exclusions>

              <exclusion>

                <groupId>javax.inject</groupId>

                <artifactId>javax.inject</artifactId>

              </exclusion>

              <exclusion>

                <groupId>javax.annotation</groupId>

                <artifactId>jsr250-api</artifactId>

              </exclusion>

            </exclusions>

          </dependency>

          <dependency>

            <groupId>org.jboss.errai</groupId>

            <artifactId>errai-tools</artifactId>

            <version>${errai.version}</version>

          </dependency>

          <dependency>

            <groupId>org.mvel</groupId>

            <artifactId>mvel2</artifactId>

            <version>${mvel.version}</version>

          </dependency>

       

       

          <!-- CDI Integration Modules -->

          <dependency>

            <groupId>org.jboss.errai</groupId>

            <artifactId>errai-cdi-client</artifactId>

            <version>${errai.version}</version>

          </dependency>

       

       

          <dependency>

            <groupId>org.jboss.errai</groupId>

            <artifactId>errai-javax-enterprise</artifactId>

            <version>${errai.version}</version>

            <scope>provided</scope>

          </dependency>

       

       

          <dependency>

            <groupId>org.jboss.errai</groupId>

            <artifactId>errai-weld-integration</artifactId>

            <version>${errai.version}</version>

          </dependency>

       

       

          <dependency>

            <groupId>org.jboss.errai</groupId>

            <artifactId>errai-cdi-jetty</artifactId>

            <version>${errai.version}</version>

          </dependency>

       

       

          <!-- CDI Development Utils -->

          <!-- This must be placed above com.google.gwt:gwt-dev to override the Jetty that is present there -->

          <dependency>

            <groupId>org.mortbay.jetty</groupId>

            <artifactId>jetty</artifactId>

            <version>${jetty.version}</version>

          </dependency>

       

       

          <dependency>

            <groupId>org.mortbay.jetty</groupId>

            <artifactId>jetty-plus</artifactId>

            <version>${jetty.version}</version>

          </dependency>

       

       

          <dependency>

            <groupId>org.mortbay.jetty</groupId>

            <artifactId>jetty-naming</artifactId>

            <version>${jetty.version}</version>

          </dependency>

       

       

          <!-- Weld Modules -->

          <dependency>

            <groupId>org.jboss.weld.se</groupId>

            <artifactId>weld-se-core</artifactId>

            <version>${weld.version}</version>

          </dependency>

       

       

          <dependency>

            <groupId>org.jboss.weld.servlet</groupId>

            <artifactId>weld-servlet</artifactId>

            <version>${weld.version}</version>

          </dependency>

       

       

          <!-- GWT and GWT Extensions -->

          <dependency>

            <groupId>com.google.gwt</groupId>

            <artifactId>gwt-user</artifactId>

            <version>${gwt.version}</version>

            <scope>provided</scope>

          </dependency>

       

       

          <!-- Runtime / Container dependencies -->

          <dependency>

            <groupId>org.slf4j</groupId>

            <artifactId>slf4j-api</artifactId>

            <version>${slf4j.version}</version>

          </dependency>

       

       

          <dependency>

            <groupId>org.jboss.logging</groupId>

            <artifactId>jboss-logging</artifactId>

            <version>3.0.0.Beta4</version>

          </dependency>

        </dependencies>

       

       

        <profiles>

          <profile>

            <id>jetty</id>

            <activation>

              <activeByDefault>true</activeByDefault>

            </activation>

            <properties>

              <webDescriptor>jetty</webDescriptor>

            </properties>

            <dependencies>

              <!-- We need this for CDI BeanManager to work in Dev Mode -->

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-naming</artifactId>

                <version>${jetty.version}</version>

                <scope>compile</scope>

              </dependency>

            </dependencies>

          </profile>

       

       

          <profile>

            <!-- It's required that Jetty's plus option is enabled (OPTIONS=plus,..) -->

            <id>jetty7+</id>

            <properties>

              <webDescriptor>jetty7+</webDescriptor>

            </properties>

            <dependencies>

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty</artifactId>

                <version>${jetty.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-plus</artifactId>

                <version>${jetty.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-naming</artifactId>

                <version>${jetty.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.eclipse.jetty</groupId>

                <artifactId>jetty-servlet</artifactId>

                <version>7.2.1.v20101111</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-cdi-jetty</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

            </dependencies>

          </profile>

       

       

          <profile>

            <id>jboss6</id>

            <properties>

              <webDescriptor>jboss6</webDescriptor>

            </properties>

            <dependencies>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-bus</artifactId>

                <exclusions>

                  <exclusion>

                    <groupId>org.slf4j</groupId>

                    <artifactId>slf4j-log4j12</artifactId>

                  </exclusion>

                  <exclusion>

                    <groupId>junit</groupId>

                    <artifactId>junit</artifactId>

                  </exclusion>

                  <exclusion>

                    <groupId>com.google.collections</groupId>

                    <artifactId>google-collections</artifactId>

                  </exclusion>

                  <exclusion>

                    <artifactId>javax.inject</artifactId>

                    <groupId>javax.inject</groupId>

                  </exclusion>

                </exclusions>

                <version>${errai.version}</version>

              </dependency>

       

       

              <!-- Exclude all the stuff provided by AS6 -->

              <dependency>

                <groupId>javax.inject</groupId>

                <artifactId>javax.inject</artifactId>

                <version>1</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>javax.annotation</groupId>

                <artifactId>jsr250-api</artifactId>

                <version>1.0</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>log4j</groupId>

                <artifactId>log4j</artifactId>

                <version>1.2.16</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>dom4j</groupId>

                <artifactId>dom4j</artifactId>

                <version>1.6</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>xml-apis</groupId>

                <artifactId>xml-apis</artifactId>

                <version>1.0.b2</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.javassist</groupId>

                <artifactId>javassist</artifactId>

                <version>3.15.0-GA</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.slf4j</groupId>

                <artifactId>slf4j-api</artifactId>

                <scope>provided</scope>

                <version>${slf4j.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-ioc</artifactId>

                <exclusions>

                  <exclusion>

                    <artifactId>jsr250-api</artifactId>

                    <groupId>javax.annotation</groupId>

                  </exclusion>

                  <exclusion>

                    <artifactId>javax.inject</artifactId>

                    <groupId>javax.inject</groupId>

                  </exclusion>

                </exclusions>

                <scope>compile</scope>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-tools</artifactId>

                <scope>provided</scope>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-javax-enterprise</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <!-- exclude development tools -->

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-cdi-jetty</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld.servlet</groupId>

                <artifactId>weld-servlet</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld</groupId>

                <artifactId>weld-core</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld.se</groupId>

                <artifactId>weld-se-core</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld</groupId>

                <artifactId>weld-spi</artifactId>

                <scope>provided</scope>

                <version>1.1.Final</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty</artifactId>

                <version>${jetty.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-plus</artifactId>

                <scope>provided</scope>

                <version>${jetty.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-naming</artifactId>

                <scope>provided</scope>

                <version>${jetty.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.logging</groupId>

                <artifactId>jboss-logging</artifactId>

                <scope>provided</scope>

                <version>3.0.0.Beta4</version>

              </dependency>

            </dependencies>

          </profile>

       

       

          <profile>

            <id>jboss7</id>

            <properties>

              <webDescriptor>jboss7</webDescriptor>

            </properties>

       

       

            <dependencies>

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-bus</artifactId>

                <exclusions>

                  <exclusion>

                    <groupId>junit</groupId>

                    <artifactId>junit</artifactId>

                  </exclusion>

                  <exclusion>

                    <artifactId>javax.inject</artifactId>

                    <groupId>javax.inject</groupId>

                  </exclusion>

                </exclusions>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>xml-apis</groupId>

                <artifactId>xml-apis</artifactId>

                <version>1.0.b2</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.javassist</groupId>

                <artifactId>javassist</artifactId>

                <version>3.15.0-GA</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-tools</artifactId>

                <scope>provided</scope>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-javax-enterprise</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <!-- Exclude development tools -->

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-cdi-jetty</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld.servlet</groupId>

                <artifactId>weld-servlet</artifactId>

                <version>${weld.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld</groupId>

                <artifactId>weld-core</artifactId>

                <version>${weld.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld.se</groupId>

                <artifactId>weld-se-core</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <!-- Jetty is used for testing only -->

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty</artifactId>

                <version>${jetty.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-plus</artifactId>

                <scope>provided</scope>

                <version>${jetty.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-naming</artifactId>

                <scope>provided</scope>

                <version>${jetty.version}</version>

              </dependency>

            </dependencies>

          </profile>

       

       

          <!-- Begin OpenShift Express Profiles -->

          <profile>

            <id>openshift</id>

            <properties>

              <webDescriptor>jboss7</webDescriptor>

            </properties>

       

       

            <dependencies>

              <!-- All errai package are installed with the service archive -->

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-bus</artifactId>

                <exclusions>

       

       

                  <exclusion>

                    <groupId>junit</groupId>

                    <artifactId>junit</artifactId>

                  </exclusion>

       

       

                  <exclusion>

                    <artifactId>javax.inject</artifactId>

                    <groupId>javax.inject</groupId>

                  </exclusion>

                </exclusions>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>xml-apis</groupId>

                <artifactId>xml-apis</artifactId>

                <version>1.0.b2</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.javassist</groupId>

                <artifactId>javassist</artifactId>

                <version>3.15.0-GA</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.mvel</groupId>

                <artifactId>mvel2</artifactId>

                <version>${mvel.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-ioc</artifactId>

                <exclusions>

                  <exclusion>

                    <artifactId>jsr250-api</artifactId>

                    <groupId>javax.annotation</groupId>

                  </exclusion>

                  <exclusion>

                    <artifactId>javax.inject</artifactId>

                    <groupId>javax.inject</groupId>

                  </exclusion>

                </exclusions>

                <scope>compile</scope>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-tools</artifactId>

                <scope>provided</scope>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-cdi-client</artifactId>

                <version>${errai.version}</version>

                <!--<scope>provided</scope> -->

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-javax-enterprise</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-weld-integration</artifactId>

                <version>${errai.version}</version>

              </dependency>

              <!-- Exclude development tools -->

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-cdi-jetty</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <!-- Weld is installed within JBoss -->

              <dependency>

                <groupId>org.glassfish.web</groupId>

                <artifactId>el-impl</artifactId>

                <version>${uel.impl.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld.servlet</groupId>

                <artifactId>weld-servlet</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld</groupId>

                <artifactId>weld-core</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld.se</groupId>

                <artifactId>weld-se-core</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld</groupId>

                <artifactId>weld-spi</artifactId>

                <scope>provided</scope>

                <version>1.1.Final</version>

              </dependency>

       

       

              <!-- Jetty is used for testing only -->

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty</artifactId>

                <version>${jetty.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-plus</artifactId>

                <scope>provided</scope>

                <version>${jetty.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-naming</artifactId>

                <scope>provided</scope>

                <version>${jetty.version}</version>

              </dependency>

            </dependencies>

       

       

            <build>

              <plugins>

                <plugin>

                  <artifactId>maven-war-plugin</artifactId>

                  <version>2.1.1</version>

                  <configuration>

                    <warSourceDirectory>src/main/webapp/</warSourceDirectory>

                    <webappDirectory>src/main/webapp/</webappDirectory>

                    <webXml>src/jetty/web.xml</webXml>

                    <outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>

                    <packagingExcludes>**/javax/**/*.*,**/client/local/**/*.class</packagingExcludes>

                    <outputDirectory>deployments</outputDirectory>

                  </configuration>

                </plugin>

       

       

                <plugin>

                  <groupId>org.apache.maven.plugins</groupId>

                  <artifactId>maven-antrun-plugin</artifactId>

                  <version>1.2</version>

                  <executions>

                    <execution>

                      <id>jboss.package</id>

                      <phase>prepare-package</phase>

                      <configuration>

                        <tasks>

                          <copy file="src/jboss/web.xml" toDir="src/main/webapp/WEB-INF" overwrite="true" />

       

       

                          <delete file="src/main/webapp/WEB-INF/jetty-env.xml" />

                          <delete file="src/main/webapp/WEB-INF/classes/jndi.properties" />

       

       

                          <copy todir="src/main/webapp/app/">

                            <fileset dir="war.cache/app/" />

                          </copy>

                        </tasks>

                      </configuration>

                      <goals>

                        <goal>run</goal>

                      </goals>

                    </execution>

                  </executions>

                </plugin>

       

       

                <plugin>

                  <groupId>org.codehaus.mojo</groupId>

                  <artifactId>gwt-maven-plugin</artifactId>

                  <version>${gwt.maven.version}</version>

                  <configuration>

                    <skip>true</skip>

                  </configuration>

                </plugin>

              </plugins>

            </build>

          </profile>

       

       

          <profile>

            <id>openshift-prepare</id>

            <properties>

              <webDescriptor>jboss7</webDescriptor>

            </properties>

       

       

            <dependencies>

              <!-- All errai package are installed with the service archive -->

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-bus</artifactId>

                <exclusions>

       

       

                  <exclusion>

                    <groupId>junit</groupId>

                    <artifactId>junit</artifactId>

                  </exclusion>

       

       

                  <exclusion>

                    <artifactId>javax.inject</artifactId>

                    <groupId>javax.inject</groupId>

                  </exclusion>

                </exclusions>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>xml-apis</groupId>

                <artifactId>xml-apis</artifactId>

                <version>1.0.b2</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.javassist</groupId>

                <artifactId>javassist</artifactId>

                <version>3.15.0-GA</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.mvel</groupId>

                <artifactId>mvel2</artifactId>

                <version>${mvel.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-ioc</artifactId>

                <exclusions>

                  <exclusion>

                    <artifactId>jsr250-api</artifactId>

                    <groupId>javax.annotation</groupId>

                  </exclusion>

                  <exclusion>

                    <artifactId>javax.inject</artifactId>

                    <groupId>javax.inject</groupId>

                  </exclusion>

                </exclusions>

                <scope>compile</scope>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-tools</artifactId>

                <scope>provided</scope>

                <version>${errai.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-cdi-client</artifactId>

                <version>${errai.version}</version>

                <!--<scope>provided</scope> -->

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-javax-enterprise</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-weld-integration</artifactId>

                <version>${errai.version}</version>

              </dependency>

              <!-- Exclude development tools -->

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-cdi-jetty</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <!-- Weld is installed within JBoss -->

              <dependency>

                <groupId>org.glassfish.web</groupId>

                <artifactId>el-impl</artifactId>

                <version>${uel.impl.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld.servlet</groupId>

                <artifactId>weld-servlet</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld</groupId>

                <artifactId>weld-core</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld.se</groupId>

                <artifactId>weld-se-core</artifactId>

                <scope>provided</scope>

                <version>${weld.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.weld</groupId>

                <artifactId>weld-spi</artifactId>

                <scope>provided</scope>

                <version>1.1.Final</version>

              </dependency>

       

       

              <!-- Jetty is used for testing only -->

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty</artifactId>

                <version>${jetty.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-plus</artifactId>

                <scope>provided</scope>

                <version>${jetty.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-naming</artifactId>

                <scope>provided</scope>

                <version>${jetty.version}</version>

              </dependency>

            </dependencies>

       

       

            <build>

              <plugins>

                <plugin>

                  <artifactId>maven-war-plugin</artifactId>

                  <version>2.1.1</version>

                  <configuration>

                    <warSourceDirectory>war.cache</warSourceDirectory>

                    <webappDirectory>war.cache</webappDirectory>

                    <webXml>src/jetty/web.xml</webXml>

                    <outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>

                    <packagingExcludes>**/javax/**/*.*,**/client/local/**/*.class</packagingExcludes>

       

       

                    <archive>

                      <manifestEntries>

                        <Dependencies>org.jboss.as.naming,org.jboss.as.server,org.jboss.msc</Dependencies>

                      </manifestEntries>

                    </archive>

                  </configuration>

                </plugin>

       

       

                <plugin>

                  <groupId>org.apache.maven.plugins</groupId>

                  <artifactId>maven-antrun-plugin</artifactId>

                  <version>1.2</version>

                  <executions>

                    <execution>

                      <id>jboss.package</id>

                      <phase>prepare-package</phase>

                      <configuration>

                        <tasks>

                          <copy file="src/jboss/web.xml" toDir="src/main/webapp/WEB-INF" overwrite="true" />

       

       

                          <delete file="src/main/webapp/WEB-INF/jetty-env.xml" />

       

       

                          <delete file="src/main/webapp/WEB-INF/classes/jndi.properties" />

       

       

                          <copy todir="war.cache/app/">

                            <fileset dir="src/main/webapp/app/" />

                          </copy>

       

       

                          <exec executable="git">

                            <arg value="add" />

                            <arg value="war.cache" />

                          </exec>

       

       

                          <exec executable="git">

                            <arg value="commit" />

                            <arg value="-a" />

                            <arg value="-m" />

                            <arg value="'commit war.cache'" />

                          </exec>

       

       

                          <echo message="Openshift Prepared!" />

                        </tasks>

                      </configuration>

                      <goals>

                        <goal>run</goal>

                      </goals>

                    </execution>

                  </executions>

                </plugin>

              </plugins>

            </build>

          </profile>

       

       

          <!-- Begin Tomcat 6 and 7 support -->

          <profile>

            <id>tomcat</id>

            <properties>

              <webDescriptor>tomcat</webDescriptor>

            </properties>

          </profile>

       

       

          <!-- Profile that must be enabled when running integration tests (any test that extends GWTTestCase

            directly or indirectly) -->

          <profile>

            <id>integration-test</id>

            <properties>

              <profile.testOutputDirectory>src/main/webapp/WEB-INF/classes</profile.testOutputDirectory>

              <webDescriptor>jetty</webDescriptor>

            </properties>

       

       

            <build>

              <testResources>

                <testResource>

                  <directory>src/test/java</directory>

                </testResource>

                <testResource>

                  <directory>src/test/resources</directory>

                </testResource>

              </testResources>

              <plugins>

                <plugin>

                  <artifactId>maven-compiler-plugin</artifactId>

                  <configuration>

                    <source>1.6</source>

                    <target>1.6</target>

                  </configuration>

                </plugin>

                <plugin>

                  <artifactId>maven-surefire-plugin</artifactId>

                  <version>2.5</version>

                  <configuration>

                    <skipTests>false</skipTests>

                    <additionalClasspathElements>

                      <additionalClasspathElement>${basedir}/${profile.testOutputDirectory}/

                      </additionalClasspathElement>

                      <additionalClasspathElement>${basedir}/src/test/java/</additionalClasspathElement>

                      <additionalClasspathElement>${basedir}/src/main/java/</additionalClasspathElement>

                    </additionalClasspathElements>

                    <useManifestOnlyJar>false</useManifestOnlyJar>

                    <forkMode>pertest</forkMode>

       

       

                    <!-- Note: to run the test in a real browser, set -DargLine='-Dgwt.args="-runStyle Manual:1"' -->

                    <argLine>-Xmx2048m ${argLine}</argLine>

       

       

       

       

                    <systemProperties>

                      <!-- Must disable long polling for automated tests to succeed -->

                      <property>

                        <name>errai.hosted_mode_testing</name>

                        <value>true</value>

                      </property>

                      <property>

                        <name>gwt.args</name>

                        <value>-war src/main/webapp</value>

                      </property>

                    </systemProperties>

                  </configuration>

                </plugin>

              </plugins>

            </build>

       

       

            <dependencies>

              <dependency>

                <groupId>javax.servlet</groupId>

                <artifactId>servlet-api</artifactId>

                <version>2.5</version>

                <scope>provided</scope>

              </dependency>

              <dependency>

                <groupId>javax.servlet</groupId>

                <artifactId>jsp-api</artifactId>

                <version>2.0</version>

                <scope>provided</scope>

              </dependency>

              <dependency>

                <groupId>log4j</groupId>

                <artifactId>log4j</artifactId>

                <version>1.2.16</version>

              </dependency>

              <dependency>

                <groupId>junit</groupId>

                <artifactId>junit</artifactId>

                <version>4.8.1</version>

                <scope>compile</scope>

              </dependency>

              <dependency>

                <groupId>org.jboss.ejb3</groupId>

                <artifactId>jboss-ejb3-api</artifactId>

                <scope>provided</scope>

                <version>3.1.0</version>

              </dependency>

       

       

              <!-- Errai Core -->

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-bus</artifactId>

                <version>${errai.version}</version>

              </dependency>

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-ioc</artifactId>

                <version>${errai.version}</version>

                <exclusions>

                  <exclusion>

                    <groupId>javax.inject</groupId>

                    <artifactId>javax.inject</artifactId>

                  </exclusion>

                  <exclusion>

                    <groupId>javax.annotation</groupId>

                    <artifactId>jsr250-api</artifactId>

                  </exclusion>

                </exclusions>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-cdi-client</artifactId>

                <version>${errai.version}</version>

                <scope>compile</scope>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-tools</artifactId>

                <version>${errai.version}</version>

              </dependency>

              <dependency>

                <groupId>org.mvel</groupId>

                <artifactId>mvel2</artifactId>

                <version>${mvel.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-cdi-jetty</artifactId>

                <version>${errai.version}</version>

              </dependency>

       

       

              <!-- CDI Development Utils -->

              <!-- This must be placed above com.google.gwt:gwt-dev to override the Jetty that is present there -->

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty</artifactId>

                <version>${jetty.version}</version>

                <scope>compile</scope>

              </dependency>

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-plus</artifactId>

                <version>${jetty.version}</version>

                <scope>compile</scope>

              </dependency>

              <dependency>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jetty-naming</artifactId>

                <version>${jetty.version}</version>

                <scope>compile</scope>

              </dependency>

       

       

              <!-- Weld Modules -->

              <dependency>

                <groupId>org.jboss.weld.se</groupId>

                <artifactId>weld-se-core</artifactId>

                <version>${weld.version}</version>

                <scope>compile</scope>

              </dependency>

              <dependency>

                <groupId>org.jboss.weld.servlet</groupId>

                <artifactId>weld-servlet</artifactId>

                <version>${weld.version}</version>

                <scope>compile</scope>

              </dependency>

              <dependency>

                <groupId>org.glassfish.web</groupId>

                <artifactId>el-impl</artifactId>

                <scope>runtime</scope>

                <version>2.1.2-b04</version>

              </dependency>

       

       

              <!-- GWT and GWT Extensions -->

              <dependency>

                <groupId>com.google.gwt</groupId>

                <artifactId>gwt-user</artifactId>

                <version>${gwt.version}</version>

                <scope>compile</scope>

              </dependency>

       

       

              <dependency>

                <groupId>com.google.gwt</groupId>

                <artifactId>gwt-dev</artifactId>

                <version>${gwt.version}</version>

                <scope>compile</scope>

              </dependency>

       

       

              <dependency>

                <groupId>javax.validation</groupId>

                <artifactId>validation-api</artifactId>

                <version>1.0.0.GA</version>

                <scope>compile</scope>

              </dependency>

       

       

              <dependency>

                <groupId>javax.validation</groupId>

                <artifactId>validation-api</artifactId>

                <version>1.0.0.GA</version>

                <classifier>sources</classifier>

                <scope>compile</scope>

              </dependency>

       

       

              <!-- Runtime / Container dependencies -->

              <dependency>

                <groupId>org.slf4j</groupId>

                <artifactId>slf4j-api</artifactId>

                <version>${slf4j.version}</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss</groupId>

                <artifactId>jboss-common-core</artifactId>

                <version>2.2.14.GA</version>

              </dependency>

       

       

              <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-javax-enterprise</artifactId>

                <version>${errai.version}</version>

                <scope>provided</scope>

              </dependency>

       

       

            </dependencies>

          </profile>

        </profiles>

        <build>

          <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>

       

       

          <plugins>

            <plugin>

              <groupId>org.codehaus.mojo</groupId>

              <artifactId>gwt-maven-plugin</artifactId>

              <version>${gwt.maven.version}</version>

              <configuration>

                <logLevel>INFO</logLevel>

                <runTarget>App.html</runTarget>

                <extraJvmArgs>-Xmx512m</extraJvmArgs>

                <soyc>false</soyc>

                <hostedWebapp>src/main/webapp/</hostedWebapp>

                <server>org.jboss.errai.cdi.server.gwt.JettyLauncher</server>

              </configuration>

              <executions>

                <execution>

                  <id>gwt-clean</id>

                  <phase>clean</phase>

                  <goals>

                    <goal>clean</goal>

                  </goals>

                </execution>

                <execution>

                  <id>gwt-compile</id>

                  <goals>

                    <goal>resources</goal>

                    <goal>compile</goal>

                  </goals>

                </execution>

              </executions>

            </plugin>

            <plugin>

              <artifactId>maven-war-plugin</artifactId>

              <version>2.1.1</version>

              <configuration>

                <warName>${project.artifactId}</warName>

                <outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>

                <packagingExcludes>**/javax/**/*.*,**/client/local/**/*.class</packagingExcludes>

       

       

                <webResources>

                  <resource>

                    <!-- this is relative to the pom.xml directory -->

                    <directory>src/${webDescriptor}</directory>

                  </resource>

                </webResources>

              </configuration>

            </plugin>

       

       

            <!-- Tests are skipped by default because they require additional GWT dependencies. Run mvn with

              -Pintegration-test to enable testing. -->

            <plugin>

              <artifactId>maven-surefire-plugin</artifactId>

              <version>2.5</version>

              <configuration>

                <skipTests>true</skipTests>

              </configuration>

            </plugin>

       

       

            <plugin>

              <artifactId>maven-compiler-plugin</artifactId>

              <version>2.3.2</version>

              <configuration>

                <source>1.6</source>

                <target>1.6</target>

              </configuration>

            </plugin>

       

       

            <plugin>

              <groupId>org.jboss.errai</groupId>

              <artifactId>jacoco-gwt-maven-plugin</artifactId>

              <version>0.5.4.201202141554</version>

       

       

              <executions>

                <execution>

                  <id>jacoco-gwt-prepare-agent</id>

                  <phase>initialize</phase>

                  <goals>

                    <goal>prepare-agent</goal>

                  </goals>

                </execution>

                <execution>

                  <id>jacoco-gwt-report</id>

                  <phase>site</phase>

                  <goals>

                    <goal>report</goal>

                  </goals>

                </execution>

              </executions>

            </plugin>

       

       

            <plugin>

              <artifactId>maven-clean-plugin</artifactId>

              <version>2.4.1</version>

              <configuration>

                <filesets>

                  <fileset>

                    <directory>${basedir}</directory>

                    <includes>

                      <include>www-test/**</include>

                      <include>.gwt/**</include>

                      <include>.errai/**</include>

                      <include>src/main/webapp/app/**</include>

                      <include>src/main/webapp/WEB-INF/deploy/**</include>

                      <include>src/main/webapp/WEB-INF/lib/**</include>

                      <include>src/main/webapp/WEB-INF/classes/**</include>

                      <include>**/gwt-unitCache/**</include>

                      <include>**/*.JUnit/**</include>

                    </includes>

                  </fileset>

                </filesets>

              </configuration>

            </plugin>

          </plugins>

       

       

          <pluginManagement>

            <plugins>

              <!-- commented out by pf

              <plugin>

                <groupId>org.eclipse.m2e</groupId>

                <artifactId>lifecycle-mapping</artifactId>

                <version>1.0.0</version>

                <configuration>

                  <lifecycleMappingMetadata>

                    <pluginExecutions>

                      <pluginExecution>

                        <pluginExecutionFilter>

                          <groupId>org.codehaus.mojo</groupId>

                          <artifactId>gwt-maven-plugin</artifactId>

                          <versionRange>[2.3.0,)</versionRange>

                          <goals>

                            <goal>resources</goal>

                          </goals>

                        </pluginExecutionFilter>

                        <action>

                          <execute />

                        </action>

                      </pluginExecution>

                      <pluginExecution>

                        <pluginExecutionFilter>

                          <groupId>org.jboss.errai</groupId>

                          <artifactId>jacoco-gwt-maven-plugin</artifactId>

                          <versionRange>[0.0,)</versionRange>

                          <goals>

                            <goal>prepare-agent</goal>

                          </goals>

                        </pluginExecutionFilter>

                        <action>

                          <ignore />

                        </action>

                      </pluginExecution>

                    </pluginExecutions>

                  </lifecycleMappingMetadata>

                </configuration>

              </plugin>

              -->

            </plugins>

          </pluginManagement>

        </build>

       

       

        <!-- Repositories -->

        <repositories>

          <repository>

            <id>jboss-public-repository-group</id>

            <name>JBoss Public Maven Repository Group</name>

            <url>https://repository.jboss.org/nexus/content/groups/public/</url>

            <layout>default</layout>

            <releases>

              <updatePolicy>never</updatePolicy>

            </releases>

            <snapshots>

              <updatePolicy>never</updatePolicy>

            </snapshots>

          </repository>

        </repositories>

       

       

        <pluginRepositories>

          <pluginRepository>

            <id>jboss-public-repository-group</id>

            <name>JBoss Public Maven Repository Group</name>

            <url>https://repository.jboss.org/nexus/content/groups/public/</url>

            <layout>default</layout>

            <releases>

              <updatePolicy>never</updatePolicy>

            </releases>

            <snapshots>

              <updatePolicy>never</updatePolicy>

            </snapshots>

          </pluginRepository>

        </pluginRepositories>

       

       

        <!-- DistributionManagement -->

        <distributionManagement>

          <repository>

            <id>jboss-releases-repository</id>

            <name>JBoss Releases Repository</name>

            <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>

          </repository>

       

       

          <snapshotRepository>

            <id>jboss-snapshots-repository</id>

            <name>JBoss Snapshots Repository</name>

            <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>

          </snapshotRepository>

        </distributionManagement>

       

       

          <reporting>

              <plugins>

                  <plugin>

                      <groupId>org.codehaus.mojo</groupId>

                      <artifactId>findbugs-maven-plugin</artifactId>

                      <version>2.5</version>

                  </plugin>

              </plugins>

          </reporting>

       

       

      </project>

       

       

      Here's the generated $PROJECT_ROOT/.errai/BootstrapperImpl.java:

       

       

      package org.jboss.errai.ioc.client;

       

       

      import com.google.gwt.activity.shared.Activity;

      import com.google.gwt.activity.shared.ActivityMapper;

      import com.google.gwt.core.client.GWT;

      import com.google.gwt.core.client.RunAsyncCallback;

      import com.google.gwt.event.logical.shared.AttachEvent.Handler;

      import com.google.gwt.event.shared.GwtEvent;

      import com.google.gwt.event.shared.HandlerRegistration;

      import com.google.gwt.place.shared.Place;

      import com.google.gwt.place.shared.PlaceController;

      import com.google.gwt.user.client.Element;

      import com.google.gwt.user.client.Event;

      import com.google.gwt.user.client.ui.Widget;

      import java.lang.annotation.Annotation;

      import java.util.Set;

      import javax.inject.Provider;

      import org.jboss.errai.bus.client.api.Message;

      import org.jboss.errai.bus.client.framework.Subscription;

      import org.jboss.errai.common.client.api.extension.InitVotes;

      import org.jboss.errai.enterprise.client.cdi.AbstractCDIEventCallback;

      import org.jboss.errai.enterprise.client.cdi.CDIEventTypeLookup;

      import org.jboss.errai.enterprise.client.cdi.CDIProtocol;

      import org.jboss.errai.enterprise.client.cdi.EventProvider;

      import org.jboss.errai.enterprise.client.cdi.InstanceProvider;

      import org.jboss.errai.enterprise.client.cdi.api.CDI;

      import org.jboss.errai.ioc.client.api.ContextualTypeProvider;

      import org.jboss.errai.ioc.client.api.builtin.CallerProvider;

      import org.jboss.errai.ioc.client.api.builtin.DisposerProvider;

      import org.jboss.errai.ioc.client.api.builtin.IOCBeanManagerProvider;

      import org.jboss.errai.ioc.client.api.builtin.InitBallotProvider;

      import org.jboss.errai.ioc.client.api.builtin.MessageBusProvider;

      import org.jboss.errai.ioc.client.api.builtin.RequestDispatcherProvider;

      import org.jboss.errai.ioc.client.api.builtin.RootPanelProvider;

      import org.jboss.errai.ioc.client.api.builtin.SenderProvider;

      import org.jboss.errai.ioc.client.api.qualifiers.Any;

      import org.jboss.errai.ioc.client.api.qualifiers.BuiltInQualifiers;

      import org.jboss.errai.ioc.client.container.BeanRef;

      import org.jboss.errai.ioc.client.container.CreationalCallback;

      import org.jboss.errai.ioc.client.container.CreationalContext;

      import org.jboss.errai.ioc.client.container.DestructionCallback;

      import org.jboss.errai.ioc.client.container.IOCBeanManager;

      import org.jboss.errai.ioc.client.container.InitializationCallback;

      import org.jboss.errai.ioc.client.container.ProxyResolver;

      import pf.test.client.local.ApplicationController;

      import pf.test.client.shared.LoginValidationRequest;

      import pf.test.client.shared.LoginValidationResponse;

      import pf.test.client.shared.demo.activity.AddressActivity;

      import pf.test.client.shared.demo.activity.LoginActivity;

      import pf.test.client.shared.demo.activity.WelcomeActivity;

      import pf.test.client.shared.demo.mvp.ApplicationActivityMapper;

      import pf.test.client.shared.demo.ui.AddressView;

      import pf.test.client.shared.demo.ui.LoginView;

      import pf.test.client.shared.demo.ui.WelcomeView;

      import pf.test.client.shared.erraicdi.AppWorker;

      import pf.test.client.shared.erraicdi.ErraiCdi;

      import pf.test.client.shared.erraicdi.ErraiCdiAppWorker;

       

       

      public class BootstrapperImpl implements Bootstrapper {

        static class pf_test_client_shared_demo_mvp_ApplicationActivityMapper_inj1716_proxy extends ApplicationActivityMapper {

          private ApplicationActivityMapper $$_proxy_$$;

          public Activity getActivity(Place a0) {

            return $$_proxy_$$.getActivity(a0);

          }

       

       

          public int hashCode() {

            if ($$_proxy_$$ == null) {

              throw new IllegalStateException("call to hashCode() on an unclosed proxy.");

            } else {

              return $$_proxy_$$.hashCode();

            }

          }

       

       

          public boolean equals(Object o) {

            if ($$_proxy_$$ == null) {

              throw new IllegalStateException("call to equal() on an unclosed proxy.");

            } else {

              return $$_proxy_$$.equals(o);

            }

          }

       

       

          public void __$setProxiedInstance$(ApplicationActivityMapper proxy) {

            $$_proxy_$$ = proxy;

          }

        }

        static class pf_test_client_shared_demo_ui_WelcomeView_inj1721_proxy extends WelcomeView {

          private WelcomeView $$_proxy_$$;

          public void setName(String a0) {

            $$_proxy_$$.setName(a0);

          }

       

       

          public boolean isAttached() {

            return $$_proxy_$$.isAttached();

          }

       

       

          public void onBrowserEvent(Event a0) {

            $$_proxy_$$.onBrowserEvent(a0);

          }

       

       

          public HandlerRegistration addAttachHandler(Handler a0) {

            return $$_proxy_$$.addAttachHandler(a0);

          }

       

       

          public Widget asWidget() {

            return $$_proxy_$$.asWidget();

          }

       

       

          public void fireEvent(GwtEvent a0) {

            $$_proxy_$$.fireEvent(a0);

          }

       

       

          public Object getLayoutData() {

            return $$_proxy_$$.getLayoutData();

          }

       

       

          public Widget getParent() {

            return $$_proxy_$$.getParent();

          }

       

       

          public void removeFromParent() {

            $$_proxy_$$.removeFromParent();

          }

       

       

          public void setLayoutData(Object a0) {

            $$_proxy_$$.setLayoutData(a0);

          }

       

       

          public void sinkEvents(int a0) {

            $$_proxy_$$.sinkEvents(a0);

          }

       

       

          public boolean isVisible() {

            return $$_proxy_$$.isVisible();

          }

       

       

          public void setVisible(boolean a0) {

            $$_proxy_$$.setVisible(a0);

          }

       

       

          public String getStyleName() {

            return $$_proxy_$$.getStyleName();

          }

       

       

          public String getStylePrimaryName() {

            return $$_proxy_$$.getStylePrimaryName();

          }

       

       

          public void setStyleName(String a0, boolean a1) {

            $$_proxy_$$.setStyleName(a0, a1);

          }

       

       

          public void setStyleName(String a0) {

            $$_proxy_$$.setStyleName(a0);

          }

       

       

          public void setStylePrimaryName(String a0) {

            $$_proxy_$$.setStylePrimaryName(a0);

          }

       

       

          public void addStyleDependentName(String a0) {

            $$_proxy_$$.addStyleDependentName(a0);

          }

       

       

          public void addStyleName(String a0) {

            $$_proxy_$$.addStyleName(a0);

          }

       

       

          public int getAbsoluteLeft() {

            return $$_proxy_$$.getAbsoluteLeft();

          }

       

       

          public int getAbsoluteTop() {

            return $$_proxy_$$.getAbsoluteTop();

          }

       

       

          public Element getElement() {

            return $$_proxy_$$.getElement();

          }

       

       

          public int getOffsetHeight() {

            return $$_proxy_$$.getOffsetHeight();

          }

       

       

          public int getOffsetWidth() {

            return $$_proxy_$$.getOffsetWidth();

          }

       

       

          public String getTitle() {

            return $$_proxy_$$.getTitle();

          }

       

       

          public void removeStyleDependentName(String a0) {

            $$_proxy_$$.removeStyleDependentName(a0);

          }

       

       

          public void removeStyleName(String a0) {

            $$_proxy_$$.removeStyleName(a0);

          }

       

       

          public void setHeight(String a0) {

            $$_proxy_$$.setHeight(a0);

          }

       

       

          public void setPixelSize(int a0, int a1) {

            $$_proxy_$$.setPixelSize(a0, a1);

          }

       

       

          public void setSize(String a0, String a1) {

            $$_proxy_$$.setSize(a0, a1);

          }

       

       

          public void setStyleDependentName(String a0, boolean a1) {

            $$_proxy_$$.setStyleDependentName(a0, a1);

          }

       

       

          public void setTitle(String a0) {

            $$_proxy_$$.setTitle(a0);

          }

       

       

          public void setWidth(String a0) {

            $$_proxy_$$.setWidth(a0);

          }

       

       

          public void sinkBitlessEvent(String a0) {

            $$_proxy_$$.sinkBitlessEvent(a0);

          }

       

       

          public String toString() {

            return $$_proxy_$$.toString();

          }

       

       

          public void unsinkEvents(int a0) {

            $$_proxy_$$.unsinkEvents(a0);

          }

       

       

          public int hashCode() {

            if ($$_proxy_$$ == null) {

              throw new IllegalStateException("call to hashCode() on an unclosed proxy.");

            } else {

              return $$_proxy_$$.hashCode();

            }

          }

       

       

          public boolean equals(Object o) {

            if ($$_proxy_$$ == null) {

              throw new IllegalStateException("call to equal() on an unclosed proxy.");

            } else {

              return $$_proxy_$$.equals(o);

            }

          }

       

       

          public void __$setProxiedInstance$(WelcomeView proxy) {

            $$_proxy_$$ = proxy;

          }

        }

        private native static void pf_test_client_shared_demo_activity_AddressActivity_placeController(AddressActivity instance, PlaceController value) /*-{

          instance.@pf.test.client.shared.demo.activity.AddressActivity::placeController = value;

        }-*/;

       

       

        private native static void org_jboss_errai_ioc_client_api_builtin_DisposerProvider_beanManager(DisposerProvider instance, IOCBeanManager value) /*-{

          instance.@org.jboss.errai.ioc.client.api.builtin.DisposerProvider::beanManager = value;

        }-*/;

       

       

        private native static void pf_test_client_shared_demo_activity_LoginActivity_loginValidationRequestEvent(LoginActivity instance, javax.enterprise.event.Event value) /*-{

          instance.@pf.test.client.shared.demo.activity.LoginActivity::loginValidationRequestEvent = value;

        }-*/;

       

       

        private native static void pf_test_client_local_ApplicationController_appWorker(ApplicationController instance, AppWorker value) /*-{

          instance.@pf.test.client.local.ApplicationController::appWorker = value;

        }-*/;

       

       

        private native static void pf_test_client_shared_demo_activity_LoginActivity_placeController(LoginActivity instance, PlaceController value) /*-{

          instance.@pf.test.client.shared.demo.activity.LoginActivity::placeController = value;

        }-*/;

       

       

        private native static void pf_test_client_shared_demo_mvp_ApplicationActivityMapper_loginActivity(ApplicationActivityMapper instance, LoginActivity value) /*-{

          instance.@pf.test.client.shared.demo.mvp.ApplicationActivityMapper::loginActivity = value;

        }-*/;

       

       

        private native static void pf_test_client_shared_demo_activity_LoginActivity_loginView(LoginActivity instance, LoginView value) /*-{

          instance.@pf.test.client.shared.demo.activity.LoginActivity::loginView = value;

        }-*/;

       

       

        private native static void pf_test_client_shared_demo_activity_WelcomeActivity_welcomeView(WelcomeActivity instance, WelcomeView value) /*-{

          instance.@pf.test.client.shared.demo.activity.WelcomeActivity::welcomeView = value;

        }-*/;

       

       

        private native static void pf_test_client_shared_demo_mvp_ApplicationActivityMapper_welcomeActivity(ApplicationActivityMapper instance, WelcomeActivity value) /*-{

          instance.@pf.test.client.shared.demo.mvp.ApplicationActivityMapper::welcomeActivity = value;

        }-*/;

       

       

        private native static void pf_test_client_shared_demo_activity_WelcomeActivity_placeController(WelcomeActivity instance, PlaceController value) /*-{

          instance.@pf.test.client.shared.demo.activity.WelcomeActivity::placeController = value;

        }-*/;

       

       

        private native static void pf_test_client_local_ApplicationController_applicationActivityMapper(ApplicationController instance, ApplicationActivityMapper value) /*-{

          instance.@pf.test.client.local.ApplicationController::applicationActivityMapper = value;

        }-*/;

       

       

        private native static void pf_test_client_shared_demo_activity_AddressActivity_addressView(AddressActivity instance, AddressView value) /*-{

          instance.@pf.test.client.shared.demo.activity.AddressActivity::addressView = value;

        }-*/;

       

       

        // The main IOC bootstrap method.

        public BootstrapperInjectionContext bootstrapContainer() {

          CDIEventTypeLookup.get().addLookup("pf.test.client.shared.erraidemo.Response", "java.lang.Object");

          new CDI().__resetSubsystem();

          new CDI().initLookupTable(CDIEventTypeLookup.get());

          final BootstrapperInjectionContext injContext = new BootstrapperInjectionContext();

          final InitializationCallback<ErraiCdiAppWorker> init_inj1712_ErraiCdiAppWorker = new InitializationCallback<ErraiCdiAppWorker>() {

            public void init(final ErraiCdiAppWorker obj) {

              obj.setupHistoryHandling();

              obj.setupEventHandling();

              obj.setupUi();

            }

          };

          CreationalContext context = injContext.getRootContext();

          final CreationalCallback<ErraiCdiAppWorker> inj1713_ErraiCdiAppWorker_creationalCallback = new CreationalCallback<ErraiCdiAppWorker>() {

            public ErraiCdiAppWorker getInstance(final CreationalContext context) {

              Class beanType = ErraiCdiAppWorker.class;

              Annotation[] qualifiers = new Annotation[] { new ErraiCdi() {

                  public Class annotationType() {

                    return ErraiCdi.class;

                  }

                  public String toString() {

                    return "@pf.test.client.shared.erraicdi.ErraiCdi()";

                  }

              } };

              final ErraiCdiAppWorker inj1712_ErraiCdiAppWorker = new ErraiCdiAppWorker();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1712_ErraiCdiAppWorker);

              context.addInitializationCallback(inj1712_ErraiCdiAppWorker, init_inj1712_ErraiCdiAppWorker);

              return inj1712_ErraiCdiAppWorker;

            }

          };

          final InitializationCallback<ApplicationController> init_inj1714_ApplicationController = new InitializationCallback<ApplicationController>() {

            public void init(final ApplicationController obj) {

              obj.setup();

            }

          };

          final ErraiCdiAppWorker inj1712_ErraiCdiAppWorker = inj1713_ErraiCdiAppWorker_creationalCallback.getInstance(context);

          final CreationalCallback<ApplicationController> inj1715_ApplicationController_creationalCallback = new CreationalCallback<ApplicationController>() {

            public ApplicationController getInstance(final CreationalContext context) {

              Class beanType = ApplicationController.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final ApplicationController inj1714_ApplicationController = new ApplicationController();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1714_ApplicationController);

              final pf_test_client_shared_demo_mvp_ApplicationActivityMapper_inj1716_proxy inj1716_proxy = new pf_test_client_shared_demo_mvp_ApplicationActivityMapper_inj1716_proxy();

              context.addUnresolvedProxy(new ProxyResolver<ApplicationActivityMapper>() {

                public void resolve(ApplicationActivityMapper obj) {

                  inj1716_proxy.__$setProxiedInstance$(obj);

                  context.addProxyReference(inj1716_proxy, obj);

                }

              }, ApplicationActivityMapper.class, new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } });

              pf_test_client_local_ApplicationController_applicationActivityMapper(inj1714_ApplicationController, inj1716_proxy);

              pf_test_client_local_ApplicationController_appWorker(inj1714_ApplicationController, inj1712_ErraiCdiAppWorker);

              InitVotes.registerOneTimeInitCallback(new Runnable() {

                public void run() {

                  GWT.runAsync(new RunAsyncCallback() {

                    public void onFailure(Throwable throwable) {

                      throw new RuntimeException("failed to run asynchronously", throwable);

                    }

                    public void onSuccess() {

                      inj1714_ApplicationController.afterInitialization();

                    }

                  });

                }

              });

              context.addInitializationCallback(inj1714_ApplicationController, init_inj1714_ApplicationController);

              return inj1714_ApplicationController;

            }

          };

          final ApplicationController inj1714_ApplicationController = inj1715_ApplicationController_creationalCallback.getInstance(context);

          final CreationalCallback<LoginView> inj1718_LoginView_creationalCallback = new CreationalCallback<LoginView>() {

            public LoginView getInstance(final CreationalContext context) {

              Class beanType = LoginView.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final LoginView inj1717_LoginView = new LoginView();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1717_LoginView);

              return inj1717_LoginView;

            }

          };

          final LoginView inj1717_LoginView = inj1718_LoginView_creationalCallback.getInstance(context);

          final CreationalCallback<WelcomeActivity> inj1720_WelcomeActivity_creationalCallback = new CreationalCallback<WelcomeActivity>() {

            public WelcomeActivity getInstance(final CreationalContext context) {

              Class beanType = WelcomeActivity.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final WelcomeActivity inj1719_WelcomeActivity = new WelcomeActivity();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1719_WelcomeActivity);

              final pf_test_client_shared_demo_ui_WelcomeView_inj1721_proxy inj1721_proxy = new pf_test_client_shared_demo_ui_WelcomeView_inj1721_proxy();

              context.addUnresolvedProxy(new ProxyResolver<WelcomeView>() {

                public void resolve(WelcomeView obj) {

                  inj1721_proxy.__$setProxiedInstance$(obj);

                  context.addProxyReference(inj1721_proxy, obj);

                }

              }, WelcomeView.class, new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } });

              pf_test_client_shared_demo_activity_WelcomeActivity_welcomeView(inj1719_WelcomeActivity, inj1721_proxy);

              pf_test_client_shared_demo_activity_WelcomeActivity_placeController(inj1719_WelcomeActivity, inj1714_ApplicationController.getPlaceController());

              return inj1719_WelcomeActivity;

            }

          };

          final WelcomeActivity inj1719_WelcomeActivity = inj1720_WelcomeActivity_creationalCallback.getInstance(context);

          final CreationalCallback<EventProvider> inj1724_EventProvider_creationalCallback = new CreationalCallback<EventProvider>() {

            public EventProvider getInstance(final CreationalContext context) {

              Class beanType = EventProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final EventProvider inj1705_EventProvider = new EventProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1705_EventProvider);

              return inj1705_EventProvider;

            }

          };

          final EventProvider inj1705_EventProvider = inj1724_EventProvider_creationalCallback.getInstance(context);

          final CreationalCallback<MessageBusProvider> inj1725_MessageBusProvider_creationalCallback = new CreationalCallback<MessageBusProvider>() {

            public MessageBusProvider getInstance(final CreationalContext context) {

              Class beanType = MessageBusProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final MessageBusProvider inj1699_MessageBusProvider = new MessageBusProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1699_MessageBusProvider);

              return inj1699_MessageBusProvider;

            }

          };

          final MessageBusProvider inj1699_MessageBusProvider = inj1725_MessageBusProvider_creationalCallback.getInstance(context);

          final CreationalCallback<LoginActivity> inj1723_LoginActivity_creationalCallback = new CreationalCallback<LoginActivity>() {

            public LoginActivity getInstance(final CreationalContext context) {

              Class beanType = LoginActivity.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final LoginActivity inj1722_LoginActivity = new LoginActivity();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1722_LoginActivity);

              pf_test_client_shared_demo_activity_LoginActivity_loginView(inj1722_LoginActivity, inj1717_LoginView);

              pf_test_client_shared_demo_activity_LoginActivity_loginValidationRequestEvent(inj1722_LoginActivity, inj1705_EventProvider.provide(new Class[] { LoginValidationRequest.class }, null));

              pf_test_client_shared_demo_activity_LoginActivity_placeController(inj1722_LoginActivity, inj1714_ApplicationController.getPlaceController());

              final Subscription var1 = CDI.subscribe("pf.test.client.shared.LoginValidationResponse", new AbstractCDIEventCallback() {

                {

       

       

                }

                public void callback(final Message message) {

                  Set<String> msgQualifiers = message.get(Set.class, CDIProtocol.Qualifiers);

                  if (qualifierSet.equals(msgQualifiers) || ((msgQualifiers == null) && qualifierSet.isEmpty())) {

                    GWT.runAsync(new RunAsyncCallback() {

                      public void onFailure(Throwable throwable) {

                        throw new RuntimeException("failed to run asynchronously", throwable);

                      }

                      public void onSuccess() {

                        inj1722_LoginActivity.handleLoginValidationResponseEvent(message.get(LoginValidationResponse.class, CDIProtocol.BeanReference));

                      }

                    });

                  }

                }

                public String toString() {

                  return "Observer: pf.test.client.shared.LoginValidationResponse []";

                }

              });

              final Subscription var2 = inj1699_MessageBusProvider.get().subscribe("cdi.event:pf.test.client.shared.LoginValidationResponse", CDI.ROUTING_CALLBACK);

              context.addDestructionCallback(inj1722_LoginActivity, new DestructionCallback<LoginValidationResponse>() {

                public void destroy(final LoginValidationResponse obj) {

                  var1.remove();

                  var2.remove();

                }

              });

              return inj1722_LoginActivity;

            }

          };

          final LoginActivity inj1722_LoginActivity = inj1723_LoginActivity_creationalCallback.getInstance(context);

          final CreationalCallback<WelcomeView> inj1727_WelcomeView_creationalCallback = new CreationalCallback<WelcomeView>() {

            public WelcomeView getInstance(final CreationalContext context) {

              Class beanType = WelcomeView.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final WelcomeView inj1726_WelcomeView = new WelcomeView();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1726_WelcomeView);

              return inj1726_WelcomeView;

            }

          };

          final WelcomeView inj1726_WelcomeView = inj1727_WelcomeView_creationalCallback.getInstance(context);

          final CreationalCallback<ApplicationActivityMapper> inj1729_ApplicationActivityMapper_creationalCallback = new CreationalCallback<ApplicationActivityMapper>() {

            public ApplicationActivityMapper getInstance(final CreationalContext context) {

              Class beanType = ApplicationActivityMapper.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final ApplicationActivityMapper inj1728_ApplicationActivityMapper = new ApplicationActivityMapper();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1728_ApplicationActivityMapper);

              pf_test_client_shared_demo_mvp_ApplicationActivityMapper_loginActivity(inj1728_ApplicationActivityMapper, inj1722_LoginActivity);

              pf_test_client_shared_demo_mvp_ApplicationActivityMapper_welcomeActivity(inj1728_ApplicationActivityMapper, inj1719_WelcomeActivity);

              return inj1728_ApplicationActivityMapper;

            }

          };

          final ApplicationActivityMapper inj1728_ApplicationActivityMapper = inj1729_ApplicationActivityMapper_creationalCallback.getInstance(context);

          final CreationalCallback<RequestDispatcherProvider> inj1730_RequestDispatcherProvider_creationalCallback = new CreationalCallback<RequestDispatcherProvider>() {

            public RequestDispatcherProvider getInstance(final CreationalContext context) {

              Class beanType = RequestDispatcherProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final RequestDispatcherProvider inj1701_RequestDispatcherProvider = new RequestDispatcherProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1701_RequestDispatcherProvider);

              return inj1701_RequestDispatcherProvider;

            }

          };

          final RequestDispatcherProvider inj1701_RequestDispatcherProvider = inj1730_RequestDispatcherProvider_creationalCallback.getInstance(context);

          final CreationalCallback<IOCBeanManagerProvider> inj1731_IOCBeanManagerProvider_creationalCallback = new CreationalCallback<IOCBeanManagerProvider>() {

            public IOCBeanManagerProvider getInstance(final CreationalContext context) {

              Class beanType = IOCBeanManagerProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final IOCBeanManagerProvider inj1697_IOCBeanManagerProvider = new IOCBeanManagerProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1697_IOCBeanManagerProvider);

              return inj1697_IOCBeanManagerProvider;

            }

          };

          final IOCBeanManagerProvider inj1697_IOCBeanManagerProvider = inj1731_IOCBeanManagerProvider_creationalCallback.getInstance(context);

          final CreationalCallback<AddressView> inj1733_AddressView_creationalCallback = new CreationalCallback<AddressView>() {

            public AddressView getInstance(final CreationalContext context) {

              Class beanType = AddressView.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final AddressView inj1732_AddressView = new AddressView();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1732_AddressView);

              return inj1732_AddressView;

            }

          };

          final AddressView inj1732_AddressView = inj1733_AddressView_creationalCallback.getInstance(context);

          final CreationalCallback<InitBallotProvider> inj1734_InitBallotProvider_creationalCallback = new CreationalCallback<InitBallotProvider>() {

            public InitBallotProvider getInstance(final CreationalContext context) {

              Class beanType = InitBallotProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final InitBallotProvider inj1707_InitBallotProvider = new InitBallotProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1707_InitBallotProvider);

              return inj1707_InitBallotProvider;

            }

          };

          final InitBallotProvider inj1707_InitBallotProvider = inj1734_InitBallotProvider_creationalCallback.getInstance(context);

          final CreationalCallback<CallerProvider> inj1735_CallerProvider_creationalCallback = new CreationalCallback<CallerProvider>() {

            public CallerProvider getInstance(final CreationalContext context) {

              Class beanType = CallerProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final CallerProvider inj1709_CallerProvider = new CallerProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1709_CallerProvider);

              return inj1709_CallerProvider;

            }

          };

          final CallerProvider inj1709_CallerProvider = inj1735_CallerProvider_creationalCallback.getInstance(context);

          final CreationalCallback<SenderProvider> inj1736_SenderProvider_creationalCallback = new CreationalCallback<SenderProvider>() {

            public SenderProvider getInstance(final CreationalContext context) {

              Class beanType = SenderProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final SenderProvider inj1695_SenderProvider = new SenderProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1695_SenderProvider);

              return inj1695_SenderProvider;

            }

          };

          final SenderProvider inj1695_SenderProvider = inj1736_SenderProvider_creationalCallback.getInstance(context);

          final CreationalCallback<RootPanelProvider> inj1737_RootPanelProvider_creationalCallback = new CreationalCallback<RootPanelProvider>() {

            public RootPanelProvider getInstance(final CreationalContext context) {

              Class beanType = RootPanelProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final RootPanelProvider inj1703_RootPanelProvider = new RootPanelProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1703_RootPanelProvider);

              return inj1703_RootPanelProvider;

            }

          };

          final RootPanelProvider inj1703_RootPanelProvider = inj1737_RootPanelProvider_creationalCallback.getInstance(context);

          final CreationalCallback<AddressActivity> inj1739_AddressActivity_creationalCallback = new CreationalCallback<AddressActivity>() {

            public AddressActivity getInstance(final CreationalContext context) {

              Class beanType = AddressActivity.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final AddressActivity inj1738_AddressActivity = new AddressActivity();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1738_AddressActivity);

              pf_test_client_shared_demo_activity_AddressActivity_addressView(inj1738_AddressActivity, inj1732_AddressView);

              pf_test_client_shared_demo_activity_AddressActivity_placeController(inj1738_AddressActivity, inj1714_ApplicationController.getPlaceController());

              return inj1738_AddressActivity;

            }

          };

          final AddressActivity inj1738_AddressActivity = inj1739_AddressActivity_creationalCallback.getInstance(context);

          final CreationalCallback<InstanceProvider> inj1740_InstanceProvider_creationalCallback = new CreationalCallback<InstanceProvider>() {

            public InstanceProvider getInstance(final CreationalContext context) {

              Class beanType = InstanceProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final InstanceProvider inj1711_InstanceProvider = new InstanceProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1711_InstanceProvider);

              return inj1711_InstanceProvider;

            }

          };

          final InstanceProvider inj1711_InstanceProvider = inj1740_InstanceProvider_creationalCallback.getInstance(context);

          final CreationalCallback<DisposerProvider> inj1741_DisposerProvider_creationalCallback = new CreationalCallback<DisposerProvider>() {

            public DisposerProvider getInstance(final CreationalContext context) {

              Class beanType = DisposerProvider.class;

              Annotation[] qualifiers = new Annotation[] { new Any() {

                  public Class annotationType() {

                    return Any.class;

                  }

              } };

              final DisposerProvider inj1693_DisposerProvider = new DisposerProvider();

              BeanRef beanRef = context.getBeanReference(beanType, qualifiers);

              context.addBean(beanRef, inj1693_DisposerProvider);

              org_jboss_errai_ioc_client_api_builtin_DisposerProvider_beanManager(inj1693_DisposerProvider, inj1697_IOCBeanManagerProvider.get());

              return inj1693_DisposerProvider;

            }

          };

          final DisposerProvider inj1693_DisposerProvider = inj1741_DisposerProvider_creationalCallback.getInstance(context);

          injContext.addBean(ErraiCdiAppWorker.class, inj1713_ErraiCdiAppWorker_creationalCallback, inj1712_ErraiCdiAppWorker, new Annotation[] { new ErraiCdi() {

              public Class annotationType() {

                return ErraiCdi.class;

              }

              public String toString() {

                return "@pf.test.client.shared.erraicdi.ErraiCdi()";

              }

          } });

          injContext.addBean(AppWorker.class, inj1713_ErraiCdiAppWorker_creationalCallback, inj1712_ErraiCdiAppWorker, new Annotation[] { new ErraiCdi() {

              public Class annotationType() {

                return ErraiCdi.class;

              }

              public String toString() {

                return "@pf.test.client.shared.erraicdi.ErraiCdi()";

              }

          } });

          injContext.addBean(ApplicationController.class, inj1715_ApplicationController_creationalCallback, inj1714_ApplicationController, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(LoginView.class, inj1718_LoginView_creationalCallback, inj1717_LoginView, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(WelcomeActivity.class, inj1720_WelcomeActivity_creationalCallback, inj1719_WelcomeActivity, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(EventProvider.class, inj1724_EventProvider_creationalCallback, inj1705_EventProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(ContextualTypeProvider.class, inj1724_EventProvider_creationalCallback, inj1705_EventProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(MessageBusProvider.class, inj1725_MessageBusProvider_creationalCallback, inj1699_MessageBusProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(Provider.class, inj1725_MessageBusProvider_creationalCallback, inj1699_MessageBusProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(LoginActivity.class, inj1723_LoginActivity_creationalCallback, inj1722_LoginActivity, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(WelcomeView.class, inj1727_WelcomeView_creationalCallback, inj1726_WelcomeView, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(ApplicationActivityMapper.class, inj1729_ApplicationActivityMapper_creationalCallback, inj1728_ApplicationActivityMapper, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(ActivityMapper.class, inj1729_ApplicationActivityMapper_creationalCallback, inj1728_ApplicationActivityMapper, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(RequestDispatcherProvider.class, inj1730_RequestDispatcherProvider_creationalCallback, inj1701_RequestDispatcherProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(Provider.class, inj1730_RequestDispatcherProvider_creationalCallback, inj1701_RequestDispatcherProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(IOCBeanManagerProvider.class, inj1731_IOCBeanManagerProvider_creationalCallback, inj1697_IOCBeanManagerProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(Provider.class, inj1731_IOCBeanManagerProvider_creationalCallback, inj1697_IOCBeanManagerProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(AddressView.class, inj1733_AddressView_creationalCallback, inj1732_AddressView, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(InitBallotProvider.class, inj1734_InitBallotProvider_creationalCallback, inj1707_InitBallotProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(ContextualTypeProvider.class, inj1734_InitBallotProvider_creationalCallback, inj1707_InitBallotProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(CallerProvider.class, inj1735_CallerProvider_creationalCallback, inj1709_CallerProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(ContextualTypeProvider.class, inj1735_CallerProvider_creationalCallback, inj1709_CallerProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(SenderProvider.class, inj1736_SenderProvider_creationalCallback, inj1695_SenderProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(ContextualTypeProvider.class, inj1736_SenderProvider_creationalCallback, inj1695_SenderProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(RootPanelProvider.class, inj1737_RootPanelProvider_creationalCallback, inj1703_RootPanelProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(Provider.class, inj1737_RootPanelProvider_creationalCallback, inj1703_RootPanelProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(AddressActivity.class, inj1739_AddressActivity_creationalCallback, inj1738_AddressActivity, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(InstanceProvider.class, inj1740_InstanceProvider_creationalCallback, inj1711_InstanceProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(ContextualTypeProvider.class, inj1740_InstanceProvider_creationalCallback, inj1711_InstanceProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(DisposerProvider.class, inj1741_DisposerProvider_creationalCallback, inj1693_DisposerProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          injContext.addBean(ContextualTypeProvider.class, inj1741_DisposerProvider_creationalCallback, inj1693_DisposerProvider, BuiltInQualifiers.DEFAULT_QUALIFIERS);

          return injContext;

        }

      }

       

       

      Thanks.

        • 1. Re: NPE in .errai/BootstrapperImpl.java when creating view with a SimplePanel
          csa

          Hi,

           

          I have created a JIRA for this a couple of weeks ago: https://issues.jboss.org/browse/ERRAI-277

           

          Unfortunately, we haven't fixed this yet. As a workaround, you could try and initialize your widget/composite (WelcomeView) in an @PostConstruct method instead of the constructor, or use a @Produces method to provide the instance of the WelcomeView.

           

          Cheers,

          Christian

          • 2. Re: NPE in .errai/BootstrapperImpl.java when creating view with a SimplePanel
            cbrock

            A better solution is just to do everything you're doing in your constructor in a @PostConstruct method.

             

            @ApplicationScoped

            public class WelcomeView extends Composite {

             

             

                // public methods ----------------------------------------------------------

                private Label nameLabel;

                

                   @PostConstruct

                private void setupWidget() {

             

             

                    System.out.println("WelcomeView.WelcomeView: \t\t  entering");

                    VerticalPanel panel = new VerticalPanel();

                    nameLabel = new Label();

                    panel.add(nameLabel);

                    System.out.println("WelcomeView.WelcomeView: \t\t label added to panel");

                    initWidget(panel);

             

                    System.out.println("WelcomeView.WelcomeView: \t\t  exiting");

                }

             

             

                // public methods ----------------------------------------------------------

                public void setName(String name) {

                    nameLabel.setText("Welcome, " + name);

                }

            }

             

            The problem with GWT widgets is they call their own methods from their constructors -- this makes them not well-behaved beans. But if you build your custom widgets to set themselves up in the @PostCostruct, it should be fine. Although, you may want to use 2.0.1-SNAPSHOT as we have a fix regarding post-construct ordering.

            • 3. Re: NPE in .errai/BootstrapperImpl.java when creating view with a SimplePanel
              csa

              Just to clarify: This is exactly what I suggested above incl. a code example. The replies interleaved somehow .

              • 4. Re: NPE in .errai/BootstrapperImpl.java when creating view with a SimplePanel
                beli.clarke

                Thanks a lot for the clarification. I haven't noticed the ticket.