REP-0004: Warning: Unable to open user preference file.

When I try to run Oracle Report rwrun.sh from my Java program, I get this error message:

REP-0004: Warning: Unable to open user preference file.

Apparently it happened because the program can’t find or doesn’t have the privillege to access the prefs.ora file. You can find prefs.ora in here:

$ORACLE_HOME/tools/admin/prefs.ora

So, to fix this error, we must make sure that the prefs.ora is exist in your HOME_DIRECTORY, as for me it’s /home/wks-401/. Yours may be vary. Now we can simply copy the file, or you can make symbolic link to it. I prefer the symbolic link.

ln -sv $ORACLE_HOME/tools/admin/prefs.ora /home/wks-401/

That’s it. This Oracle Report error message REP-0004: Warning: Unable to open user preference file. is never showed up again. 😀