I'm trying to create a weblogic domain by script. When I create it using config.sh wizard, it works as smoothly as it should. However, when trying to use WLST, I'm getting an error:
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> selectTemplate('Basic WebLogic Server Domain','12.2.1.1')
Error: selectTemplate() failed. Do dumpStack() to see details.
Error: No domain or domain template has been read.
wls:/offline>selectTemplate('Oracle Service Bus Reference Configuration', '12.2.1.4.0')
wls:/offline/>loadTemplates()
wls:/offline/base_domain>
wls:/offline/base_domain>cd('Servers/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','')
wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 7001)
wls:/offline/base_domain/Server/AdminServer>
wls:/offline/base_domain/Server/AdminServer>create('AdminServer','SSL')
Proxy for AdminServer: Name=AdminServer, Type=SSL
wls:/offline/base_domain/Server/AdminServer>cd('SSL/AdminServer')
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('Enabled', 'False')
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('ListenPort', 7002)
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>cd('/')
wls:/offline/base_domain>
wls:/offline/base_domain>cd('Security/base_domain/User/weblogic')
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('weblogic123')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/home/oracle/12.2.1/user_projects/domains/osb25_domain')
com.oracle.cie.domain.script.ScriptException: 64254: Error occurred in "OPSS Processing" phase execution
64254: Encountered error: oracle.security.opss.tools.lifecycle.LifecycleException: JDBC password for opss-audit-DBDS is missing for configuring security store to database.
Does anyone has a sample script to create a domain with OSB on 12.2?
@edit: After updating templates, like this:
selectTemplate('Basic WebLogic Server Domain', '12.2.1.3.0')
selectTemplate('Oracle Service Bus Reference Configuration', '12.2.1.4.0')
loadTemplates()
I wonder how to specify the password they ask? Any suggestion?
I get this:
com.oracle.cie.domain.script.ScriptException: 64254: Error occurred in "OPSS Processing" phase execution
64254: Encountered error: oracle.security.opss.tools.lifecycle.LifecycleException: JDBC password for opss-audit-DBDS is missing for configuring security store to database.
And to be honest, I don't find the documentation very useful. https://docs.oracle.com/middleware/1221/wls/WLSTG/domains.htm#WLSTG406
When you start jdeveloper and open the 'Application Servers' pane and start the IntegratedWebLogicServer for the first time, jdeveloper will create an OSB domain for you and when it does that, it generates a wlst script under your $JDEV_USER_DIR/system12.2.1..... folder. That wlst script can be saved and reused.
I got this script which I customized and now re-use to re-create an OSB domain whenever I need to...