#30 testpkg always fails with "invalid directory path"

Closed-NotABug
nobody
None
[other - please specify]
[Unknown]
Medium
[none]
2015-02-09
2008-10-01
No

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?

Discussion

  • Nobody/Anonymous

    You need to configure Oracle so the UTL_FILE package can write to "C:\TESTS". Consult the Oracle documentation on how to do this.

     
  • Paul Walker

    Paul Walker - 2013-10-12
    • Status: open --> Open
    • Priority: 5 --> Medium
     
  • Paul Walker

    Paul Walker - 2013-10-12
    • Fixed in version: --> [none]
     
  • Paul Walker

    Paul Walker - 2013-10-24
    • labels: utGen -->
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,21 +1,22 @@
     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'\);
    +
    +    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
    +    BEGIN utgen.testpkg(package_in => 'pkg_foo', output_type_in => utgen.c_file, dir_in => '/tests'); END;
    
    -I've also tried passing the directory as 'tests', '\tests', 'c:\tests' and 'c:/tests', with the same result. What gives?
    +    *
    +    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?
    
    • Seen in version: --> [other - please specify]
    • Oracle version: --> [Unknown]
     
  • Paul Walker

    Paul Walker - 2013-10-24

    Applied MarkDown formatting for readability

     
  • Paul Walker

    Paul Walker - 2013-10-24

    If the post from "Anonymous" above correctly identifies the issue, is this sufficiently clear in the documentation?

     
  • Paul Walker

    Paul Walker - 2015-02-09
    • status: Open --> Closed-NotABug
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks