7 Replies Latest reply on Mar 27, 2014 10:22 AM by csa

    There are no proxy providers registered

    mprk

      I'm having trouble connecting to any JAX-RS service or having the @AfterInitialization

      annotated method to fire. It seems like the MessageBus never actually activates.

       

      Do the share Service endpoints have to be in the top-level "shared" directory,

      or can they exist in subpackages within the "shared" directory? Or do I have

      to explictly defined them in some configuration file?

       

      I'm running Errai 2.4.3.Final. It's compiled and run with maven. Running on JBoss AS 7.

       

      I've looked at the suggestions listed for 14.3 in this guide:

      http://docs.jboss.org/errai/2.2.0.Final/errai/reference/html/sid-32473113.html

      1. ErraiApp.properties is in /src/main/resources.

      2. I'm not sure what the proxy code looks like for .errai/RpcProxyLoaderImpl.java. I've included the generated version below.

      3. My service endpoints exist in a subpacked of the shared directory.

       

      My goal is to populate a map on start-up, which calls into a web service to get the data from a lucene index.

       

      =========================================

      I have a class to hold the Map.

      =========================================

       

      @Page

      @ApplicationScoped

      public class MapView extends DockPanel {

       

        @Inject

        Caller<SearchEndpoint> searchService;

       

        //I check that this does get initialized prior to calling searchService

        RequestDispatcher dispatcher = ErraiBus.getDispatcher();

       

        public MapView() {

       

          super();

       

              defaultMapOptions = new MapOptions();

              defaultMapOptions.setNumZoomLevels(16);

              defaultMapOptions.setProjection("EPSG:4326");

              defaultMapOptions.setMaxExtent(new Bounds(-180, -90, 180, 90));

              defaultMapOptions.setUnits(MapUnits.DEGREES);

       

              initMapWidget(defaultMapOptions);

           

          }

       

        // @AfterInitialization -- tried this, never was activated.

        public void initializeMap(){

       

          GWT.log("!!!!!!!!!!!!!!!!!!! AfterInitializing map....");

          GWT.log("Dispatcher null? : " + (dispatcher == null) );

       

        //code omitted.

       

          //Recursively start populating map.  

          try {

          populateMap(1);

          } catch (Exception e ){

          GWT.log( e.toString() );

          e.printStackTrace();

          }

          }

       

          /**

           * Recursively populate map

           *

           * @param start

           */

          @SuppressWarnings("rawtypes")

        public void populateMap(final int start){

       

        // code removed....

       

        // First way I tried to call it.

          //RestClient.create(SearchEndpoint.class, new RemoteCallback<List>() {

       

       

        // Revised way of calling it. This is where the stack trace occurs.

          searchService.call( new RemoteCallback<List>() {

       

        @Override

        public void callback(List response) {

       

        // good response.

        }

       

        }, new RestErrorCallback() {

       

        @Override

        public boolean error(Request message, Throwable throwable) {

       

        // bad response

       

        }

       

        }).searchMap(criteria);

       

          }

       

      }

       

      ==========================

      Here is the final stack trace:

      ==========================

       

      [INFO] 10:06:09,837 INFO  [org.jboss.as.server] (management-handler-thread - 4) JBAS018559: Deployed "test.war"

      [INFO] INFO [CacheUtil] clearing all generation caches...

      [INFO] INFO [MetaDataScanner] added class scanning extensions: org.jboss.errai.common.metadata.JbossVFsTypeHandler

      [INFO] INFO [Reflections] Reflections took 1105 ms to scan 18 urls, producing 579 keys and 3230 values [using 2 cores]

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator; for type: org.jboss.errai.ioc.client.Bootstrapper

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.databinding.rebind.BindableProxyLoaderGenerator; for type: org.jboss.errai.databinding.client.BindableProxyLoader

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ui.nav.rebind.NavigationGraphGenerator; for type: org.jboss.errai.ui.nav.client.local.spi.NavigationGraph

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.enterprise.rebind.JaxrsProxyLoaderGenerator; for type: org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.bus.rebind.RpcProxyLoaderGenerator; for type: org.jboss.errai.bus.client.framework.RpcProxyLoader

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ui.rebind.TranslationServiceGenerator; for type: org.jboss.errai.ui.client.local.spi.TranslationService

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.marshalling.rebind.MarshallersGenerator; for type: org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator; for type: org.jboss.errai.jpa.client.local.ErraiEntityManager

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ui.rebind.less.LessStyleGenerator; for type: org.jboss.errai.ui.client.local.spi.LessStyleMapping

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.validation.rebind.ValidatorFactoryGenerator; for type: javax.validation.ValidatorFactory

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.databinding.client.BindableProxyLoader

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.ui.client.local.spi.LessStyleMapping

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.ui.nav.client.local.spi.NavigationGraph

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader

      [INFO] INFO [AsyncGenerators] started async generation for >> javax.validation.ValidatorFactory

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.jpa.client.local.ErraiEntityManager

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.bus.client.framework.RpcProxyLoader

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.ioc.client.Bootstrapper

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.ui.client.local.spi.TranslationService

      [INFO] INFO [Generator] not emitting server marshaller class

      [INFO] WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.

      [INFO] WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true

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

      [INFO] INFO [Reflections] Reflections took 541 ms to scan 173 urls, producing 0 keys and 0 values

      [INFO] INFO [Version] HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

      [INFO] INFO [Version] HHH000412: Hibernate Core {4.2.0.Final}

      [INFO] INFO [Environment] HHH000206: hibernate.properties not found

      [INFO] INFO [Environment] HHH000021: Bytecode provider name : javassist

      [INFO] INFO [Ejb3Configuration] HHH000204: Processing PersistenceUnitInfo [

      [INFO]  name: ErraiClientPersistenceUnit

      [INFO]  ...]

      [INFO] WARN [AnnotationBinder] HHH000392: Hibernate does not support SequenceGenerator.initialValue() unless 'hibernate.id.new_generator_mappings' set

      [INFO] WARN [AnnotationBinder] HHH000392: Hibernate does not support SequenceGenerator.initialValue() unless 'hibernate.id.new_generator_mappings' set

      [INFO] WARN [ConnectionProviderInitiator] HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections

      [INFO] INFO [Dialect] HHH000400: Using dialect: org.hibernate.dialect.H2Dialect

      [INFO] WARN [H2Dialect] HHH000431: Unable to determine H2 database version, certain features may not work

      [INFO] INFO [LobCreatorBuilder] HHH000422: Disabling contextual LOB creation as connection was null

      [INFO] INFO [TransactionFactoryInitiator] HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory

      [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

      [INFO] INFO [Version] HSEARCH000034: Hibernate Search 4.3.0.Final

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

      [INFO] WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.

      [INFO] WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true

      [INFO] WARN [ConfigContext] HSEARCH000075: Configuration setting hibernate.search.lucene_version was not specified, using LUCENE_CURRENT.

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

      [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

      [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

      [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

      [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

      [INFO] INFO [IOCBootstrapGenerator] generated IOC bootstrapping class in 8704ms (2339 beans processed)

      [ERROR] java.lang.RuntimeException: There are no proxy providers registered.

      [ERROR]         at org.jboss.errai.common.client.framework.RemoteServiceProxyFactory.getRemoteProxy(RemoteServiceProxyFactory.java:37)

      [ERROR]         at org.jboss.errai.ioc.client.api.builtin.CallerProvider$1.call(CallerProvider.java:61)

      [ERROR]         at com.test.client.local.MapView.populateMap(MapView.java:331)

      [ERROR]         at com.test.client.local.MapView.initializeMap(MapView.java:291)

      [ERROR]         at com.test.client.local.App.onModuleLoad(App.java:75)

      [ERROR]         at org.jboss.errai.ioc.client.BootstrapperImpl$24.init(BootstrapperImpl.java:442)

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

      [ERROR]         at org.jboss.errai.ioc.client.container.AbstractCreationalContext.fireAllInitCallbacks(AbstractCreationalContext.java:196)

      [ERROR]         at org.jboss.errai.ioc.client.container.SimpleCreationalContext.finish(SimpleCreationalContext.java:177)

      [ERROR]         at org.jboss.errai.ioc.client.Container.bootstrapContainer(Container.java:76)

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

      [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:606)

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

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

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

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

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

      [INFO] INFO [Reflections] Reflections took 19543 ms to scan 173 urls, producing 9816 keys and 44742 values

       

      =============================

       

      I have a JAX-RS interface defined in

       

      package com.test.client.shared.services;

       

      import javax.ws.rs.Consumes;

      import javax.ws.rs.POST;

      import javax.ws.rs.Path;

      import javax.ws.rs.Produces;

      import javax.ws.rs.core.MediaType;

      import javax.ws.rs.core.Response;

      import com.test.client.shared.dao.SearchCriteria;

       

      @Path("/search")

      public interface SearchEndpoint {

       

       

        @POST

        @Path("/lucene")

        @Consumes(MediaType.APPLICATION_JSON)

        @Produces(MediaType.APPLICATION_JSON)

        public Response searchLucene( SearchCriteria criteria );

       

      }

       

      ============================

      Here is my App.gwt.xml file, where I have imported the kitchensink.

      ============================

       

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

      <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">

      <module rename-to="app">

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

        <inherits name='org.gwtopenmaps.openlayers.OpenLayers'/>

       

        <!--

        Set for development purposes.

        When deployed into production, this

        should be commented out.

        -->

       

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

       

        <!-- See: https://groups.google.com/forum/#!topic/google-web-toolkit/XuSobGAlOTE  -->

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

        <set-property name="locale" value="default" />

        -->

        <replace-with class="com.test.client.local.Config">

        <when-type-is class="org.jboss.errai.bus.client.framework.Configuration" />

        </replace-with>

       

      </module>

       

      =================================

      Here is the generated code for the RPCProxyLoaderImpl. I can't tell whether this is correct,

      or whether it should have specific references to the JAX-RS service endpoints. It was difficult to

      discern what is actually required according to the 14.3 reference material.

       

       

      http://docs.jboss.org/errai/2.2.0.Final/errai/reference/html/sid-32473113.html

      =================================

       

      package org.jboss.errai.bus.client.framework;

       

      import java.util.List;

      import org.jboss.errai.bus.client.api.base.MessageBuilder;

      import org.jboss.errai.bus.client.api.builder.RemoteCallSendable;

      import org.jboss.errai.bus.client.api.messaging.MessageBus;

      import org.jboss.errai.common.client.framework.ProxyProvider;

      import org.jboss.errai.common.client.framework.RemoteServiceProxyFactory;

      import org.jboss.errai.jpa.sync.client.shared.DataSyncService;

      import org.jboss.errai.jpa.sync.client.shared.SyncableDataSet;

       

      public class RpcProxyLoaderImpl implements RpcProxyLoader {

        public void loadProxies(final MessageBus bus) {

          class org_jboss_errai_jpa_sync_client_shared_DataSyncServiceImpl extends AbstractRpcProxy implements DataSyncService {

            public List coldSync(final SyncableDataSet a0, final List a1) {

              RemoteCallSendable sendable = null;

              if (errorCallback == null) {

                sendable = MessageBuilder.createCall().call("org.jboss.errai.jpa.sync.client.shared.DataSyncService").endpoint("coldSync:org.jboss.errai.jpa.sync.client.shared.SyncableDataSet:java.util.List:", qualifiers, new Object[] { a0, a1 }).respondTo(List.class, remoteCallback).defaultErrorHandling();

              } else {

                sendable = MessageBuilder.createCall().call("org.jboss.errai.jpa.sync.client.shared.DataSyncService").endpoint("coldSync:org.jboss.errai.jpa.sync.client.shared.SyncableDataSet:java.util.List:", qualifiers, new Object[] { a0, a1 }).respondTo(List.class, remoteCallback).errorsHandledBy(errorCallback);

              }

              org_jboss_errai_jpa_sync_client_shared_DataSyncServiceImpl.this.sendRequest(bus, sendable);

              return null;

            }

          }

          RemoteServiceProxyFactory.addRemoteProxy(DataSyncService.class, new ProxyProvider() {

            public Object getProxy() {

              return new org_jboss_errai_jpa_sync_client_shared_DataSyncServiceImpl();

            }

          });

        }

      }

       

      ==============================

      index.jsp

      ==============================

       

      <html lang="en">

        <head>

        <meta charset="utf-8">

       

        <link href='http://fonts.googleapis.com/css?family=Gudea:400,700' rel='stylesheet' type='text/css'>

        <link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>

       

        <script type="text/javascript">

                  erraiJaxRsApplicationRoot = "./rest";

        erraiBusRemoteCommunicationEnabled = false;

              </script>

            

              <script type="text/javascript">erraiBusRemoteCommunicationEnabled = false;</script>

        <script src="https://maps.google.com/maps/api/js?v=3&sensor=false&key=xxxxxx"></script>

        <script src="http://openlayers.org/api/2.13.1/OpenLayers.js"></script>

       

        <link rel="shortcut icon" href="favicon.ico">

        <link rel="apple-touch-icon" href="favicon.ico">

       

        <link rel="apple-touch-icon" sizes="72x72"

        href="images/apple-touch-icon-72x72.png">

        <link rel="apple-touch-icon" sizes="114x114"

        href="images/apple-touch-icon-114x114.png">

       

        <script type="text/javascript" language="javascript"

        src="app/app.nocache.js"></script>

        </head>

       

        <body>

        <iframe src="javascript:''" id="__gwt_historyFrame" style="width: 0; height: 0; border: 0"></iframe>

        <script src="bootstrap/js/bootstrap.min.js"></script>

        </body>

       

      </html>

       

      ==================

      Compilation

      ==================

       

      c:\Projects\test>mvn clean package

      [INFO] Scanning for projects...

      [INFO]

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

      [INFO] Building GXM test 1.0.0-SNAPSHOT

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

      [INFO]

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

      [INFO] Deleting c:\Projects\test\target

      [INFO] Deleting c:\Projects\test\src\main\webapp\WEB-INF\classes

      [INFO] Deleting c:\Projects\test (includes = [src/main/webapp/app/, src/main/webapp/WEB-INF/deploy/, src/main/webapp/WEB-INF/lib/, **/gwt-unitCache/**, .errai/], excludes = [])

      [INFO]

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

      [debug] execute contextualize

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

      [INFO] Copying 144 resources

      [INFO] Copying 4 resources

      [INFO]

      [INFO] --- gwt-maven-plugin:2.5.1:resources (default) @ test ---

      [INFO] auto discovered modules [com.gxm.test.App]

      [INFO] 105 source files from GWT module com.gxm.test.App

      [INFO]

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

      [INFO] Compiling 131 source files to c:\Projects\test\src\main\webapp\WEB-INF\classes

      [INFO]

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

      [debug] execute contextualize

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

      [INFO] skip non existing resourceDirectory c:\Projects\test\src\test\resources

      [INFO]

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

      [INFO] Compiling 3 source files to c:\Projects\test\target\test-classes

      [INFO]

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

      [INFO] Surefire report directory: c:\Projects\test\target\surefire-reports

       

      -------------------------------------------------------

      T E S T S

      -------------------------------------------------------

      Running com.gxm.test.client.shared.DTOUtilTest

      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.056 sec

      Running com.gxm.test.client.shared.text.TestDateFormatTest

      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec

      Running com.gxm.test.client.shared.text.TestTimeDateFormatTest

      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec

       

      Results :

       

      Tests run: 4, Failures: 0, Errors: 0, Skipped: 0

       

      [INFO]

      [INFO] --- gwt-maven-plugin:2.5.1:compile (default) @ test ---

      [INFO] auto discovered modules [com.gxm.test.App]

      [INFO] Compiling module com.gxm.test.App

      [INFO]    Validating units:

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

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

      [INFO] INFO [CacheUtil] clearing all generation caches...

      [INFO] INFO [MetaDataScanner] added class scanning extensions: org.jboss.errai.common.metadata.JbossVFsTypeHandler

      [INFO] INFO [Reflections] Reflections took 1108 ms to scan 18 urls, producing 577 keys and 3189 values [using 2 cores]

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.databinding.rebind.BindableProxyLoaderGenerator; for type: org.jboss.errai.databinding.client.BindableProxyLoader

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.bus.rebind.RpcProxyLoaderGenerator; for type: org.jboss.errai.bus.client.framework.RpcProxyLoader

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ui.rebind.TranslationServiceGenerator; for type: org.jboss.errai.ui.client.local.spi.TranslationService

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator; for type: org.jboss.errai.jpa.client.local.ErraiEntityManager

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.validation.rebind.ValidatorFactoryGenerator; for type: javax.validation.ValidatorFactory

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ui.rebind.less.LessStyleGenerator; for type: org.jboss.errai.ui.client.local.spi.LessStyleMapping

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator; for type: org.jboss.errai.ioc.client.Bootstrapper

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.marshalling.rebind.MarshallersGenerator; for type: org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ui.nav.rebind.NavigationGraphGenerator; for type: org.jboss.errai.ui.nav.client.local.spi.NavigationGraph

      [INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.enterprise.rebind.JaxrsProxyLoaderGenerator; for type: org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.marshalling.client.api.MarshallerFactory

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.ui.client.local.spi.LessStyleMapping

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader

      [INFO] INFO [AsyncGenerators] started async generation for >> javax.validation.ValidatorFactory

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.ui.client.local.spi.TranslationService

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.jpa.client.local.ErraiEntityManager

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.ioc.client.Bootstrapper

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.ui.nav.client.local.spi.NavigationGraph

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.databinding.client.BindableProxyLoader

      [INFO] INFO [AsyncGenerators] started async generation for >> org.jboss.errai.bus.client.framework.RpcProxyLoader

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

      [INFO] INFO [Reflections] Reflections took 448 ms to scan 175 urls, producing 0 keys and 0 values

      [INFO] INFO [Version] HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

      [INFO] INFO [Version] HHH000412: Hibernate Core {4.2.0.Final}

      [INFO] INFO [Environment] HHH000206: hibernate.properties not found

      [INFO] INFO [Environment] HHH000021: Bytecode provider name : javassist

      [INFO] INFO [Ejb3Configuration] HHH000204: Processing PersistenceUnitInfo [

      [INFO]  name: ErraiClientPersistenceUnit

      [INFO]  ...]

      [INFO] WARN [AnnotationBinder] HHH000392: Hibernate does not support SequenceGenerator.initialValue() unless 'hibernate.id.new_generator_mappings' set

      [INFO] WARN [AnnotationBinder] HHH000392: Hibernate does not support SequenceGenerator.initialValue() unless 'hibernate.id.new_generator_mappings' set

      [INFO] WARN [ConnectionProviderInitiator] HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections

      [INFO] INFO [Dialect] HHH000400: Using dialect: org.hibernate.dialect.H2Dialect

      [INFO] WARN [H2Dialect] HHH000431: Unable to determine H2 database version, certain features may not work

      [INFO] INFO [LobCreatorBuilder] HHH000422: Disabling contextual LOB creation as connection was null

      [INFO] INFO [TransactionFactoryInitiator] HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory

      [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

      [INFO] INFO [Version] HSEARCH000034: Hibernate Search 4.3.0.Final

      [INFO] WARN [ConfigContext] HSEARCH000075: Configuration setting hibernate.search.lucene_version was not specified, using LUCENE_CURRENT.

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

      [INFO] WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.

      [INFO] WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true

      [INFO]    Computing all possible rebind results for 'org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader'

      [INFO]       Rebinding org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader

      [INFO]          Invoking generator org.jboss.errai.enterprise.rebind.JaxrsProxyLoaderGenerator

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

      [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 [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

      [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

      [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

      [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

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

      [INFO] INFO [Generator] considering 'c:\Projects\test\src\main\webapp\WEB-INF\classes/' as module output path ...

      [INFO] INFO [Generator]    found 'c:\Projects\test\src\main\webapp\WEB-INF\classes' output directory

      [INFO] INFO [Generator] ** deposited marshaller class in : c:\Projects\test\src\main\webapp\WEB-INF\classes

      [INFO] WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.

      [INFO] WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true

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

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

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

      [INFO]       Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment

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

      [INFO]             Generating Extensions Bootstrapper...

      [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 ioc bootstrapping code...

      [INFO] INFO [IOCBootstrapGenerator] generated IOC bootstrapping class in 6545ms (2341 beans processed)

      [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...

      [INFO]    Compiling 1 permutation

      [INFO]       Compiling permutation 0...

      [INFO] INFO [Reflections] Reflections took 19432 ms to scan 175 urls, producing 9816 keys and 44742 values

      [INFO]    Compile of permutations succeeded

      [INFO] Linking into c:\Projects\test\target\test\app

      [INFO]    Link succeeded

      [INFO]    Compilation succeeded -- 40.843s

      [INFO]

      [INFO] --- maven-war-plugin:2.2:war (default-war) @ test ---

      [INFO] Packaging webapp

      [INFO] Assembling webapp [test] in [c:\Projects\test\target\test]

      [INFO] Processing war project

      [INFO] Copying webapp resources [c:\Projects\test\src\main\webapp]

      [INFO] Webapp assembled in [1153 msecs]

      [INFO] Building war: c:\Projects\test\target\test.war

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

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

      [INFO] BUILD SUCCESS

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

      [INFO] Total time: 56.760s

      [INFO] Finished at: Wed Mar 26 10:03:57 EDT 2014

      [INFO] Final Memory: 64M/511M

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

      c:\Projects\test>

        • 1. Re: There are no proxy providers registered
          csa

          Hi Matt,

           

          This all looks pretty good. The RpcProxyLoaderImpl is for Bus/RPC endpoints (using @Remote and @Service). Since your SearchEndpoint is a JAX-RS endpoint we need to take a look at your .errai/JaxrsProxyLoaderImpl and check if it contains the corresponding proxy. Can you share the contents of this file with us?

           

          Your @AfterInitialization method is not invoked because you have disabled communication with the remote bus (erraiBusRemoteCommunicationEnabled = false) in your index.jsp which is is fine if you decide to communicate with the server using REST endpoints only.

           

          What I would try first is to use @PostConstruct instead of @AfterInitialization and remove the call to initializeMap from your App.onModuleLoad. This should work fine if everything is set up correctly.

           

          Cheers,

          Christian

          1 of 1 people found this helpful
          • 2. Re: Re: There are no proxy providers registered
            mprk

            Thanks Christian. You seem to be a one man wrecking crew on here.

             

            I just tried the erraiBusRemoteCommunicationEnabled=false this last time to see if it would help with the JAX-RS comms.

            The @AfterInitiailzation annotation never has worked for me.

             

            I've attached the file you requested.

             

            TIA,

             

            Matt

            • 3. Re: Re: There are no proxy providers registered
              csa

              Hi,

               

              Your JaxrsProxyLoaderImpl is fine.

               

              Did you try @PostConstruct as I suggested above? That should definitely work as the proxy for SearchEndpoint was correctly generated.

               

              Cheers,

              Christian

              1 of 1 people found this helpful
              • 4. Re: There are no proxy providers registered
                mprk

                Re used the @PostContstruct annotation, and get nearly the same result:

                 

                [INFO]  ...]

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

                [INFO] WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.

                [INFO] WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true

                [INFO] INFO [Generator] not emitting server marshaller class

                [INFO] WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.

                [INFO] WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true

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

                [INFO] WARN [AnnotationBinder] HHH000392: Hibernate does not support SequenceGenerator.initialValue() unless 'hibernate.id.new_generator_mappings' set

                [INFO] WARN [AnnotationBinder] HHH000392: Hibernate does not support SequenceGenerator.initialValue() unless 'hibernate.id.new_generator_mappings' set

                [INFO] WARN [ConnectionProviderInitiator] HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections

                [INFO] INFO [Dialect] HHH000400: Using dialect: org.hibernate.dialect.H2Dialect

                [INFO] WARN [H2Dialect] HHH000431: Unable to determine H2 database version, certain features may not work

                [INFO] INFO [LobCreatorBuilder] HHH000422: Disabling contextual LOB creation as connection was null

                [INFO] INFO [TransactionFactoryInitiator] HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory

                [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

                [INFO] INFO [Version] HSEARCH000034: Hibernate Search 4.3.0.Final

                [INFO] WARN [ConfigContext] HSEARCH000075: Configuration setting hibernate.search.lucene_version was not specified, using LUCENE_CURRENT.

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

                [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

                [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

                [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

                [INFO] INFO [ASTQueryTranslatorFactory] HHH000397: Using ASTQueryTranslatorFactory

                [INFO] INFO [IOCBootstrapGenerator] generated IOC bootstrapping class in 7802ms (2329 beans processed)

                [ERROR] java.lang.RuntimeException: There are no proxy providers registered.

                [ERROR]         at org.jboss.errai.common.client.framework.RemoteServiceProxyFactory.getRemoteProxy(RemoteServiceProxyFactory.java:37)

                [ERROR]         at org.jboss.errai.ioc.client.api.builtin.CallerProvider$1.call(CallerProvider.java:61)

                [ERROR]         at com.gxm.servo.client.local.MapView.populateMap(MapView.java:336)

                [ERROR]         at com.gxm.servo.client.local.MapView.initializeMap(MapView.java:296)

                [ERROR]         at org.jboss.errai.ioc.client.BootstrapperImpl$14.init(BootstrapperImpl.java:295)

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

                [ERROR]         at org.jboss.errai.ioc.client.container.AbstractCreationalContext.fireAllInitCallbacks(AbstractCreationalContext.java:196)

                [ERROR]         at org.jboss.errai.ioc.client.container.SimpleCreationalContext.finish(SimpleCreationalContext.java:177)

                [ERROR]         at org.jboss.errai.ioc.client.Container.bootstrapContainer(Container.java:76)

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

                [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:606)

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

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

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

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

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

                [INFO] INFO [Reflections] Reflections took 22043 ms to scan 173 urls, producing 9816 keys and 44742 values

                • 5. Re: There are no proxy providers registered
                  mprk

                  Eventually, the message bus and cdi fail too in chrome's dev tool window.

                  cdi-client-mesage-bus-initialization-failure.PNG

                  • 6. Re: There are no proxy providers registered
                    mprk

                    I final got it to work. After making sure

                     

                    RestClient.setApplicationRoot("http://127.0.0.1:8080/test/rest");

                     

                    and the Config class are pointing to the same machine.

                     

                    public class Config implements Configuration {

                     

                      @Override

                      public String getRemoteLocation() {

                        // When compiling to a native application the absolute path to the server

                        // side errai bus endpoint needs to be specified.

                      return "http://127.0.0.1:8080/test/";

                     

                      }

                     

                    }

                     

                    The log messages in the chrome window look at little better.

                     

                    cdi-client-mesage-bus-initialization-fixed.PNG

                     

                    I changed from the @PostConstruct to @AfterInitialization and it sync'd up.

                     

                    Thanks for all your help.

                    • 7. Re: There are no proxy providers registered
                      csa

                      OK, great! Glad you got it all working. Executing a remote call with Errai JAX-RS should definitely work in @PostConstruct, only remote calls using Errai Bus/RPC need @AfterInitialization.

                       

                      Cheers,

                      Christian