This discussion is archived
0 Replies Latest reply: Apr 10, 2013 5:49 AM by 980110 RSS

error in wlst through java

980110 Newbie
Currently Being Moderated
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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points