How to reproduce (from Windows XP command shell):
C:
mkdir tests
sqlplus user/pass@db
exec utgen.testpkg(package_in => 'pkg_foo', output_type_in => utgen.c_file, dir_in => '/tests');
This always results in the following error:
BEGIN utgen.testpkg(package_in => 'pkg_foo', output_type_in => utgen.c_file, dir_in => '/tests'); END;
*
ERROR at line 1:
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 18
ORA-06512: at "SYS.UTL_FILE", line 424
ORA-06512: at "USER.UTGEN", line 302
ORA-06512: at "USER.UTGEN", line 782
ORA-06512: at "USER.UTGEN", line 912
ORA-06512: at line 1
I've also tried passing the directory as tests, \tests, c:\tests and c:/tests, with the same result. What gives?
It looks like this is related to http://utplsql.sourceforge.net/Doc/admin.html#UTL_FILE. Could you please link to this in http://utplsql.sourceforge.net/Doc/utgen.html#testpkg ?
You need to configure Oracle so the UTL_FILE package can write to "C:\TESTS". Consult the Oracle documentation on how to do this.
Diff:
Applied MarkDown formatting for readability
If the post from "Anonymous" above correctly identifies the issue, is this sufficiently clear in the documentation?