3 Replies Latest reply on Jun 13, 2013 7:45 AM by Michal Szymanski

    [3.0-SNAPSHOT] Problem with errai initialization

    Michal Szymanski Newbie

      I wanted to tryout 3.0-SNAPSHOT on my branch of the project. I did adapt code but I can't get it working. I probably need some guidline how to better debug configuration problems with errai.

       

      I work on JBoss7. The project is FULL of technology. I will probably try to isolate problem into smaller prototype project, will update this thread with information. For now below the description of the problem Im heaving.

       

      Im using my custom "service processor" which enables integration with spring part of the application. Was doing well in 2.3.1.Final now I had to change few things when u introduced security. But it seems to perform good.

       

      Below is what I get in browser (but there is not indication of exception - or relevant details about them):

      [errai] wait for: org.jboss.errai.marshalling.client.api.MarshallerFramework LogUtil.java:45
      [errai] vote for: org.jboss.errai.marshalling.client.api.MarshallerFramework LogUtil.java:45
      [errai] bus initialization started ... LogUtil.java:45
      [errai] wait for: org.jboss.errai.bus.client.api.ClientMessageBus LogUtil.java:45
      [errai] IOC bootstrapper successfully initialized. LogUtil.java:45
      Fri Jun 07 11:45:15 GMT+200 2013 pl.myapp.web.client.LoginDialog
      INFO: constructing... ConsoleLogHandler.java:63
      Fri Jun 07 11:45:15 GMT+200 2013 pl.myapp.web.client.LoginApplication
      INFO: constructing... ConsoleLogHandler.java:63
      Fri Jun 07 11:45:15 GMT+200 2013 pl.myapp.web.client.LoginApplication
      INFO: construction success ConsoleLogHandler.java:63
      Fri Jun 07 11:45:15 GMT+200 2013 pl.myapp.web.client.Application
      INFO: constructing... ConsoleLogHandler.java:63
      Fri Jun 07 11:45:15 GMT+200 2013 pl.myapp.web.client.Application
      INFO: construction success ConsoleLogHandler.java:63
      [errai] 29 beans successfully deployed. LogUtil.java:45
      [errai] bean manager now in service. LogUtil.java:45
      [errai] declare CDI dispatch service LogUtil.java:45
      [errai] wait for: org.jboss.errai.enterprise.client.cdi.api.CDI LogUtil.java:45
      [errai] sending handshake message to remote bus LogUtil.java:45
      [errai] received handshake response from server. preparing to bring up the federation LogUtil.java:45
      [errai] transitioning to new handler: SSE LogUtil.java:45
      [errai] vote for: org.jboss.errai.bus.client.api.ClientMessageBus LogUtil.java:45
      [errai] CDI subsystem syncing with server ... LogUtil.java:45
      no subscribers to deliver to for subject: cdi.event:Dispatcher -- Additional Details: none LogUtil.java:45
      receiver 'ClientBus' threw an exception -- Additional Details: 
      FieldValue
      CommandTypeFinishAssociation
      ConnectionSessionKey253a941df46bd49bcf19c53e7ce5ac2bda103a3f8b20b98a85627c2af976d6
      RemoteServicesServerBus,pl.myapp.shared.service.EmailService:RPC,pl.myapp.shared.service.FolderService:RPC,pl.myapp.shared.service.DocumentService:RPC,pl.myapp.shared.service.SystemService:RPC,AuthenticationService,AuthorizationService,pl.myapp.shared.service.WorkflowService:RPC,pl.myapp.shared.service.UserService:RPC,pl.myapp.shared.service.GenericObjectService:RPC,ServerEchoService
      ToSubjectClientBus
      CapabilitiesFlagsLongPolling,SSE
      LogUtil.java:45 [errai] SSE channel opened. LogUtil.java:45 [errai] SSE channel opened. LogUtil.java:45 [errai] SSE channel opened. LogUtil.java:45 [errai] SSE channel opened. LogUtil.java:45 [errai] SSE channel opened. LogUtil.java:45 [errai] components failed to initialize LogUtil.java:45 [errai]    [failed] -> org.jboss.errai.enterprise.client.cdi.api.CDI [errai] SSE channel disconnected. LogUtil.java:45 [errai] the connection to the server has been interrupted ... LogUtil.java:45 [errai] attempting reconnection ...  LogUtil.java:45 POST http://localhost:8080/myapp/out.43180-68647.erraiBus?z=2&clientId=43180-68647 401 (Unauthorized) XMLHttpRequest.java:327 $send_0 XMLHttpRequest.java:327 $doSend RequestBuilder.java:418 $sendRequest RequestBuilder.java:261 $sendPollingRequest HttpPollingHandler.java:515 $transmit HttpPollingHandler.java:228 $transmit_0 SSEHandler.java:121 run_20 SSEHandler.java:210 fire Timer.java:149 (anonymous function) Timer.java:68 apply_1 Impl.java:189 entry0 Impl.java:242 (anonymous function) Impl.java:70 [errai] session expired while in state CONNECTION_INTERRUPTED: attempting to reset ...

       

      It seems that there is a problem with [errai] wait for: org.jboss.errai.enterprise.client.cdi.api.CDI

       

      I was wondering about receiver 'ClientBus' threw an exception I dont see anywhere exception. Additionally reconnect throws 401 (Unauthorized)

       

      There seems to be no problems on server side whatsoever.

       

      My question is how can I dig deeper to find the cause? (thx for help in advance)

        • 1. Re: [3.0-SNAPSHOT] Problem with errai initialization
          Christian Sadilek Master

          Hi Michal,

           

          Can you update your 3.0-SNAPSHOTs or try with yesterdays milesone release (3.0.0.20130604-M1) and see if you still experience this error? We fixed the 401 (Unauthorized) bug yesterday.

           

          Cheers,

          Christian

          1 of 1 people found this helpful
          • 2. Re: [3.0-SNAPSHOT] Problem with errai initialization
            Michal Szymanski Newbie

            Hello Christian,

             

            I did try on the newest SNAPSHOTs from jboss maven repo. I had succesfull compilation after solving problem with JSOUP dependency (below info).

            But I have still runtime problems.

             

            [errai] sending handshake message to remote bus LogUtil.java:45
            Sat Jun 08 15:37:33 GMT+200 2013 com.google.gwt.logging.client.LogConfiguration
            SEVERE: (TypeError) : Cannot call method 'keySet_0' of null
            com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot call method 'keySet_0' of null
                 at Unknown.$doDemarshall_0(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@34:109270)
                 at Unknown.$demarshall_57(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@10:109264)
                 at Unknown.decodePayload_0(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@10:110279)
                 at Unknown.decodePayloadMap(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@10:95174)
                 at Unknown.decodeCommandMessage_0(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@39:95154)
                 at Unknown.decodePayload(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@23:95168)
                 at Unknown.decodeToCallback(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@14:95180)
                 at Unknown.onResponseReceived_3(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@3:94374)
                 at Unknown.onResponseReceived_1(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@21:94142)
                 at Unknown.$fireOnResponseReceived(http://localhost:9876/login/DB1DDCCD4A4F73E6F52039AAF3B966AC.cache.js@14:14070) ConsoleLogHandler.java:63
            Sat Jun 08 15:37:33 GMT+200 2013 WireActivityLogger
            FINEST: Remote logging message acknowledged ConsoleLogHandler.java:63
            [errai] components failed to initialize LogUtil.java:45
            [errai]    [failed] -> org.jboss.errai.bus.client.api.ClientMessageBus LogUtil.java:45
            [errai]    [failed] -> org.jboss.errai.enterprise.client.cdi.api.CDI 
            

             

            Im running super dev mode. Can it be another dependency problem? Will try to review dependencies.

             

             

             

            Few more comments below:

            - JSOUP dependency details

            - errai reflections compilation warning

             

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

            I run into a problem with JSOUP but this ends with problem on compilation level. Below the trace:

             

            [INFO] Caused by: java.lang.NoSuchMethodError: org.jsoup.Jsoup.parse(Ljava/io/InputStream;Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/nodes/Document;

             

            I isolated problem to my own project dependencies on older JSOUP (1.3.3). I updgrade it to match errai dependency JSOUP (1.7.1). (I know I have to make to cleanup it on my own end).

             

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

            Additional I had warning:

             

            [INFO] [08/06/13 03:04:58:058 CEST] ERROR reflections.Reflections: could not create Vfs.Dir from url. ignoring the exception and continuing

            [INFO] org.jboss.errai.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [file:/D:/m2/repository/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.pom]

            [INFO] Available types: [jarfile, jarUrl, directory, vfsfile, vfszip, org.jboss.errai.common.metadata.WarUrlType@23acdefc, org.jboss.errai.common.metadata.JbossVFsTypeHandler@2a6384b0]

            [INFO] Do you need to add app server specific support to your deployment? (For example, errai-jboss-as-support for AS7)

             

            I have errai-jboss-as-support have it on but still got warning (error) message.

            • 3. Re: [3.0-SNAPSHOT] Problem with errai initialization
              Michal Szymanski Newbie

              Had to fall back to 2.3.1.Final. Did not solve my problems.

              When I will have more time will check the newest version and try it again