5 Replies Latest reply on May 25, 2007 11:48 PM by Luis Daniel Rangel Tovar

    'sometimes' a nullpointer exception for #{identity.loggedIn}

    koen handekyn Newbie

      i sometimes get a nullpointer exception with the following root:

      rendered="#{identity.loggedIn}": Cannot get value for expression '#{org.jboss.seam.security.identity}'

      the main issue is that it happens sometimes and that triggering a page refresh within the same session just continues as if nothing was wrong.

      so it seems that for some reason i don't understand sometimes the name 'identity' doesn't seem to be bound ???

      i searched the forum but i did not manage to find anything related.

      any comments on this behaviour which is not blocking for development but blocking for deployment.

        • 1. Re: 'sometimes' a nullpointer exception for #{identity.logge
          Frank Fischer Newbie

          Are you using seam 1.2.1 with richFaces/ajax4Jjsf enabled? I suffer from very similar problems. Randomly I get exceptions like your exception or exceptions like this one: "Cannot get value for expression '#{org.jboss.seam.messages}' "

          After I switched off ajax4jsf by commenting out the ajax4jsf filter and the ajax4jsf.VIEW_HANDLERS within web.xml and reactivating the view-handler within faces-config.xml the problem disapears.

          • 2. Re: 'sometimes' a nullpointer exception for #{identity.logge
            Deepak Solasa Newbie

            I am also facing the same problem but in a slight different case.i have a dropdown downlist s like this
            <h:outputLabel value="#{msg.supplier}" />
            <h:selectOneMenu value="#{claimHandler.suppList}">
            <si:selectItems value="#{supplierValues}" var="suppList" label="#{suppList.claimsuppName}" />
            <si:convertEntity entityClass="com.dss.web.model.SupplierModel" />
            <h:outputLabel value="#{msg.suppNo}" />
            <h:selectOneMenu value="#{claimHandler.suppNoList}">
            <si:selectItems value="#{supplierNoValues}" var="suppNoList" label="#{suppNoList.claimsuppNo}" />
            <si:convertEntity entityClass="com.dss.web.model.SupplierNoModel" />

            where if i run individually it is working fine but if i am using the two drop downs at a time in my jsp page ,sometimes it is displaying properly but sometimes it is giving error message as suppNoList.claimsuppNo as not bound at all...

            plz help me ..

            • 3. Re: 'sometimes' a nullpointer exception for #{identity.logge
              Luis Daniel Rangel Tovar Newbie

              Hey ffischer !! I 'm also having that problem !! random #{org.jboss.seam.security.identity} and #{org.jboss.seam.messages} erros, I do have ajax4jsf in web.xml, I can disable it there as you say, but then I get

              Resources framework is not initialised, check web.xml for Filter configuration
              when I disable
               <display-name>Ajax4jsf Filter</display-name>
              in web.xml, how does your web.xml and faces-config.xml look like ? please, that would help a lot.

              • 4. Re: 'sometimes' a nullpointer exception for #{identity.logge
                Frank Fischer Newbie

                Sorry Daniel,

                my comment about disableing ajax4jsf is really misleading. I was in the happy situation that I switched an old seam app (1.1.5) without any use of ajax4jsf over to 1.2.1.GA.
                I used seam-gen to build the project structure for seam 1.2.1 and moved all my classes/src and the necessary configurations over to the new project.
                So ajax4jsf was enabled, but not used in my app - but the errors occured in spite of that.
                After disableing the ajax4jsf filter, everything started to work again flawless.