Skip to content

Commit f0b4faa

Browse files
authored
Merge pull request #283 from oracle/atpfix4cmdargs
fix the npe caused by another option - domain_home
2 parents 23029b7 + fbb026b commit f0b4faa

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

core/src/main/python/create.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from java.lang import IllegalArgumentException
1111
from java.lang import IllegalStateException
1212
from java.lang import String
13+
from java.lang.System import System
1314
from oracle.weblogic.deploy.create import CreateException
1415
from oracle.weblogic.deploy.deploy import DeployException
1516
from oracle.weblogic.deploy.util import CLAException
@@ -341,7 +342,8 @@ def validateRCUArgsAndModel(model_context, model):
341342
has_atpdbinfo = atp_helper.has_atpdbinfo(rcu_db_info)
342343

343344
if model_context.get_archive_file_name() and not has_regular_db:
344-
os.environ['oracle.jdbc.fanEnabled'] = 'false'
345+
System.setProperty('oracle.jdbc.fanEnabled', 'false')
346+
345347
# 1. If it does not have the oracle.net.tns_admin specified, then extract to domain/atpwallet
346348
# 2. If it is plain old regular oracle db, do nothing
347349
# 3. If it deos not have tns_admin in the model, then the wallet must be in the archive

core/src/main/python/wlsdeploy/tool/create/atp_helper.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,12 @@ def is_regular_db(rcu_db_info):
184184

185185

186186
def extract_walletzip(model, model_context, archive_file, atp_path):
187-
domain_path = model_context.get_domain_parent_dir() + os.sep + model[model_constants.TOPOLOGY][
188-
'Name']
187+
domain_parent = model_context.get_domain_parent_dir()
188+
if domain_parent is None:
189+
domain_path = model_context.get_domain_home()
190+
else:
191+
domain_path = domain_parent + os.sep + model[model_constants.TOPOLOGY][
192+
'Name']
189193
extract_path = domain_path + os.sep + 'atpwallet'
190194
extract_dir = File(extract_path)
191195
extract_dir.mkdirs()

0 commit comments

Comments
 (0)