How to Fix a Change in Classloading Introduced to WLST in WebLogic Server 10.3.3 (Doc ID 1420110.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server - Version: 10.3.3 and later   [Release: and later ]
Information in this document applies to any platform.

Goal

A difference in class loading results in WLST scripts which worked in WebLogic Server 10.3.2 failing in WebLogic Server 10.3.3 and later. The following "get_java_class.py" script illustrates the issue:

myjar = 'myjar.jar';
sys.path.append(myjar)
print '################################# SYS.PATH:'
print sys.path
from abc.efg.hij.config import NodeClass
print '################################# NodeClass:'
print NodeClass

From WebLogic Server 10.3.3, this fails with the following error:

Problem invoking WLST - Traceback (innermost last):
File "<path>/get_java_class.py", line 5, in ?
ImportError: cannot import name NodeClass

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms