This discussion is archived
1 2 Previous Next 20 Replies Latest reply: Feb 7, 2009 1:27 PM by 566618 RSS

PLS-00753: malformed or corrupted wrapped unit

566618 Newbie
Currently Being Moderated
Hi,
After changing the ip adress on the server, we had some problems with starting up opmnct.
After changing the host file this could be started up again.
Now apex does not work for some reason
I found invalid objects in the database and when I recompiled I get PLS-00753: malformed or corrupted wrapped unit

I found some thread where people advice to reinstall apex

I did an upgrade from 3.1.1 to 3.1.2 with patch p7313609_111060_GENERIC.zip
But still no solution
Errors are
86/5 PL/SQL: Statement ignored
86/5 PLS-00201: identifier 'SYS.WWV_DBMS_SQL' must be declared

Recompile does not work


We found in metalink a case where is told not to compile remotly with toad but execute the script localy with sqlplus.
We tried that but this does not help.

Is there a way to reinstall apex without loosing the applications that I created?

Reinstalling apex (remove script and than install again) drops the FLOWXX schema I suppose...

Regards Jules
  • 1. Re: PLS-00753: malformed or corrupted wrapped unit
    438381 Guru
    Currently Being Moderated
    Jules:

    Does the package 'SYS.WWV_DBMS_SQL' exist in your database ? If so what user accounts have been granted the 'execute' permission on this package.
    In particular, the APEX account needs to have execute privilege on this package.

    Varad
  • 2. Re: PLS-00753: malformed or corrupted wrapped unit
    566618 Newbie
    Currently Being Moderated
    Hi,

    I did grant execute on SYS.wwv_dbms_sql to flows_030100 and grant execute on SYS.wwv_dbms_sql to apex_public_user

    This does not change anything.

    The packages are still invalid

    SYS.wwv_dbms_sql (wrapped)
    FLOWS_030100.wwv_flow_custom_auth_std (wrapped)
    FLOWS_030100.wwv_flow_security (wrapped)
    FLOWS_030100.WWV_FLOW_VAL (wrapped)

    How can this happen?!

    Regards Jules
  • 3. Re: PLS-00753: malformed or corrupted wrapped unit
    438381 Guru
    Currently Being Moderated
    Jules:

    The execute grant on SYS.wwv_dbms_sql to apex_public_user should be removed.

    What are the errors reported for the invalid packages ? The query below will help to find out what these errors are.
    Select * from dba_errors 
    where name in ('WWV_DBMS_SQL','WWV_FLOW_CUSTOM_AUTH_STD','WWV_FLOW_SECURITY','WWV_FLOW_VAL')
    Varad
  • 4. Re: PLS-00753: malformed or corrupted wrapped unit
    566618 Newbie
    Currently Being Moderated
    OWNER|NAME|TYPE|SEQUENCE|LINE|POSITION|TEXT|ATTRIBUTE|MESSAGE_NUMBER
    FLOWS_030100|WWV_FLOW_SECURITY|PACKAGE BODY|1|0|0|PLS-00753: malformed or corrupted wrapped unit|ERROR|753|
    FLOWS_030100|WWV_FLOW_CUSTOM_AUTH_STD|PACKAGE BODY|1|0|0|PLS-00753: malformed or corrupted wrapped unit|ERROR|753|
    FLOWS_030100|WWV_FLOW_VAL|PACKAGE BODY|1|15|11|PLS-00201: identifier 'WWV_FLOW_VAL_LIB' must be declared|ERROR|201|
    FLOWS_030100|WWV_FLOW_VAL|PACKAGE BODY|2|2|3|PL/SQL: Item ignored|ERROR|0|
    SYS|WWV_DBMS_SQL|PACKAGE BODY|1|37|5|PLS-00306: wrong number or types of arguments in call to 'PARSE_AS_USER'|ERROR|306|
    SYS|WWV_DBMS_SQL|PACKAGE BODY|2|37|5|PL/SQL: Statement ignored|ERROR|0|
    SYS|WWV_DBMS_SQL|PACKAGE BODY|3|56|5|PLS-00306: wrong number or types of arguments in call to 'PARSE_AS_USER'|ERROR|306|
    SYS|WWV_DBMS_SQL|PACKAGE BODY|4|56|5|PL/SQL: Statement ignored|ERROR|0|
    SYS|WWV_DBMS_SQL|PACKAGE BODY|5|269|6|PLS-00306: wrong number or types of arguments in call to 'PARSE_AS_USER'|ERROR|306|
    SYS|WWV_DBMS_SQL|PACKAGE BODY|6|269|6|PL/SQL: Statement ignored|ERROR|0|


    Regards Jules
  • 5. Re: PLS-00753: malformed or corrupted wrapped unit
    Tyler Expert
    Currently Being Moderated
    Any chance the APEX install schema was moved from one database to another via export? Changing the IP should not have done this.

    Tyler
  • 6. Re: PLS-00753: malformed or corrupted wrapped unit
    438381 Guru
    Currently Being Moderated
    Jules:
    If you are up to it you could try re-loading the package bodies for the invalid packages from the APEX installation files.
    You will find the files containing these package bodies under 'apex/core/*.plb' under the directory where you extracted the contents of the APEX installation zip archive.

    Connect as sys and run the files for the affected packages.

    Varad
  • 7. Re: PLS-00753: malformed or corrupted wrapped unit
    566618 Newbie
    Currently Being Moderated
    Hi,

    I also believe there is no link at all between changing a ip adres and packages who become invalid.
    My provider has moved this server from location 1 to location 2
    I also tried to change an oracle startup script, because that caused problems.
    I'm sure he rebooted the machine serveral times without any knowledge of starting and shutting down an oracle database.
    Just a simple reboot machine.

    Regards Jules
  • 8. Re: PLS-00753: malformed or corrupted wrapped unit
    566618 Newbie
    Currently Being Moderated
    Hi,
    We tried this yesterday.
    And it did not changed anything.
    I try later because I see now the server is down my reboot command.

    I let you known

    Regards Jules
  • 9. Re: PLS-00753: malformed or corrupted wrapped unit
    566618 Newbie
    Currently Being Moderated
    Hi,

    Here the result :

    @custom_auth_std.plb

    SQL> @custom_auth_std.plb
    ...wwv_flow_custom_auth_std

    Warning: Package Body created with compilation errors.

    Errors for PACKAGE BODY WWV_FLOW_CUSTOM_AUTH_STD:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    0/0 PL/SQL: Compilation unit analysis terminated
    1/14 PLS-00304: cannot compile body of 'WWV_FLOW_CUSTOM_AUTH_STD'
    without its specification

    SQL> @wwv_dbms_sql.plb
    ...wwv_dbms_sql

    Warning: Package Body created with compilation errors.

    Errors for PACKAGE BODY SYS.WWV_DBMS_SQL:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    37/5 PL/SQL: Statement ignored
    37/5 PLS-00306: wrong number or types of arguments in call to
    'PARSE_AS_USER'

    56/5 PL/SQL: Statement ignored
    56/5 PLS-00306: wrong number or types of arguments in call to
    'PARSE_AS_USER'

    269/6 PL/SQL: Statement ignored
    269/6 PLS-00306: wrong number or types of arguments in call to
    'PARSE_AS_USER'

    LINE/COL ERROR
    -------- -----------------------------------------------------------------

    SQL> @wwv_flow_val.sql
    No errors.
    SQL> @wwv_flow_val.plb
    No errors.
    SQL>

    Problem with the script : wwv_flow_security is inpossible to find.
    I searched to whore dir. and in the files but no wwv_flow_security

    Strange

    Regards Jules
  • 10. Re: PLS-00753: malformed or corrupted wrapped unit
    Tyler Expert
    Currently Being Moderated
    For what it's worth, the IP address on my virtual machines changes almost daily, as I use DHCP in most of them. There's no way that changing the IP address got you into this mess. If you are not the DBA, you might ask that person if they imported the FLOWS_XXXXXX from another machine, or perhaps restored a partial backup.

    Your installation appears to be pretty messed up now, so I would start thinking about a "Plan B". You can use the command line export utility that ships with APEX to export your applications. After that I would run the removapx.sql (name might be a bit off) to remove APEX. You'll also need to drop the following objects owned by SYS manually:
    OWNER                          OBJECT_TYPE         OBJECT_NAME
    ------------------------------ ------------------- ------------------------------
    SYS                            LIBRARY             WWV_FLOW_VAL_LIB
    SYS                            PACKAGE BODY        WWV_FLOW_VAL
    SYS                            PACKAGE             WWV_FLOW_VAL
    SYS                            PACKAGE BODY        WWV_DBMS_SQL
    SYS                            PACKAGE             WWV_DBMS_SQL
    As they are not in the current remove script, but should be (this has been fixed for the next release).

    Then do a clean install. You can keep going down your current path, but I'm afraid you may not get it resolved.

    Tyler
  • 11. Re: PLS-00753: malformed or corrupted wrapped unit
    566618 Newbie
    Currently Being Moderated
    Hi Tyler,

    I believe this seems to be the most proper solution
    Where can I find the
    command line export utility that ships with APEX to export

    I hope not in the apex environment, because this cannot be started up.

    Regards Jules
  • 12. Re: PLS-00753: malformed or corrupted wrapped unit
    566618 Newbie
    Currently Being Moderated
    I found it in my Z:\Oracle\apex\3.1.2\apex\utilities\oracle\apex dir
    And I found this to : http://iadvise.blogspot.com/2006/11/automatically-backing-up-your-apex.html

    I'll try it
    Thanks
  • 13. Re: PLS-00753: malformed or corrupted wrapped unit
    Tyler Expert
    Currently Being Moderated
    Sorry but , I'm on my mobile phone now. Google "apex command line export oracle" or search the doc for export. Good luck!

    Tyler
  • 14. Re: PLS-00753: malformed or corrupted wrapped unit
    566618 Newbie
    Currently Being Moderated
    Hi Tyler,

    Trying the oracle.apex.APEXExport

    oracle.apex.APEXExport

    our CLASSPATH should be ok

    /oracledownload/apex311/apex_full_version/utilities/oracle/apex/:/usr/lib/oracle/product/10.2.0/db1/jdbc/lib/classes12.jar

    we also tried : /oracledownload/apex311/apex_full_version/utilities/oracle/apex/:/usr/lib/oracle/product/10.2.0/db1/jdbc/lib/classes12.zip


    When navigate to the location of /oracledownload/apex311/apex_full_version/utilities/oracle/apex/ where we have the APEXExport.class file

    We get the error :

    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/apex/APEXExport
    Caused by: java.lang.ClassNotFoundException: oracle.apex.APEXExport
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

    Any idea what causes this ?!

    Regards Jules
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points