When you configure yor domain in WebLogic 11g, by screen install or by scripts, when you choose Production Mode security will be more strict as in Development Mode.
Normally it would require a boot.properties afterwards to create in order to start; anyway, all kinds of unnecessary steps.
In a scripted install with WLST , here is a way to override it… watch wonderous python!:lol:
First, in your script define some variables:
def createBootPropertiesFile(domain_dir, username, password) :
if not os.path.exists(domain_dir + “/servers/” + “AdminServer” + “/security”):
os.makedirs(domain_dir + “/servers/” + “AdminServer” + “/security”)
filename=(domain_dir + “/servers/” + “AdminServer” + “/security/boot.properties”)
f=open(filename, ‘w’)
line=’username=’ + username + ‘\n’
f.write(line)
line=’password=’ + password + ‘\n’
f.write(line)
f.close()
else:
print ‘domain_dir + “/servers/” + “AdminServer” + “/security” exists’
Then, finally in your WriteDomain statement include
if (properties.production_mode_enabled):
createBootPropertiesFile(properties.domain_dir, ‘weblogic’, properties.weblogic_password)
else:
print ‘Dry run completed, if you still have an interactive session (started with wlst -i), ‘ + \
‘run: writeDomain(\” + properties.domain_dir + ‘\’) to write the domain to disk’
if (properties.production_mode_enabled):
print ‘and createBootPropertiesFile(\” + properties.domain_dir + ‘\’,\’weblogic\’,’+ ‘\” + properties.weblogic_password + ‘ \’)’
No Responses