ORA-24384: Application context size is not initialized
Cause : The size of the application context must be initialized before populating each context element.
Action - How to fix it : DBA Scripts :: www.high-oracle.com/scripts
Issue OCIAttrSet with OCI_ATTR_CTX_SIZE to initialize context size
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.