Total Pageviews

Wednesday, March 29, 2017

OAM export policies error Traceback (innermost last): File "", line 1, in ? NameError: exportPolicy


wls:/oam_domain/serverConfig> exportPolicy(PathTempOAMPolicyFile='/tmp/pre_upgrade_oam.xml')
Traceback (innermost last):
  File "<console>", line 1, in ?
NameError: exportPolicy
wls:/oam_domain/serverConfig> exportPolicy('/tmp/policy_export.xml')
Traceback (innermost last):
  File "<console>", line 1, in ?
NameError: exportPolicy
wls:/oam_domain/serverConfig> exit()


Solution:

you are running wlst.sh command from wrong place. it should be run from $ORACLE_HOME/common/bin/wlst.sh

find where is ORACLE_HOME/common/bin

and run 
wlst.sh

wls:/oam_domain/serverConfig> exportPolicy('/tmp/policy_export.xml')
Successfully exported policies. Check log file for details.

if you got below error use  command without path

wls:/oam_domain/serverConfig> exportPolicy(PathTempOAMPolicyFile='/tmp/pre_upgrade_oam.xml')
Traceback (innermost last):
  File "<console>", line 1, in ?
TypeError: exportPolicy() got an unexpected keyword argument 'PathTempOAMPolicyFile'


use command without PathTempOAMPolicyFile


wls:/oam_domain/serverConfig> exportPolicy('/tmp/policy_export.xml')







No comments:

Post a Comment