1 Reply Latest reply on Feb 7, 2012 5:14 PM by Giovanni Formenti

    Problem in migrating richfaces based application from weblogic 8.1 to 10.3

    Megha Goyal Newbie

      I am migrating applications from weblogic 8.1 to Weblogic 10.3
      I have also upgraded tachnology stack as given below:


      Framework/Technology Old Version Upgraded Version
      JAVA (JDK) 1.4.2 1.6 (jrockit_160_17_R28.0.0-679)
      Hibernate 3.1.1 3.5.3
      Spring 1.2.8
      JSF 1 1.2
      Tomahawk 1 1.2
      myfaces 1.1.5 1.1.10
      jsf-facelets 1.1.11 1.1.15
      richfaces 3.1.6.SR1 3.3.3.Final


      I am facing following 2 issues and need help:


      1. When I am using new version of richfaces that is 3.3.3.Final I am unable to compile the code using ant compilation.
      It is throwing following error in many jspx files at compile time :
      team-edit-dialog.jspx:25:20: Static attribute must be a String literal, its illegal to specify an expression.
      <a4j:outputPanel id="#{panelGpId}">
      It is not accepting expression for id attribute in many richfaces and a4j tags such as a4j:commandLink and rich:modalPanel.


      2. When I am using old version richfaces ie 3.1.6.SR1 code is compilable and deployable(using ant script to compile and deploy the code)
      But at runtime as soon as user tries to login to the application ViewExpiredException is thrown.
      Setting context parameter facelets.BUILD_BEFORE_RESTORE to true in web.xml resolves ViewExpiredException.
      This context parameter changes the way view is restored.
      But when we perform any add/edit/delete operation in the application while clicking on save null pointer exception is thrown for the object being added/edited/deleted.
      Following exception is thrown :
      Caused By: javax.el.PropertyNotFoundException: //C:/tools/bea-103/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/ai-tempora_2.0.9.wl103.b1/un7voa/ai-tempora-web.war/activity-edit-dialog.jspx @32,82 value="#{activityBB.selectedActivity.name}": Target Unreachable, 'selectedActivity' returned null.


      This is occuring because:
      On Activity.jspx inside a4j:commandLink following code is used to set ActivityBB.selectedActivity object of the backing bean:
      <f:setPropertyActionListener value="#{activity}"target="#{activityBB.selectedActivity}" />
      When we click on edit action link for any activity it is set into activityBB.selectedActivity and edit activity dialog box is displayed.
      As scope of ActivityBB is request in faces-config.xml in edit activity dialog box when we edit the activity and click on save button above exception is thrown as selectedActivity is recreated and therefore it is null .
      We are using following tag to keep ActivityBB in view scope but this code is not working as expected.
      <a4j:keepAlive beanName="activityBB" />


      If we change the scope of bean to session the code works fine but we can't change it to session.