My Oracle Support Banner

Loading or Dropping of Java Object Fails after 'loadjava' Command on the Jar File is Interrupted Initially (Doc ID 2968240.1)

Last updated on JULY 20, 2024

Applies to:

Oracle Database - Enterprise Edition - Version 19.15.0.0.0 and later
Information in this document applies to any platform.

Symptoms

Loading or dropping of the java object fails after the first attempt to load the source jar file using 'loadjava' command is interrupted. A subsequent attempt to load the jar using dbms_java.loadjava() fails with 'ORA-29537: class or resource cannot be created or dropped directly' error.

dbms_java.loadjava('-force -verbose -noverify -resolve -jarsasdbobjects -recursivejars <jarfilename>');

...
...
...
Error while creating class <classname>
      Exception oracle.aurora.rdbms.WouldReplaceException: In ClassHandle.create in schema APPS

ORA-29537: class or resource cannot be created or dropped directly

An attempt to drop the jar using dbms_java.dropjava() doesn't drop all the Java objects.

dbms_java.dropjava('-force -verbose -noverify -resolve -jarsasdbobjects -recursivejars <jarfilename>');

Similarly, an attempt to drop the java class manually using "drop java class <classname>" command also fails with the error 'ORA-29537: class or resource cannot be created or dropped directly'.

Changes

The initial attempt to load the source jar file using 'loadjava' command is interrupted forcibly.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.