0 Replies Latest reply: Apr 10, 2013 7:49 AM by 980110 RSS

    error in wlst through java

    980110
      Hi all,

      I was trying to use wlst embedded in java for importing metadata file to a server using the following function:

      private static void importMetaData() {
      StringBuffer buff = new StringBuffer();
      buff.append("connect('weblogic','weblogic1','t3://localhost:7101')\n");
      buff.append("importMetadata(application='FintechTrainingAppEar', server='DefaultServer', fromLocation='/scratch/software/OracleAlerts/FintechTrainingApp_2/deploy/EssMar.mar')");
      interpreter.exec(buff.toString());

      }

      but I am getting following error:

      Exception in thread "main" Traceback (innermost last):
      File "<string>", line 2, in ?
      NameError: importMetadata


      If I directly run them as WLST command every thing is working fine. Can any one please suggest a solution.