3 Replies Latest reply on Aug 19, 2013 9:08 AM by Cpt.Tom

    WRAP utility does not work - empty output file


      I am using Oracle 11g ( on windows 7 enterprise.
      While trying to wrap an sql file with some source code, the output file was empty. I saw another closed thread saying I should run cmd.exe as administrator, but that does not help.
      So, what I tried:


      E:\>c:\oracle11xe\app\oracle\product\11.2.0\server\bin\wrap.exe iname=logon.sql
      PL/SQL Wrapper: Release Production on Sat Jan 28 17:25:21 2012
      Copyright (c) 1993, 2009, Oracle. All rights reserved.
      Processing logon.sql to logon.plb

      and output file (logon.plb in the example above) was empty no matter of:
      - the way cmd.exe was launched (normal or as administrator)
      - the way wrap.exe was called (with full path or just simply wrap iname=logon.sql)
      - the name/location of the input file
      - the name/location of the output file
      - the content of the input file
      - the editor I used (TOAD, notepad) to create the input file.

      Anyone has any idea why wrap does not work?

      Even more (and this would be a 2nd question), I tried to wrap directly into the database, but got " PLS-00753: malformed or corrupted wrapped unit" all the time. The object was created unwrapped and invalid.
      Again I tried several things:
      - change source code: package, package body, procedure, ...
      - have last character on new line
      - run with different grants (SYS, non-DBA user)
      - run with TOAD and sqlplus. The only difference here was that with sqlplus I had "Warning: Procedure created with compilation errors.", but I guess because sqlplus the way sqlplus treats errors.
      Here is an example:

      v_date VARCHAR2;
      INTO v_date
      FROM DUAL;
      END my_test;

      If anyone could help either make the wrap utility work either create wrapped objects it would be great.

      many thanks
        • 1. Re: WRAP utility does not work - empty output file
          I am also facing same error.
          Please let me know if your issue resolved.
          • 2. Re: WRAP utility does not work - empty output file
            same issue here:
            wrapping pl/sql

            workaround is to create wrapped versions using DBMS_DDL.WRAP
            • 3. Re: WRAP utility does not work - empty output file

              I´m not very happy about running helper-processes under admin-credentials like suggested here, specially when they should run in a batch-job.


              So i stepped into the deep ... and found out, that WRAP, even if it does not tell you anything about any error on the commandline,

              it writes into following logfiles  C:\Users\<user>\Oracle\ORADIAG_<user>\DIAG\CLIENTS\USER_<user>\HOST_4145470312_76\ALERT\LOG.XML

              and C:\Users\<user>\Oracle\ORADIAG_<user>\DIAG\CLIENTS\USER_<user>\HOST_4145470312_76\TRACE\SQLNET.LOG

              (not sure, if that number after HOST_ varies on different installations)


              Having a look in these logs, i´ll found out, that during that clumsy oracle-installation process, it simply has forgotten to create

              the directory %ORACLE_HOME%\log\clients which obviously is required for the wrap-tool and also needs read/write-access.


              After created that folder and granted read/write to it, wrap works fine ...