1 Reply Latest reply on Jul 4, 2012 2:03 PM by 929890

    loadjava failed with ORA-29533


      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 dropjavabefore 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 abc/xyz/util/Logging zu überschreiben, während RTIDB.abc/xyz/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.

      Maybe a hint:
      In my Eclipse I have several projects and I wanted to put all the needed classes from different projects into a single JAR to make the Java Stored Procedure run with Oracle. Do I have to consider some options to be set when building the JAR like I always generate an uncompressed JAR?

      How can I solve this problem?

        • 1. Re: loadjava failed with ORA-29533
          [loadjava ORA-29533| [http://www.devshed.com/c/a/Oracle/Extending-PLSQL-with-Java-Libraries/1/] ]

          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.