Sunday, October 19, 2025

How to retrieve WebLogic password in R12.2

WebLogic is used as part of Oracle EBS R12.2. "weblogic" account is used to start EBS services and is used to log onto WebLogic Admin console (at hostname.domain.com:s_wls_adminport). Its password is encrypted and saved on the file system. Here are two steps I ran in my R12.2 environments to decrypt it.

1. Identify WebLogic Domain path and boot.properties file

$ echo $EBS_DOMAIN_HOME
$RUN_BASE/FMW_Home/user_projects/domains/EBS_domain
$ cd $EBS_DOMAIN_HOME/servers/AdminServer/security
$ ls 
boot.properties
$ more boot.properties
username={AES}mE0mATL4+Lv/gLcIuuuuuuuuu=
password={AES}2kGMi4fcZ7FwYXWIxxxxxxxxx=

2. Run wlst.sh to decrypt the password

$ cd $FMW_HOME/wlserver_10.3/common/bin
$ ls
commEnv.sh       config.sh  security    startDerby.sh   stopDerby.sh  upgrade.sh     wlsifconfig.sh
config_builder.sh  pack.sh    setPatchEnv.sh  startManagedWebLogic.sh  unpack.sh     wlscontrol.sh  wlst.sh
$ sh wlst.sh
CLASSPATH=/u01/app/... ......
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> domain = '$EBS_DOMAIN_HOME'   # <= replace the env variable with the real path
wls:/offline> service = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domain)
wls:/offline> encryption = weblogic.security.internal.encryption.ClearOrEncryptedService(service)
wls:/offline> print "Weblogic server password is: %s" %encryption.decrypt("{AES}2kGMi4fcZ7FwYXWIxxxxxxxxx=")
Weblogic server password is: webLogicPWD
wls:/offline> ^C

If you get Java error, most likely you entered a wrong path or a wrong encrypted password/string.

My WebLogic version is 10.3.6.0.210119. It can be found by two lines:
$ . $FMW_HOME/wlserver_10.3/server/bin/setWLSEnv.sh
... ...
Your environment has been set.
$  java weblogic.version
... ...
WebLogic Server 10.3.6.0.210119 PSU Patch for ...
... ...
If you want to change weblogic password, please read How to change weblogic password

Wednesday, October 15, 2025

adcgnjar gets Java memory error

After custom Java code files are copied to EBS file system, adcgnjar gets Java error.

$ which adcgnjar
$AD_TOP//bin/adcgnjar

$ adcgnjar
Copyright (c) 2002, 2012 Oracle Corporation
Redwood Shores, California, USA
AD Custom Jar Generation
Version 12.2.0
... ...
About to Generate customall.jar : Fri Sep 26 2025 11:59:42

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at oracle.apps.ad.jri.fwk.ZipFileResourceUnitArea.getResourceUnit(ZipFileResourceUnitArea.java:914)
at oracle.apps.ad.jri.fwk.JRIArchiveOutputUtils.scanAllResourceUnits(JRIArchiveOutputUtils.java:659)
at oracle.apps.ad.jri.fwk.JRIArchiveOutputUtils.updateJRIArchiveZip(JRIArchiveOutputUtils.java:285)
at oracle.apps.ad.jri.fwk.JRIArchiveOutputUtils.writeJRIArchive(JRIArchiveOutputUtils.java:218)
at oracle.apps.ad.jri.adjmx.mergeAndExtract(adjmx.java:1395)
at oracle.apps.ad.jri.adjmx.main(adjmx.java:592)
error:
Failed to generate customall.jar
Restoring customall.bak to customall.jar

The cause can be two reasons:
* Java application has a memory leak. There are tools like YourKit Java Profiler that help to identify such leaks.
* Java application really needs a lot of memory (more than 128 MB by default!). In this case the Java heap size can be increased using the following runtime parameters:
java -Xms<initial heap size> -Xmx<maximum heap size>

Add physical memory to server may not fix the problem. The EBS fix is an env variable, and then run adcgnjar again:
$ export JAVA_TOOL_OPTIONS="-verbose -Xmx2048M -Xms2048M"
 
The same error may occur in applying a patch by ADOP when "export" the env variable on command line does not avoid the error. The fix is to add that same line to file $APPL_TOP/admin/adovars.env (or custom env file) and then run the main env file.