ORA-37118: The OLAP API library was not preloaded.
Cause : In shared-server mode, the OLAP API library should be loaded during process initialization to ensure that the C++ virtual table addresses are identical in all shared-server processes. The OLAP API session was executing in a process in which the library had not been loaded.
Action - How to fix it : DBA Scripts :: www.high-oracle.com/scripts
Set option _XSOLAPI_LOAD_AT_PROCESS_START to SHARED_SERVER or ALWAYS, restart the instance, and try again.
Well, the reason for above error is that i have taken the above script from a 11g database and running it on 10g database. 11g has bring some changes in password management. Below code is executed on 11g and user created successfully, which is expected result.