So, if you create the database by yourself, then always run these scripts under the sys schema. see the solution below:
ORA-19206: Invalid value for query or REF CURSOR parameter
What causes this error?
The queryString argument passed to DBMS_XMLGEN.newContext was not a valid query, or REF CURSOR.
Solution:
Steps to fix this:
1. connect sys/change_on_install as sysdba
2. Run the script catalog.sql, catproc.sql, catmeta.sql
@c:\oracle\ora92\rdbms\admin\catalog.sql
@c:\oracle\ora92\rdbms\admin\catproc.sql
@c:\oracle\ora92\rdbms\admin\catmeta.sql