1 2 3 Previous Next 33 Replies Latest reply: Jul 5, 2012 3:19 AM by 998899-Oracle RSS

    Null pointer exception while trying to get view object inside AM

      Hi all,

      I am using jdev
      I am trying to create session in the application
      but view object is throwing null pointer exception even though the view object is available inside the impl class
          protected void prepareSession(Session session) {
              LOGGER.log(ADFLogger.TRACE, "Preparing the user session...");
            String emailId = ADFContext.getCurrent().getSecurityContext().getUserName();
              LOGGER.log(ADFLogger.TRACE, "Setting the user-context - app_user_lang on the database...");*/
                 ViewObjectImpl UserAuthentionEVO =  this.getUserAuthenticationEVO();
                UserAuthentionEVO.setNamedWhereClauseParam("The_EmailId", emailId);//Throws null pointer exception
                  Row row= UserAuthentionEVO.first();
                   if (row != null) {
                  getSession().getUserData().put("USER_ID", row.getAttribute("UserId"));
                 getSession().getUserData().put("ROLE_ID" , row.getAttribute("RoleId"));
          public ViewObjectImpl getUserAuthenticationEVO() {
              return (ViewObjectImpl)findViewObject("UserAuthenticationEVO");
      this.getUserAuthenticationEVO() is returning null

      Why is this throwing the error?
      ANy idea why its pointing to null?

      Thanks in advance,

      Edited by: Rakesh on 04-Jul-2012 07:22
        1 2 3 Previous Next