Friday, November 21, 2014

Dumb... no module named dom during startWeblogic.sh

ImportError: no module named dom

This error suddenly appeared in two OAM 11.1.2.2.2 environments, during startup of the stack, more specifically, weblogic startup (startWeblogic.sh).
The complete stack is:
$DOMAIN_HOME/startWebLogic.sh CLASSPATH=/oracle/middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/middleware/jdk1.7.0_45/lib/tools.jar:/oracle/middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/oracle/middleware/wlserver_10.3/server/lib/weblogic.jar:/oracle/middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/oracle/middleware/wlserver_10.3/server/lib/webservices.jar:/oracle/middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/oracle/middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/oracle/middleware/oracle_common/modules/oracle.jrf_11.1.1/jrf-wlstman.jar:/oracle/middleware/oracle_common/common/wlst/lib/adfscripting.jar:/oracle/middleware/oracle_common/common/wlst/lib/adf-share-mbeans-wlst.jar:/oracle/middleware/oracle_common/common/wlst/lib/mdswlst.jar:/oracle/middleware/oracle_common/common/wlst/resources/auditwlst.jar:/oracle/middleware/oracle_common/common/wlst/resources/igfwlsthelp.jar:/oracle/middleware/oracle_common/common/wlst/resources/jps-wlst.jar:/oracle/middleware/oracle_common/common/wlst/resources/jps-wls-trustprovider.jar:/oracle/middleware/oracle_common/common/wlst/resources/jrf-wlst.jar:/oracle/middleware/oracle_common/common/wlst/resources/oamap_help.jar:/oracle/middleware/oracle_common/common/wlst/resources/oamAuthnProvider.jar:/oracle/middleware/oracle_common/common/wlst/resources/ossoiap_help.jar:/oracle/middleware/oracle_common/common/wlst/resources/ossoiap.jar:/oracle/middleware/oracle_common/common/wlst/resources/ovdwlsthelp.jar:/oracle/middleware/oracle_common/common/wlst/resources/sslconfigwlst.jar:/oracle/middleware/oracle_common/common/wlst/resources/wsm-wlst.jar:/oracle/middleware/utils/config/10.3/config-launch.jar::/oracle/middleware/wlserver_10.3/common/derby/lib/derbynet.jar:/oracle/middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/oracle/middleware/wlserver_10.3/common/derby/lib/derbytools.jar:: Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Problem invoking WLST - Traceback (innermost last): File "/oracle/middleware/Oracle_IDM1/common/tools/configureSecurityStore.py", line 10, in ? ImportError: no module named dom Need to do the security configuration first!

The fix

Not sure what causes it; my first impression was that too many files, or a certain type of file upset jython, as the script finished without a glitch when called in another directory.
Also, tarring, and subsequent cleaning of the directory where the script is executed (that is: started from) seemed to help. So, if you're in this situation, and switching directories cures the problem, clean out the directory you use when calling the script.

XML?

Later, a collegue of mine narrowed it down to the existance of an XML subdirectory. Renaming that cured the problem, too.

Hope this helps someone.
Oh - and "dom" means dumb in Dutch - hence the title. And the cause for this error, of course...

2 comments:

Chris Schumacher said...

Thanks a bunch. We actually ran into the same issue. Changed directory and was able to start up the admin server. Very strange. Glad I found your post because there was nothing helpful in Oracle support.

Frank said...

Chris,

Thanks for the thumbs up. It only when you actually start using the product, that you run into these weird problems. That's probably why Support is having trouble coming up with something: they do not use the product.