In order to trace an oracle error ORA-XXXX, first login database using a privileged account and enable trace:
alter system set events 'XXXX trace name errorstack level 1';
(XXXX is the oracle error number not beginning with zero. You may set trace level up to 3 for more detailed trace)
After trace enabled if ORA-XXXX occurs, you can find a trace file generated in trace (dump) directory.
In order to disable trace:
alter system set events 'XXXX trace name errorstack off';
Generated trace file is more like a memory dump then an error stack. So you may not find what you are looking for...easily...