1 2 Previous Next 16 Replies Latest reply on Jul 25, 2013 10:36 AM by csa

    Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1

    davidka

      Hi,

       

      I've tried to upgrade out aplication to 2.4.0.Beta1 but gets an error while starting the application: org.jboss.errai.bus.client.api.base.NoSubscribersToDeliverTo: no subscribers to deliver to for subject: cdi.event:Dispatcher

       

      With the last version(2.3.2.FInal) everything worked fine.

       

      I've tried to debug and find out where it comes from but with no results.

       

      Could you please help me to find a solution for that?

       

      I have attached the output from the console.

        • 1. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
          edewit

          Hi David,

           

          Could you send the generated BootstrapperImpl from the .errai directory?

           

          Cheers,

               Erik Jan

          • 2. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
            edewit

            Hi David,

             

            You are not using client side events are you?

             

            Cheers,

                 Erik Jan

            • 3. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
              davidka

              Hi,

               

              no we do not use that, because our application is running on WebSphere and Weld isnt supported there.

               

              Regards, David

              • 4. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                edewit

                Hi David,

                 

                I'm not totally sure why this is happening, because the CDI Dispatcher should get registered on statup. But a posible solution / workaround could be to remove the CDI module from your gwt.xml

                 

                Could you give that a try?

                 

                Cheers,

                     Erik Jan

                • 5. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                  davidka

                  Hi Erik Jan,

                   

                  now I get an compile error:

                   

                  [INFO]Adding '1' new generated units
                  [INFO]   Validating units:
                  [INFO]      Errors in 'C:\dev\Tracking\TrackingWeb\target\.generated\org\jboss\errai\ioc\client\BootstrapperImpl.java'
                  [INFO]         See snapshot: C:\Users\ddhahn\AppData\Local\Temp\org.jboss.errai.ioc.client.BootstrapperImpl2965775132696622467.java
                  [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 'C:\dev\Tracking\TrackingWeb\target\.generated\org\jboss\errai\ioc\client\BootstrapperImpl.java'
                  [INFO]   [ERROR] Line 213: No source code is available for type org.jboss.errai.enterprise.client.cdi.api.CDI; did you forget to inherit a required module?
                  [INFO]   [ERROR] Line 213: No source code is available for type org.jboss.errai.enterprise.client.cdi.CDIEventTypeLookup; did you forget to inherit a required module?
                  [INFO]   See snapshot: C:\Users\ddhahn\AppData\Local\Temp\org.jboss.errai.ioc.client.BootstrapperImpl5711776714968631826.java
                  [INFO][ERROR] Errors in 'org/jboss/errai/ioc/client/Container.java'
                  [INFO]   [ERROR] Line 62: Rebind result 'org.jboss.errai.ioc.client.BootstrapperImpl' could not be found

                   

                   

                  Line 213 from BootstrapperImpl.java: new CDI().initLookupTable(CDIEventTypeLookup.get());

                   

                  Regards, David

                  • 6. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                    edewit

                    Hi David,

                     

                    Strange how can it still generate that when you don't have the CDI module in your gwt.xml. I'll have to ask the others if they have some idea, because I'm out.

                     

                    Cheers,

                         Erik Jan

                    • 7. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                      csa

                      Hi David,

                       

                      As Erik Jan suggested, removing the Errai CDI client module from your gwt.xml is the right step. You will also need make sure that the errai-cdi-client.jar is not on your classpath because it configures IOC and marshalling extensions that will run otherwise (and generate code that will require the Errai CDI GWT module).

                       

                      Just remove the dependecy from your pom.xml or remove the lib in case you're not using Maven. Since you're not using CDI you don't need that library anyway.

                       

                      Cheers,

                      Christian

                      • 8. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                        davidka

                        Hi,

                         

                        after removing the errai-cdi-client dependency from my pom.xml I get a strange Exception:

                         

                        java.util.concurrent.ExecutionException:  org.jboss.errai.ioc.rebind.ioc.exception.UnsatisfiedDependenciesException:  @> org.jboss.client.local.App
                        [ERROR]  - field org.jboss.errai.codegen.meta.MetaField:org.jboss.client.local.App.mainController could not be satisfied for type: org.jboss.client.local.MainController
                        
                        

                         

                        I've created a simple test application, so you can reproduce the error.

                         

                        Thanks for help,

                        David

                        • 9. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                          edewit

                          Hi David,

                           

                          Right so removing CDI module wasn't the greatest idea ever, it did not solve the problem it only introduced more errors.

                           

                          Sorry for that,

                               Erik Jan

                          • 10. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                            davidka

                            Hi Eric Jan,

                             

                            do you have an another idea to solve the NoSubscribersToDeliverTo problem?

                             

                            Gerards,

                            David

                            • 11. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                              csa

                              Hi David,

                               

                              I attached a modified version of your example that works. The only change I made was to use @Singleton instead of @ApplicationScoped and to remove our customer JettyLauncher from the pom (only needed for Errai CDI).

                               

                              If you want you can send us an example that shows the NoSubscribersToDeliverTo problem. We can take a look at that. I am not clear right now whether or not you intend to use Errai CDI on the client?

                               

                              Cheers,

                              Christian

                              • 12. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                                davidka

                                Hi,

                                 

                                its hard for me to create an example since our project runs on WebSphere but I will try to explain where I see the problem:

                                 

                                We do not use server-side integration module because Weld isn't supported on WebSphere (we have enabled the property errai.auto_discover_services),

                                so the subject CDI.SERVER_DISPATCHER_SUBJECT gets never subscribed.

                                As far as I understood if a project uses weld-integration the subscription is done here: CDIExtensionPoints.afterBeanDiscovery.

                                 

                                But CDIClientBootstrap-class tries to send a message to the that subject in CDIClientBootstrap.initRemoteCdiSubsystem.run()

                                and throws an NoSubscribersToDeliverTo-Exception because it is not subscribed.

                                 

                                In the older version (2.3.2.Final) that Exception was catched in ClientMessageBusImpl.transmitDeferred method.

                                 

                                Maybe it is a solution to check if that subject is subscribed and only then send that message?

                                 

                                I hope my description is more or less understandable.

                                 

                                Regards,

                                David

                                • 13. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                                  csa

                                  Hi David,

                                   

                                  Yes perfectly understandable. I have created a JIRA to fix that: https://issues.jboss.org/browse/ERRAI-599

                                   

                                  What I was getting at though is that it seems you don't need to use errai-cdi-client in your app. You wrote that you don't use CDI events on the client. So, I think you could just use errai-ioc directly to take care of dependency injection (like I did in the attached example above). Unless of course there are other CDI features you use on the client (e.g. Producers).

                                   

                                  Nevertheless, we'll look into the problem.

                                   

                                  Cheers,

                                  Christian

                                  • 14. Re: Error (NoSubscribersToDeliverTo) after upgrading to 2.4.0.Beta1
                                    csa

                                    Hi again,

                                     

                                    This is fixed now in the latest 2.4.0-SNAPSHOTs. I also attach a simple demo that uses errai-cdi on the client but plain bus RPC on server (without the weld-integration.jar being deployed).

                                     

                                    Cheers,

                                    Christian

                                    1 2 Previous Next