Invalid Spatial JAVA Classes after Database Upgrade (Doc ID 1079611.1)

Last updated on AUGUST 17, 2016

Applies to:

Oracle Spatial and Graph - Version 10.2.0.4 and later
Information in this document applies to any platform.
***Checked for relevance on 20-Sep-2014***

Symptoms

Since upgrading the database from 10gR2 to 11gR2, Spatial is INVALID:

SQL> select COMP_NAME,VERSION, STATUS
2 from dba_registry where comp_id='SDO';

COMP_NAME       VERSION    STATUS
--------------- ---------- ----------
Spatial         11.2.0.3.0 INVALID


And MDSYS-owned JAVA classes such as below had become invalid:

  MDSYS./4e9308f3_BMPWriter             - JAVA CLASS
  MDSYS./73b53e9_PNGWriter              - JAVA CLASS
  MDSYS./986b07df_BLOBWriter          - JAVA CLASS
  MDSYS./c3c9e350_JPEGWriter           - JAVA CLASS
  MDSYS./e57050d7_TIFFWriter           - JAVA CLASS
  MDSYS./f5bcad1_GeoRasterAdapter   - JAVA CLASS

Recompiling these objects fail with errors like:

SQL> alter java class "MDSYS"."/4e9308f3_BMPWriter" compile;

Warning: Java altered with compilation errors.

SQL> show errors java class "MDSYS"."/4e9308f3_BMPWriter"
Errors for JAVA CLASS "MDSYS"."/4e9308f3_BMPWriter":

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0 ORA-29521: referenced name com/sun/media/jai/codec/BMPEncodeParam could not be found
0/0 ORA-29521: referenced name com/sun/media/jai/codec/ImageEncodeParam could not be found
0/0 ORA-29521: referenced name com/sun/media/jai/codec/ImageEncoder could not be found
0/0 ORA-29521: referenced name com/sun/media/jai/codec/ImageCodec could not be found

SQL> alter java class "MDSYS"."/73b53e9_PNGWriter" compile;

Warning: Java altered with compilation errors.

SQL> show errors java class "MDSYS"."/73b53e9_PNGWriter"
Errors for JAVA CLASS "MDSYS"."/73b53e9_PNGWriter":

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0 ORA-29521: referenced name com/sun/media/jai/codec/PNGEncodeParam$RGB could not be found
0/0 ORA-29521: referenced name com/sun/media/jai/codec/PNGEncodeParam$Gray could not be found
0/0 ORA-29521: referenced name com/sun/media/jai/codec/PNGEncodeParam$Palette could not be found
0/0 ORA-29521: referenced name com/sun/media/jai/codec/ImageEncodeParam could not be found
0/0 ORA-29521: referenced name com/sun/media/jai/codec/ImageCodec could not be found
0/0 ORA-29521: referenced name com/sun/media/jai/codec/ImageEncoder could not be found
0/0 ORA-29521: referenced name com/sun/media/jai/codec/PNGEncodeParam could not be found


These invalid MDSYS-owned java classes objects are all dependent on interMedia, however, interMedia's imchk.sql shows ORDIM is valid:

SQL> @?/ord/im/admin/imchk.sql

PL/SQL procedure successfully completed.


Component Status
-------------------------------------------------- ----------
COLORFREQUENCIESLIST Public Grant                  VALID
COLORFREQUENCIESLIST Varray                        VALID
...
TEXTUREENCODING Public Grant                       VALID
TEXTUREENCODING Varray                             VALID
com.sun.media.jai.* Java package                   VALID
com.sun.media.jai.mlib.* Java package              VALID
com.sun.medialib.mlib.* Java package               VALID
javax.media.jai.* Java package                     VALID
oracle.ord.media.* Java package                    VALID

262 rows selected.

interMedia installation is valid

PL/SQL procedure successfully completed.


Reloading the Spatial java classes does not validate these objects:

connect / as sysdba
@?/md/admin/sdoloadj.sql

-- Then recompile any invalids:
connect / as sysdba
@?/rdbms/admin/utlrp.sql

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms