Я пытаюсь запустить следующий WLST-скрипт
import java.lang
import os
import string
# 1 - Connecting to the Destination
connect(username,password,server_url)
edit()
# 2 - Security Realm
print ""
print "================== Seucrity Realm ==================="
startEdit()
serverConfig()
ap = cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvid
er('DefaultAuthenticator')
print "Create group " + user_group
ap.createGroup(user_group, user_group)
print "Craete user " + user_name
ap.createUser(user_name, user_pass, user_name)
print "Add user " + user_name + " to group " + user_group
ap.addMemberToGroup(user_group, user_name)
print "Create global role " + user_role
rm = cmo.getSecurityConfiguration().getDefaultRealm().lookupRoleMapper('XACMLRol
eMapper')
rm.createRole(None, user_role, None)
rm.setRoleExpression(None, user_role, 'Grp(' + user_group + ')')
# Save, activate and exit
# ==========================
print ""
save()
activate()
exit()
Но получаю ошибку
No stack trace available.
Problem invoking WLST - Traceback (innermost last):
File "/u01/oracle/security-realm-config.py", line 40, in ?
File "<iostream>", line 510, in save
File "<iostream>", line 553, in raiseWLSTException
WLSTException: Error occurred while performing save : Cannot call Edit functions
when you are not in the Edit tree.
Сценарий все еще работает, но почему он печатает эту ошибку, и какизбежать этого?