我在使用wlst時有一個關於從java獲取角色的過程。 我的代碼如下:由java執行OBIEE wlst命令
import weblogic.management.scripting.WLST;
import weblogic.management.scripting.utils.WLSTInterpreter;
public class JavaTestWLST {
public JavaTestWLST() {
}
public static void main(String[] args) {
try {
WLST.ensureInterpreter();
WLSTInterpreter interpreter = WLST.getWLSTInterpreter();
interpreter.exec("connect('admin','admin','t3://server:7001')");
interpreter.exec("listAppRoles('obi')");
//or interpreter.exec("listAppRoles(appStripe='obi')");
//still eror NameError: listAppRole
}
catch(Exception e){
System.out.println("Exception_111:"+e.toString());
}
}
}
我sussessfully連接,但有一個錯誤。 錯誤: 例外:回溯(最裏面的最後一個): 文件「」,第1行,在? NameError:listAppRoles
請幫我 謝謝。
感謝您的答案,interpreter.exec更換( 「listAppRoles(appStripe = '腰帶')」 後, );我仍然有同樣的錯誤,因爲befor。我不知道爲什麼?請幫幫我。謝謝 – HoangThu