6 Replies Latest reply on Jan 22, 2011 6:33 AM by Roger Lee

    JBoss AS 6 & Seam 2.2.1.CR3 - Object now null

    Roger Lee Apprentice

      I have moved my live JBoss 4.2.3 Seam (jboss-seam-2.2.1.CR2) Application (live for past 18 months) to;


      JBoss 6.0.0 Final using SEAM 2.2.1.CR3.


      I created a new project with seam-gen (2.2.1.CR3) and moved my source code and (modified) resources (xml files).


      The EAR deploys okay under jboss-6.0.0.Final and starts with no errors and only one warning.


      In one of my pages I select a value from a drop-down list which is used in my SFSB as a selection criteria (for a Database call) and it should retrieve a list of way-points on a journey


      <h:outputLabel for="journeysDevicesToTrack">Device to track</h:outputLabel>
           <h:selectOneMenu value="#{selectedDevicesToTrack}" id="journeysDevicesToTrack"      required="true" >
                <s:selectItems value="#{devicesToTrackList}" 
                            var="devicesToTrack" 
                            label="#{devicesToTrack.vehicleAllocatedTo}"
                            noSelectionLabel="Please Select ..." />
                           <s:convertEntity/> 
                           <a4j:support event="onchange" action="#{devicesToTrackBean.getPiNPOiNTsByDeviceIdMobileNumberFromDateToDate()}" reRender="panelGridPinPointsList" oncomplete="loadJourney()" />
               </h:selectOneMenu> 
               <rich:message for="journeysDevicesToTrack">
               </rich:message>
      




      This and similar code elsewhere has been working in my AS 4.2.3/Seam 2.1.1.CR2 live version but the “devicesToTrack” injected object is now null.


      /** The devices to track. */
      @In (create = true, required = false)
      @Out (required = false)
      private DevicesToTrack devicesToTrack;
      



      Accessed here;


      @SuppressWarnings({ "unchecked", "deprecation" })
      @Factory("pinPointsList")  
      public final void getPiNPOiNTsByDeviceIdMobileNumberFromDateToDate() {
      
      log.info("***** getPiNPOiNTsByDate emailAddress     = " +      this.devicesToTrack.getDevicesToTrackPK().getEmailAddress());
      }
      



      Any suggestions? Thanks.

        • 1. Re: JBoss AS 6 & Seam 2.2.1.CR3 - Object now null
          Craig Bensemann Novice

          Not sure if its relevant but when I was attempting migration from 5.1 to 6.0 I had a number of runtime issues (rich:calendar not working and noSelectionLabel issues) anyway I found that by forcing AS6 to use jsf 1.2 by default and not 2.0 everything started working fine again.



          Craig

          • 2. Re: JBoss AS 6 & Seam 2.2.1.CR3 - Object now null
            Roger Lee Apprentice

            Interesting ... the calendar is the next thing to test.


            To same me time where do change JBoss AS 6 to use JSF 1.2?


            Thanks.

            • 3. Re: JBoss AS 6 & Seam 2.2.1.CR3 - Object now null
              Roger Lee Apprentice

              Just looked at the JBoss AS 6 start-up and I get;


              WARN  [BaseXMLFilter] This version of RichFaces implementation compatible for JSF1.2, but running under JSF2.0
              



              • 4. Re: JBoss AS 6 & Seam 2.2.1.CR3 - Object now null
                Craig Bensemann Novice

                I tried with RF jsf2 implementation of 3.3.3 and didn't have much luck. I must admit to forgetting to raise the issue with the RF team.


                you need to edit your deployers/jsf.deployer/META-INF/jsf-integration-deployer-jboss-beans.xml


                and set


                 
                     <property name="defaultJSFConfig">
                         <value>Mojarra-1.2</value>
                      </property>
                
                

                • 5. Re: JBoss AS 6 & Seam 2.2.1.CR3 - Object now null
                  Roger Lee Apprentice

                  Didn't help I'm afraid. The devicesToTrack object is still null.


                  The RF Calendar is working fine with both JSF 2.0 and 1.2, the dates selected are being passed back to my SFSB.


                  Thanks anyway, will continue investigating and post any successful solution.

                  • 6. Re: JBoss AS 6 & Seam 2.2.1.CR3 - Object now null
                    Roger Lee Apprentice

                    Roger Lee wrote on Jan 20, 2011 17:48:

                    <h:outputLabel for="journeysDevicesToTrack">Device to track</h:outputLabel>
                         <h:selectOneMenu value="#{selectedDevicesToTrack}" id="journeysDevicesToTrack"      required="true" >
                              <s:selectItems value="#{devicesToTrackList}" 
                                          var="devicesToTrack" 
                                          label="#{devicesToTrack.vehicleAllocatedTo}"
                                          noSelectionLabel="Please Select ..." />
                                         <s:convertEntity/> 
                                         <a4j:support event="onchange" action="#{devicesToTrackBean.getPiNPOiNTsByDeviceIdMobileNumberFromDateToDate()}" reRender="panelGridPinPointsList" oncomplete="loadJourney()" />
                             </h:selectOneMenu> 
                             <rich:message for="journeysDevicesToTrack">
                             </rich:message>
                    




                    Changed reference in SFSB to use 'selectedDevicesToTrack' and it now works. Which is what I would expect but in JBoss AS 4.2.3 with Seam 2.2.1.CR2 I used 'devicesToTrack'.