Skip navigation

I had to create JAVA SOURCES (CREATE OR REPLACE JAVA SOURCE NAMED...), and JAVA FUNCTIONS (create or replace function blabla RETURN NUMBER AS LANGUAGE JAVA NAME...).  But they would not compile.  The error was ORA-29548 Java system class reported: could not identify release specified in classes.bin

Searching for the cause, I realized that everything Java-related returned that ORA-29548 error. For instance:

create function get_java_property(prop in varchar2)

return varchar2 is

language java name 'java.lang.System.getProperty(java.lang.String) return java.lang.String';


select get_java_property('java.version') from dual;

returned the dreaded ORA-29548.


After quite a bit of googling, I found MOS note ID 2149046.1,  which deals with that very issue.  According to that note, in my case, the cause would be that when installing a Java-related PSU, the post-install action (typically, an sql script) was not run.  I had applied a Java-related PSU to a number of Oracle Homes and databases  a few weeks before, so I checked whether all the instalation and post_installation actions had been taken properly.  It turns out that patch 21153423, which I applied to a number of ORACLE_HOMES, requires an sql script to be run in startup upgrade mode:

cd %ORACLE_HOME%\sqlpatch\21153423

sqlplus /nolog

SQL> shutdown
SQL> startup upgrade
SQL> @postinstall.sql
SQL> shutdown
SQL> startup


As you can see, this must be run on every database of each server.  How to check whether it has been run on each database?  The contents of postinstall.sql reveal that this script drops a SYS package:

execute immediate 'drop package SYS.sqljutl2';

So all we have to do is check for the presence of that package.  To that effect, you can use the nifty SQLDeveloper feature found in View/Find Db Ojbect:

SearchSQLJUTL2.jpg Or you can use the following SELECT:


Most databases returned no rows for that SELECT, except one!  And as you have correctly guessed, it was the database on which I was getting ORA-29548.

Si I applied the script according to the steps aforementionned, in startup upgrade mode:

running the postinstall.jpg



and after restarting my database in normal mode, I was able to compile my Java code!


And the SELECT above ran OK:

select get_java_property('java.version') from dual;