5 Replies Latest reply: Jun 29, 2012 2:22 PM by RomanD RSS

    Serialization issue

    RomanD
      Hey guys,

      I am trying to understand why am I getting next error: incompatible types; found: java.io.Serializable, required: int

      Here is my CO method and imports:

      import oracle.apps.fnd.common.VersionInfo;
      import oracle.apps.fnd.framework.webui.OAControllerImpl;
      import oracle.apps.fnd.framework.webui.OAPageContext;
      import oracle.apps.fnd.framework.webui.beans.OAWebBean;
      import oracle.apps.fnd.framework.OAApplicationModule;

      import java.io.Serializable;
      import java.lang.String;

      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
      {
      super.processRequest(pageContext, webBean);
      OAApplicationModule am = (OAApplicationModule)pageContext.getRootApplicationModule();
      String usrname = pageContext.getUserName();
      Serializable[] params = { usrname };

      int empid = am.invokeMethod("getManagerId",params); // It fails here

      Integer pers_id = new Integer (empid);
      String personid = pers_id.toString();
      Serializable[] parameters = { personid };
      am.invokeMethod("initDetails",parameters);
      }

      Here is my AM method:

      public int getManagerId(String usrname)
      {
      int id;
      ResultSet resultset = null;
      try
      {
      Connection conn = getOADBTransaction().getJdbcConnection();
      String query = "SELECT EMPLOYEE_NUMBER FROM XXPER_PO_EMPLOYEE_DETAILS_V WHERE ORACLE_USERNAME = ' " + usrname + " ' ";
      PreparedStatement stmt = conn.prepareStatement(query);
      resultset = stmt.executeQuery();
      id = (int)resultset.getInt("EMPLOYEE_NUMBER");
      }
      catch(Exception e)
      {}

      return id;
      }


      Thanks

      Edited by: 940793 on Jun 29, 2012 9:04 AM