9 Replies Latest reply on Mar 24, 2013 4:06 AM by Charles Odili

    Annoying Errai Build Failures

    Charles Odili Apprentice

      Errai looks great, but am really wondering why I keep getting build errors and different stages of a project. Just this morning, am having build errors on a project that was "OK" just last night. All I added this morning was a @Remote interface and a class that implements it, which is then used with a Caller instance in my view class. I did all of this just like in the kitchensink sample, but guess it broke somthing because now the maven build process fails and the error trace does not even point to my code, but to some InternalCompilerException, like this : com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode

       

      Below is the error trace :

       

      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

      SLF4J: Defaulting to no-operation (NOP) logger implementation

      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

      [INFO] Scanning for projects...

      [INFO]                                                                        

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

      [INFO] Building UniTalk 0.0.1

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

      [INFO]

      [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ unitalk ---

      [debug] execute contextualize

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

      [INFO] Copying 3 resources

      [INFO]

      [INFO] --- gwt-maven-plugin:2.4.0:resources (default) @ unitalk ---

      [INFO] auto discovered modules [com.bitrunk.apps.unitalk.unitalk]

      [INFO] 29 source files from GWT module com.bitrunk.apps.unitalk.unitalk

      [INFO]

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

      [INFO] Compiling 4 source files to /home/dilim/workspace/unitalk/target/classes

      [INFO]

      [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ unitalk ---

      [debug] execute contextualize

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

      [INFO] Copying 0 resource

      [INFO]

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

      [INFO] Compiling 1 source file to /home/dilim/workspace/unitalk/target/test-classes

      [INFO]

      [INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ unitalk ---

      [INFO] Tests are skipped.

      [INFO]

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

      [INFO] auto discovered modules [com.bitrunk.apps.unitalk.unitalk]

      [WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts

      [INFO] Compiling module com.bitrunk.apps.unitalk.unitalk

      [INFO]    Validating newly compiled units

      [INFO]       Ignored 7 units with compilation errors in first pass.

      [INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.

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

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

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

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

      [INFO]                Generating Extensions Bootstrapper...

      [ERROR] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

      [ERROR] SLF4J: Defaulting to no-operation (NOP) logger implementation

      [ERROR] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

      [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]                Checking ErraiApp.properties for configured types ...

      [INFO]       Adding '2' new generated units

      [INFO]          Validating newly compiled units

      [INFO]             Ignored 1 unit with compilation errors in first pass.

      [INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.

      [INFO]    Scanning for additional dependencies: jar:file:/home/dilim/.m2/repository/org/jboss/errai/errai-marshalling/2.2.0.Final/errai-marshalling-2.2.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]    [ERROR] An internal compiler exception occurred

      [INFO] com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode

      [INFO]           at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:140)

      [INFO]           at com.google.gwt.dev.jjs.impl.TypeMap.internalGet(TypeMap.java:242)

      [INFO]           at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:138)

      [INFO]           at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:71)

      [INFO]           at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processExpression(GenerateJavaAST.java:1144)

      [INFO]           at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)

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

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

      [INFO]           at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispatch(GenerateJavaAST.java:577)

      [INFO]           at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessExpression(GenerateJavaAST.java:603)

      [INFO]           at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessStatement(GenerateJavaAST.java:632)

      [INFO]           at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processStatements(GenerateJavaAST.java:1846)

      [INFO]           at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processMethod(GenerateJavaAST.java:1513)

      [INFO]           at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processType(GenerateJavaAST.java:501)

      [INFO]           at com.google.gwt.dev.jjs.impl.GenerateJavaAST.exec(GenerateJavaAST.java:2958)

      [INFO]           at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:608)

      [INFO]           at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)

      [INFO]           at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)

      [INFO]           at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)

      [INFO]           at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)

      [INFO]           at com.google.gwt.dev.Compiler.run(Compiler.java:232)

      [INFO]           at com.google.gwt.dev.Compiler.run(Compiler.java:198)

      [INFO]           at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)

      [INFO]           at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)

      [INFO]           at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)

      [INFO]           at com.google.gwt.dev.Compiler.main(Compiler.java:177)

      [INFO]       [ERROR] <no source info>: public class com.bitrunk.apps.unitalk.server.RemoteGateway

      [INFO]           extends java.lang.Object

      [INFO]           implements : com.bitrunk.apps.unitalk.client.shared.InstitutionService

      [INFO] /*   fields   */

      [INFO] private [unresolved] Unresolved type java.util.logging.Logger log

      [INFO] private [unresolved] javax.persistence.EntityManager em

      [INFO] private [unresolved] Unresolved type javax.transaction.UserTransaction userTransaction

      [INFO] private [unresolved] Event<com.bitrunk.apps.unitalk.client.shared.Institution> newInstitutionEvt

      [INFO] /*   methods   */

      [INFO] [unresolved] public void <init>()

      [INFO] public void createInstitution(com.bitrunk.apps.unitalk.client.shared.Institution)

      [INFO] [unresolved] public List<com.bitrunk.apps.unitalk.client.shared.Institution> fetchInstitutions()

      [INFO]

      [INFO]

      [INFO]

      [INFO]          org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding

      [INFO]       [ERROR] at SchoolsManager.java(179): cloud.call(new RemoteCallback<Void>() {

      [INFO]   x() {

      [INFO]     super();

      [INFO]   }

      [INFO]   public @Override void callback(Void response) {

      [INFO]     entryForm.reset();

      [INFO]   }

      [INFO] }, new ErrorCallback() {

      [INFO]   x() {

      [INFO]     super();

      [INFO]   }

      [INFO]   public @Override boolean error(Message message, Throwable throwable) {

      [INFO]     GWT.log("error creating instituion");

      [INFO]     return false;

      [INFO]   }

      [INFO] }).createInstitution(schl)

      [INFO]          org.eclipse.jdt.internal.compiler.ast.MessageSend

      [INFO]       [ERROR] at SchoolsManager.java(172): private void handleSubmit();

      [INFO]

      [INFO]          com.google.gwt.dev.jjs.ast.JMethod

      [INFO]       [ERROR] at SchoolsManager.java(44): class SchoolsManager extends Object

      [INFO]          com.google.gwt.dev.jjs.ast.JClassType

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

      [INFO] BUILD FAILURE

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

      [INFO] Total time: 38.484s

      [INFO] Finished at: Thu Mar 07 10:45:13 WAT 2013

      [INFO] Final Memory: 39M/251M

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

      [ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.4.0:compile (default) on project unitalk

        • 1. Re: Annoying Errai Build Failures
          Charles Odili Apprentice

          I created a new errai kitchensink project with the jboss wizard, and added my code, now I have a deferred binding error:

           

          Here is my .gwt.xml module file:

           

          <module rename-to="unitalk">

              <inherits name="org.jboss.errai.common.ErraiCommon"/>

              <inherits name="org.jboss.errai.bus.ErraiBus"/>

              <inherits name="org.jboss.errai.ioc.Container"/>

              <inherits name="org.jboss.errai.enterprise.CDI"/>

             

              <inherits name="com.github.gwtbootstrap.Bootstrap" />

             

              <inherits name="org.hibernate.validator.HibernateValidator" />

              <inherits name="org.jboss.errai.databinding.DataBinding"/>

             

             

              <set-property name="user.agent" value="safari" />

           

           

          </module>

           

          And here is the error trace

           

          SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

          SLF4J: Defaulting to no-operation (NOP) logger implementation

          SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

          java.lang.RuntimeException: Deferred binding failed for 'org.jboss.errai.ioc.client.Bootstrapper' (did you forget to inherit a required module?)

                    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)

                    at com.google.gwt.core.client.GWT.create(GWT.java:97)

                    at org.jboss.errai.ioc.client.Container.bootstrapContainer(Container.java:55)

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

                    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: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)

                    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:503)

                    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)

                    ... 12 more

           

           

          Please its really urgent and am getting worried.

          • 2. Re: Annoying Errai Build Failures
            Charles Odili Apprentice

            Even a freh kitchensink demo project does not complie:

             

            Generating Marshallers Bootstrapper...

            [INFO]    Scanning for additional dependencies: /home/dilim/workspace/errai/target/.generated/org/jboss/tools/gwt/kitchensink/client/shared/_MemberValidator.java

            [INFO]       Adding '1' new generated units

            [INFO]          Validating newly compiled units

            [INFO]             Ignored 1 unit with compilation errors in first pass.

            [INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.

            [INFO]    [ERROR] Errors in '/home/dilim/workspace/errai/target/.generated/org/jboss/tools/gwt/kitchensink/client/shared/_MemberValidatorImpl.java'

            [INFO]       [ERROR] Line 435:  The method validate(GwtValidationContext<T>, Set<ConstraintViolation<T>>, Member, V, ConstraintValidator<A,? super V>, ConstraintDescriptorImpl<A>, Class<?>[]) in the type AbstractGwtSpecificValidator<Member> is not applicable for the arguments (GwtValidationContext<T>, Set<ConstraintViolation<T>>, Member, String, SizeValidatorForMap, ConstraintDescriptorImpl<Size>, Class<?>[])

            [INFO]       [ERROR] Line 458:  The method validate(GwtValidationContext<T>, Set<ConstraintViolation<T>>, Member, V, ConstraintValidator<A,? super V>, ConstraintDescriptorImpl<A>, Class<?>[]) in the type AbstractGwtSpecificValidator<Member> is not applicable for the arguments (GwtValidationContext<T>, Set<ConstraintViolation<T>>, Member, String, SizeValidatorForMap, ConstraintDescriptorImpl<Size>, Class<?>[])

            [INFO]       [ERROR] Line 480:  The method validate(GwtValidationContext<T>, Set<ConstraintViolation<T>>, Member, V, ConstraintValidator<A,? super V>, ConstraintDescriptorImpl<A>, Class<?>[]) in the type AbstractGwtSpecificValidator<Member> is not applicable for the arguments (GwtValidationContext<T>, Set<ConstraintViolation<T>>, Member, String, SizeValidatorForMap, ConstraintDescriptorImpl<Size>, Class<?>[])

            [INFO]    [ERROR] Cannot proceed due to previous errors

            • 3. Re: Annoying Errai Build Failures
              Thomas Frühbeck Newbie

              The kitchensink demo compiles w/o question: http://docs.jboss.org/errai/2.0.0.Final/errai/quickstart/html_single/#sid-21627124

              Just follow the description:

              mvn archetype:generate \

              -DarchetypeGroupId=org.jboss.errai.archetypes \

              -DarchetypeArtifactId=bus-quickstart \

              -DarchetypeVersion=2.0.0.Final \

              -DarchetypeRepository=https://repository.jboss.org/nexus/content/groups/public/

               

              From the errors you produced with you code I assume that you had

               

                   - Logger statements, not available on GWT,  see:  [INFO] private [unresolved] Unresolved type java.util.logging.Logger log

               

                   - used EntityManager w/o importing "org.jboss.errai.jpa.JPA" in your gwt.xml, see: [INFO] private [unresolved] javax.persistence.EntityManager em

               

              did you mean Client side JPA/WebStorage? perhaps you did not notice, that the code would be executed on client (browser) side?

              • 4. Re: Annoying Errai Build Failures
                Jonathan Fuerth Master

                I have some more information on this:

                 

                The error messages of the form:

                 

                Line 435:  The method validate(GwtValidationContext<T>, Set<ConstraintViolation<T>>, Member, V, ConstraintValidator<A,? super V>, ConstraintDescriptorImpl<A>, Class<?>[]) in the type AbstractGwtSpecificValidator<Member> is not applicable for the arguments (GwtValidationContext<T>, Set<ConstraintViolation<T>>, Member, String, SizeValidatorForMap, ConstraintDescriptorImpl<Size>, Class<?>[])

                 

                are caused by an incompatibility between GWT 2.4's JSR 303 (Bean Validation) implementation and some versions of JDK 7.

                 

                Through experimentation and previous bug reports, I believe these combinations do not work together:

                 

                GWT 2.4.0 with Oracle JDK 7u3

                GWT 2.4.0 with Oracle JDK 7u4

                GWT 2.4.0 with any version of OpenJDK 7 <= current (1.7.0_09)

                 

                And these combinations do work together:

                 

                GWT 2.4.0 with Oracle JDK 7u17

                GWT 2.5.1 with Oracle JDK 7u17

                GWT 2.5.1 with OpenJDK 1.7.0_09

                 

                Unfortunately, I have not been able to find any mention of this issue in the GWT issue tracker on code.google.com. But updating either to Oracle JDK 7u17 or to GWT 2.5.1 should fix this problem for you.

                 

                Another possibility is simply to wait for Errai 2.3.0, which updates our GWT dependency to 2.5.1. We expect to make a prerelease next week.

                 

                -Jonathan

                • 5. Re: Annoying Errai Build Failures
                  Charles Odili Apprentice

                  Thanks Jonathan, the jdk fix was really helpful, now I know errors are from my code and not from some unknown environmental factors. I have made significant progress with the kitchen sample I've been working with especially with insights from the errai-cdi-mvp demo code. However, I still have issues that need to be resolved.

                   

                  1. As with the errai-cdi-mvp demo code, I made my presenters @Dependent, but that resulted in my injection points (e.g @Inject HandlerManager eventBus, and @Inject Display display, within the presenter class) failing and giving me null pointer exceptions.

                   

                  2. I made the presenters @ApplicationScoped and the view classes (Composite sub-classes that implement the Display interface in a Presenter) @ApplicationScoped, and this resulted in

                       a. I could inject the presnters into my AppController which is itself @ApplicationScopped and is successfully injected into the entrypoint class.

                       b. I could inject the view objects into the presenters, but I had to use @Singlnton instead of @ApplicationScoped on some views before the injection actually worked, plus I had to use the actual view class instead           of the interface that the view implements (i.e @Inject ConsoleView instead of @Inject Display)

                       c. @Inject Caller<CloudService> within the @ApplicationScoped presenters are no longer null, but throw the infamous NoSubscribersToDeliverTo exception even when the client-side CloudService interface is           marked @Remote and implemented by a class marked with @Service and @ApplicationScoped just like in the demo samples. This error also comes up when I switch to the MessageBulder API

                   

                  My biggest issue right now is why I can't use the Caller<CloudService> API in the presenters without the NoSubscribersToDeliverTo error. The CloudService interface is @Remote and its implemneting class is @Service and @ApplictionScoped. A call using the injected Caller object like this callerService.call(callBack).getSchools(), works in the entry-point class (marked as @EntryPoint), but fails (with NoSubscribersToDeliverTo error) in the presenters which are @ApplicationScpoed.

                   

                  Thanks for any help with resolving these isseus.

                  • 6. Re: Annoying Errai Build Failures
                    Jonathan Fuerth Master

                    Hi Charles,

                     

                    Good to hear we're making progress.

                     

                    Let's tackle your remaining questions one at a time, starting with NoSubscribersToDeliverTo, since you've mentioned this is your biggest concern.

                     

                    When you get a NoSubscribersToDeliverTo exception on the client side, this means that something in the client code (either your direct use of the ClientMessageBus, a MessageBuilder.send(), a Caller<>.call(), or something else built on top of ErraiBus) has attempted to send a message to a bus topic that nothing is subscribed to.

                     

                    The client message bus supports both local subscribers and remote subscribers. Local subscribers exist in the client code itself, and are normally registered programmatically via a call to ClientMessageBus.subscribe().

                     

                    Remote subscribers (from the client's point of view) exist on the server, and the client learns about these subscribers when it federates with the remote bus. This normally happens automatically, right after the host page loads.

                     

                    In your case, you're having trouble using a Caller<>, so let's assume the subscriber you're trying to contact is a remote one. There are several possible causes; each one corresponds with a layer of abstraction within the bus itself:

                     

                    1. Remote communication may be explicitly disabled within the client app. Ensure you are not setting the JavaScript variable window.erraiBusRemoteCommunicationEnabled to false
                    2. The Errai Servlet may not be properly configured on the server side. Ensure you have configured the DefaultBlockingServlet to respond to all *.erraiBus requests in web.xml.
                    3. Your remote service interface may not be visible to Errai's server-side annotation scanner. Ensure that the class which implements the interface you're using with Caller<> is:
                      • annotated with @org.jboss.errai.bus.server.annotations.Service (double check your import statement: is it imported from the correct package?)
                      • in a classpath location that Errai will scan (there must be an ErraiApp.properties at the root of the classpath location–if your service class is under WEB-INF/classes, the file WEB-INF/classes/ErraiApp.properties must exist in the deployment; if the service is bundled in a jar under WEB-INF/lib, there must be an ErraiApp.properties in the root of that jar)
                      • If you are using CDI on the server side, you must have a WEB-INF/beans.xml file in your deployment
                      Also, if you are not using CDI on the server side, you must tell DefaultBlockingServlet to auto-discover services. Conversely, if you are using CDI on the server side, you must not tell DefaultBlockingServlet to auto-discover services.
                    4. Even if all of the above is working, you may simply be trying to use the Caller<> before bus federation has completed. Be sure any uses of Caller.call() at client app startup time are done in @AfterInitialization methods, not from within object constructors or @PostConstruct methods.

                    Hope this helps!

                     

                    -Jonathan

                    • 7. Re: Annoying Errai Build Failures
                      Charles Odili Apprentice

                      Thanks for the update. I've checked with the list you outlined, and everything is in order. Strangley, I no longer get the NoSubscribersToDeliverTo exception on Caller calls, but the calls do not execute, throwing another exception on the server. Here is the stack trace.

                       

                      18:31:52,333 ERROR [stderr] (http-localhost-127.0.0.1-8080-4) org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking endpoint

                      18:31:52,421 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback(ConversationalEndpointCallback.java:135)

                      18:31:52,422 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)

                      18:31:52,423 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:512)

                      18:31:52,423 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.client.framework.DeliveryPlan.deliver(DeliveryPlan.java:43)

                      18:31:52,425 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:632)

                      18:31:52,425 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)

                      18:31:52,426 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:94)

                      18:31:52,427 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:108)

                      18:31:52,428 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:117)

                      18:31:52,428 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

                      18:31:52,429 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                      18:31:52,429 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                      18:31:52,430 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                      18:31:52,430 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

                      18:31:52,431 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                      18:31:52,432 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                      18:31:52,432 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                      18:31:52,433 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                      18:31:52,434 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

                      18:31:52,434 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

                      18:31:52,435 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                      18:31:52,436 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                      18:31:52,437 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                      18:31:52,438 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

                      18:31:52,439 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                      18:31:52,439 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                      18:31:52,440 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                      18:31:52,441 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at java.lang.Thread.run(Thread.java:722)

                      18:31:52,442 ERROR [stderr] (http-localhost-127.0.0.1-8080-4) Caused by: org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318 Cannot resolve an ambiguous dependency between [Managed Bean [class com.bitrunk.apps.unitalk.controller.RemoteGateway] with qualifiers [@Any @Default], Managed Bean [class com.bitrunk.apps.unitalk.server.RemoteGateway] with qualifiers [@Any @Default]]

                      18:31:52,444 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.weld.manager.BeanManagerImpl.resolve(BeanManagerImpl.java:1013)

                      18:31:52,445 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.cdi.server.CDIServerUtil.lookupRPCBean(CDIServerUtil.java:56)

                      18:31:52,446 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.cdi.server.CDIExtensionPoints$2.get(CDIExtensionPoints.java:500)

                      18:31:52,446 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback(ConversationalEndpointCallback.java:114)

                      18:31:52,447 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           ... 27 more

                      18:31:52,448 ERROR [stderr] (http-localhost-127.0.0.1-8080-4) *** Message delivery failure ***

                      18:31:52,449 ERROR [stderr] (http-localhost-127.0.0.1-8080-4) Bus: org.jboss.errai.bus.server.ServerMessageBusImpl@152259aa

                      18:31:52,449 ERROR [stderr] (http-localhost-127.0.0.1-8080-4) Message: CommandType=fetchInstitutions:, ErrorTo=com.bitrunk.apps.unitalk.client.shared.CloudService:RPC.fetchInstitutions::Errors:1, ReplyTo=com.bitrunk.apps.unitalk.client.shared.CloudService:RPC.fetchInstitutions::RespondTo:1, ToSubject=com.bitrunk.apps.unitalk.client.shared.CloudService:RPC, MethodParms=[]

                      18:31:52,451 ERROR [stderr] (http-localhost-127.0.0.1-8080-4) errorMessage: Error calling remote service: com.bitrunk.apps.unitalk.client.shared.CloudService:RPC

                      18:31:52,452 ERROR [stderr] (http-localhost-127.0.0.1-8080-4) exception: org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking endpoint

                      18:31:52,453 ERROR [stderr] (http-localhost-127.0.0.1-8080-4) disconnect: false

                      18:31:52,454 ERROR [stderr] (http-localhost-127.0.0.1-8080-4) java.lang.RuntimeException: no marshalling definition available for type:org.jboss.weld.exceptions.AmbiguousResolutionException

                      18:31:52,456 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.marshalling.client.util.MarshallUtil.getMarshaller(MarshallUtil.java:131)

                      18:31:52,457 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.marshall(ErraiProtocolEnvelopeMarshaller.java:97)

                      18:31:52,458 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.marshalling.client.protocols.ErraiProtocol.encodePayload(ErraiProtocol.java:40)

                      18:31:52,459 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.marshalling.server.protocol.ErraiProtocolServer.encodePayloadToByteArrayInputStream(ErraiProtocolServer.java:31)

                      18:31:52,460 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.io.BufferHelper.encodeAndWrite(BufferHelper.java:70)

                      18:31:52,460 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.MessageQueueImpl.offer(MessageQueueImpl.java:186)

                      18:31:52,461 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.ServerMessageBusImpl.enqueueForDelivery(ServerMessageBusImpl.java:739)

                      18:31:52,462 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:728)

                      18:31:52,463 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:675)

                      18:31:52,464 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.client.api.base.ConversationMessageWrapper.sendNowWith(ConversationMessageWrapper.java:228)

                      18:31:52,465 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.client.api.base.DefaultMessageBuilder$1.sendNowWith(DefaultMessageBuilder.java:78)

                      18:31:52,466 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.client.util.ErrorHelper.sendClientError(ErrorHelper.java:107)

                      18:31:52,467 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.client.util.ErrorHelper.sendClientError(ErrorHelper.java:77)

                      18:31:52,467 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.client.util.ErrorHelper.handleMessageDeliveryFailure(ErrorHelper.java:170)

                      18:31:52,468 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:53)

                      18:31:52,469 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:94)

                      18:31:52,470 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:108)

                      18:31:52,472 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:117)

                      18:31:52,472 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

                      18:31:52,473 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                      18:31:52,473 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                      18:31:52,474 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                      18:31:52,474 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

                      18:31:52,475 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                      18:31:52,475 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                      18:31:52,476 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                      18:31:52,476 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                      18:31:52,477 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

                      18:31:52,477 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

                      18:31:52,478 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                      18:31:52,478 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                      18:31:52,479 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                      18:31:52,479 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

                      18:31:52,480 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                      18:31:52,481 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                      18:31:52,481 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                      18:31:52,482 ERROR [stderr] (http-localhost-127.0.0.1-8080-4)           at java.lang.Thread.run(Thread.java:722)

                      • 8. Re: Annoying Errai Build Failures
                        Jonathan Fuerth Master

                        Acutally, this is good: it means your call is getting through to the server now, where it wasn't before.

                         

                        The new error condition to dig into is the cause of the first exception:

                         

                        Caused by: org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318 Cannot resolve an ambiguous dependency between [Managed Bean [class com.bitrunk.apps.unitalk.controller.RemoteGateway] with qualifiers [@Any @Default], Managed Bean [class com.bitrunk.apps.unitalk.server.RemoteGateway] with qualifiers [@Any @Default]]

                         

                        This means you've done a @Inject RemoteGateway somewhere, and Weld doesn't know which of the two types to inject. Here's the section of the Weld reference guide that explains the problem and how to work around it: http://docs.jboss.org/weld/reference/latest/en-US/html/injection.html#d0e1369

                         

                        -Jonathan

                        • 9. Re: Annoying Errai Build Failures
                          Charles Odili Apprentice

                          On close inspaction of the error

                          Caused by: org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318 Cannot resolve an ambiguous dependency between [Managed Bean [class com.bitrunk.apps.unitalk.controller.RemoteGateway] with qualifiers [@Any @Default], Managed Bean [class com.bitrunk.apps.unitalk.server.RemoteGateway] with qualifiers [@Any @Default]]

                          I realized that I moved (with eclipse refatoring) RemoteGateway from the com.bitrunk.apps.unitalk.controller package to a new com.bitrunk.apps.unitalk.server package and deleted the old package. Even after doing rebuilding the project (mvn clean package), refreshing from eclipse, and re-deploying several the error just kept comming up. I had to restart eclipse, rebuilt the project and re-deployed before confusion got handled.

                           

                          My Caller<T> calls are working very well now. Thanks (especially Jonathan) for all the help.