1 Reply Latest reply: Jul 4, 2012 9:03 AM by 929890 RSS

    loadjava failed with ORA-29533

    929890
      Trying to use loadjava with a Java Stored Procedure failed when using a custom class written on my own.
      I used this command:
      loadjava -u user/passwd@host:1521:xxx -v -r -resolver "((* MYSCHEMA) (* PUBLIC))" C:\Temp\JavaStoredProcedureTest.jar
      I even used dropjava before loadjava:
      dropjava -user user/passwd@host:1521:xxx -schema MYSCHEMA -verbose abc\xyz\test\JavaStoredProcedureTest
      creating : resource META-INF/MANIFEST.MF with resolver ((* MYSCHEMA) (* PUBLIC))
      loading  : resource META-INF/MANIFEST.MF
      creating : resource META-INF/REFACTORINGS.XML with resolver ((* MYSCHEMA) (* PUBLIC))
      loading  : resource META-INF/REFACTORINGS.XML
      identical: abc/xyz/db/DbKey
      creating : source abc/xyz/db/DbKey with resolver ((* MYSCHEMA) (* PUBLIC))
      loading  : source abc/xyz/db/DbKey
      Error while creating source abc/xyz/db/DbKey
          ORA-29533: Versuch, Klasse oder Ressource lbb/apc/util/Logging zu überschreiben, während RTIDB.lbb/apc/util/Logging definiert oder kompiliert wird
      ORA-06512: in row 1
      Literally translated:
            ORA-29533: Versuch, Klasse oder Ressource abc/xyz/db/DbKey zu überschreiben, während MYSCHEMA.abc/xyz/db/DbKey definiert oder kompiliert wird
      -->ORA-29533: Attempt to overwrite class or resource abc/xyz/db/DbKey while MySchema.lbb/apc/db/DbKey is being defined or compiled

      I didn't find any sites in the WWW describing this issue.

      Even when using classes like oracle.sql.SQLXML or so I have this problem. How can I tell loadjava/Oracle explicitely to use particular classes (like oracle.sql.SQLXML, custom (my own) classes or even probably Java classe not being in the PUBLIC schema). I guess that many more Java classes can not be resolved so that there must be a way to tell Oracle where/how to finde/use them.
      How can I solve this problem?
        • 1. Re: loadjava failed with ORA-29533
          929890
          The replace option in theloadjava utility does not work in some releases. Use dropjava with the –user option and the <file_name>.class before rerunning theloadjava utility.

          [http://www.devshed.com/c/a/Oracle/Extending-PLSQL-with-Java-Libraries/1/]