Error: No domain or domain template has been read
If you have just recently started to get your hands dirty with weblogic & wlst, you’ll may not be aware of all the wlst commands and scenarios in which those commands can be used. The documentation for wlst, and weblogic in general, is so huge that it is OK for anyone to have missed out such niti-grities.
During a similar situation, I faced below error when I was trying to execute “getNodeManagerHome()” command on wlst using node manager connection.
“Error: No domain or domain template has
been read.”
Ø
WLST command & error message
Welcome to
WebLogic Server Administration Scripting Shell Type help() for
help on available commands wls:/offline>
getNodeManagerHome() Error: No domain or domain template has been
read. wls:/offline> |
At first I thought this may be because of my not being connected to the node manager. But as you can see below, soon that assumption turned out to be wrong.
wls:/offline>
nmConnect('weblogic', 'xxxxxxxx', '10.xx.xx.xx', '5556','poc_domain', '/opt/app/oracle/middleware/user_projects/domains/poc_domain','plain') Connecting to
Node Manager ... Successfully
Connected to Node Manager. wls:/nm/poc_domain>
getNodeManagerHome() Error: No
domain or domain template has been read. wls:/nm/poc_domain> |
Ø
Solution
To execute several commands, you must first read the domain template using readDomain(), and then you can execute those commands.
wls:/offline>
readDomain('/opt/app/oracle/middleware/user_projects/domains/poc_domain') wls:/offline/poc_domain>getNodeManagerHome() '/opt/app/oracle/middleware/user_projects/domains/poc_domain/nodemanager' |
Note that readDomain() is used on offline mode, i.e. without actually connecting using the weblogic/node manager credentials.
The other commands, which impose that you first read the domain using readDomain() are: updateDomain(), addTemplate(), etc.
Ø
Reference
https://docs.oracle.com/cd/E13222_01/wls/docs92/config_scripting/reference.html#wp1003638
Continue to to SeeITwithSanjay for more blogs on FMW.