1 Reply Latest reply on Feb 6, 2012 8:15 PM by Jason Porter

    javax.el.PropertyNotFoundException:

    ganesh venkataraman Newbie

      I am new to seam.. I generated entities from an existing database in this war project i setup from command prompt using seamgen.

       

      I am getting this error for some of the tables and it works fine for the rest.

       

      I get the following error when i click on the browse list page from seam home page.

       

      javax.el.PropertyNotFoundException: /LCollMainList.xhtml @19,94 value="#{lCollMainList.lCollMain.id.collDesig}": Property 'lCollMain' not found on type com.mydomain.PATCompass.action.LCollMainList_$$_javassist_seam_2

      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)

       

      Here is the corresponding LCollMainList.xhtml section

       

                <s:decorate template="layout/display.xhtml">

                      <ui:define name="label">Coll desig</ui:define>

                      <h:inputText id="collDesig" value="#{lCollMainList.lCollMain.id.collDesig}"/>

                  </s:decorate>

       

      A copy of the generated LCollMainList action class:  I tweaked the constructor to confirm if this class is getting executed and i do see the getLCollMain in the declared method names. I am not sure why this is failing for some classes and not the rest.. Any thoughts?

      public class LCollMainList extends EntityQuery<LCollMain> {

      private static final String EJBQL = "select lCollMain from LCollMain lCollMain";

      private static final String[] RESTRICTIONS = {
         "lower(lCollMain.id.collDesig) like lower(concat(#{lCollMainList.lCollMain.id.collDesig},'%'))",
         "lower(lCollMain.id.collateralType) like lower(concat(#{lCollMainList.lCollMain.id.collateralType},'%'))",
         "lower(lCollMain.id.collateralUse) like lower(concat(#{lCollMainList.lCollMain.id.collateralUse},'%'))",
         "lower(lCollMain.id.otherDesc) like lower(concat(#{lCollMainList.lCollMain.id.otherDesc},'%'))",
         "lower(lCollMain.id.updtUser) like lower(concat(#{lCollMainList.lCollMain.id.updtUser},'%'))",
         "lower(lCollMain.id.workId) like lower(concat(#{lCollMainList.lCollMain.id.workId},'%'))",};

      private LCollMain lCollMain;

      public LCollMainList() {
        System.out.println("<============= Created class LCollMainList ====================>");
        lCollMain = new LCollMain();
        Method[] methods = this.getClass().getDeclaredMethods();
        for (int i=0;i< methods.length;i++){
         System.out.println("Method name = "+methods[i].getName());
        }
        lCollMain.setId(new LCollMainId());
        setEjbql(EJBQL);
        setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
        setMaxResults(25);
      }

      public LCollMain getLCollMain() {
        System.out.println("in method getLCollMain()");
        return lCollMain;
      }
      }