From error, it's evident that schema "APEX_040200" already exists in your DB. Have you already installed apex 4.2 or tried to install before?
Or you updating apex from old version or installing in new db.
If APEX was never installed in DB and you are trying to install, then you can just log-in as SYS user and you can DROP user APEX_040200
I actually installed it before and for some error i got while creating workspace i removed apex . now i am trying to re-install it then i got the below error. Can i go ahead for installation or else i am missing something ??
Error: This version of Application Express is already installed (APEX_040200).
ERROR at line 1:
ORA-00900: invalid SQL statement
ORA-06512: at line 9
I have not yet downloaded or tired apex 4.2, but I'm sure you will have a script to uninstall apex in downloaded zipped file. (In 4.0, you can run "apxremov.sql" to remove apex.) First run this script to remove any apex specific objects from DB, then try to install.
After running apxremov.sql only i am trying to install but still i am getting th eabove error.