3 Replies Latest reply on Jul 15, 2014 4:05 AM by dan.james

    Problems with jsf-deltaspike example with PortletBridge & GateIn 3.7.0

    dan.james

      Hi there,

       

      I have previously tried to add DeltaSpike to a JSF+RichFaces+CDI portlet webapp without success.  Then I came across this example by kenfinni in the PortletBridge docs:

       

      DeltaSpike Example - Portlet Bridge 3.3 - Project Documentation Editor

       

      This stresses the importance of disabling the client window render mode, something that I hadn't done in my previous attempt, so I followed the steps and managed to get the DeltaSpike example portlet deployed on GateIn*.  I was able to access the 'Scopes' page and perform an 'AJAX Refresh' with the command button, but the other buttons threw up errors along the lines of:

       

      15:48:41,935 ERROR [portal:UIPortlet] (http--xxx.xxx.x.xx-8080-1) Portlet render threw an exception: org.exoplatform.services.portletcontainer.PortletContainerException: Error process faces request

      ...

      Caused by: javax.portlet.PortletException: Error process faces request

      ...

      Caused by: javax.portlet.faces.BridgeException: javax.faces.FacesException: WELD-001303 No active contexts for scope type org.apache.deltaspike.core.api.scope.WindowScoped
      ...

       

      And the portlet then fails to render.

       

      I also had problems with the other main pages, 'Messages' and 'Type-Safe View-Config', so none of the functionality seems to be working correctly.

       

      * There are a number of ClassNotFoundExceptions and NoClassDefFoundErrors thrown up during deployment.  This thread in the DeltaSpike mailing list suggest that at least some can be ignored, but I haven't checked them all yet:

      http://mail-archives.us.apache.org/mod_mbox/deltaspike-users/201403.mbox/%3CCAFYChVpdkD+WHU3GaKnPp-F4_ZTGuEKpoyvkzy08Dpu…

       

       

      So before I put some more effort into understanding the example and try to track down what's going wrong, I wanted to check whether this example is still expected to work 'out of the box' (with the additional steps outlined in the PortletBridge docs) with GateIn 3.7.0.  Can anyone confirm that this is the case?

       

      Please note that I'm fairly new to all these frameworks/technologies, so there's likely to be something I'm missing or have done wrong.  I've attached the ds.war file that I deploy in case it's a problem with my build process.

       

       

      Many thanks,

      Dan

        • 1. Re: Problems with jsf-deltaspike example with PortletBridge & GateIn 3.7.0
          kenfinni

          Hi Dan,

           

          First of all, apologies for not responding sooner as I didn't receive a notification of your post.

           

          Last time I checked, the example worked fine, but it has been a while.

           

          I'll try and find some time to test it out myself.

           

          Since your post, have you had any luck in getting it working?

           

          Ken

          • 2. Re: Problems with jsf-deltaspike example with PortletBridge & GateIn 3.7.0
            kenfinni

            Hi Dan,

             

            I just ran some quick tests on GateIn 3.7.0.Final, and it appears that the work to add @ViewAccessScoped made changes to DeltaSpikeLifecycleWrapper which causes Weld exceptions.

             

            The example works with DeltaSpike 0.5, but all versions after that have this problem.

             

            Ken

            • 3. Re: Problems with jsf-deltaspike example with PortletBridge & GateIn 3.7.0
              dan.james

              Hi Ken,

               

              Thanks very much for your replies and for looking into this further.  I only received notification of your more recent message, hence the lack of reply to the first.

               

              I didn't try any further to get that example working.  Once I'd disabled the client window render mode in my own project, then I had what I needed from DeltaSpike in the first instance - i.e. a working @ViewScoped annotation within a CDI portlet.  At least it looks like you've found the technical reason why the example doesn't work as expected with later versions of DeltaSpike (and it wasn't my own incompetence... ). 

               

              In the last couple of weeks we've taken the decision to move away from Java EE, so I'm no longer actively working with these frameworks.

               

              Thanks once again for your help.

               

              Dan