Oracle Error ORA-08116: can not acquire dml enough lock(S mode) for online index build

Oracle Error Message

ORA-08116: can not acquire dml enough lock(S mode) for online index build

Reason for the Error

User attempted to create index online without allowing DML Share lock

Solution

allow DML share lock on the base table