domingo, 17 de janeiro de 2016

ORA-29548: Java system class reported: could not identify release specified in classes.bin

Hoje ao tentar plugar um PDB 12.1.0.1 em um banco 12.1.0.2, me deparei com o erro: "ORA-29548: Java system class reported: could not identify release specified in classes.bin".

Para resolver o problema, fiz o upgrade da jdk 1.6 para 1.7:

[oracle@oracle01 tmp]$ /u02/app/oracle/product/12.1.0/dbhome_2/perl/bin/perl  $ORACLE_HOME/javavm/install/update_javavm_binaries.pl 7
[oracle@oracle01 tmp]$ cd $ORACLE_HOME/rdbms/lib
[oracle@oracle01 lib]$ make -f ins_rdbms.mk ioracle
chmod 755 /u02/app/oracle/product/12.1.0/dbhome_2/bin

 - Linking Oracle
rm -f /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/oracle
/u02/app/oracle/product/12.1.0/dbhome_2/bin/orald  -o /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/ -L/u02/app/oracle/product/12.1.0/dbhome_2/lib/ -L/u02/app/oracle/product/12.1.0/dbhome_2/lib/stubs/   -Wl,-E /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/opimai.o /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/ssoraed.o /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/ttcsoi.o -Wl,--whole-archive -lperfsrv12 -Wl,--no-whole-archive /u02/app/oracle/product/12.1.0/dbhome_2/lib/nautab.o /u02/app/oracle/product/12.1.0/dbhome_2/lib/naeet.o /u02/app/oracle/product/12.1.0/dbhome_2/lib/naect.o /u02/app/oracle/product/12.1.0/dbhome_2/lib/naedhs.o /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/config.o  -lserver12 -lodm12 -lcell12 -lnnet12 -lskgxp12 -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 -lknlopt `if /usr/bin/ar tv /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap12" ; fi` -lskjcx12 -lslax12 -lpls12  -lrt -lplp12 -lserver12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 `if [ -f /u02/app/oracle/product/12.1.0/dbhome_2/lib/libavserver12.a ] ; then echo "-lavserver12" ; else echo "-lavstub12"; fi` `if [ -f /u02/app/oracle/product/12.1.0/dbhome_2/lib/libavclient12.a ] ; then echo "-lavclient12" ; fi` -lknlopt -lslax12 -lpls12  -lrt -lplp12 -ljavavm12 -lserver12  -lwwg  `cat /u02/app/oracle/product/12.1.0/dbhome_2/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnro12 `cat /u02/app/oracle/product/12.1.0/dbhome_2/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnnzst12 -lzt12 -lztkg12 -lmm -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lztkg12 `cat /u02/app/oracle/product/12.1.0/dbhome_2/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnro12 `cat /u02/app/oracle/product/12.1.0/dbhome_2/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnnzst12 -lzt12 -lztkg12   -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 `if /usr/bin/ar tv /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo12 -lserver12"; fi` -L/u02/app/oracle/product/12.1.0/dbhome_2/ctx/lib/ -lctxc12 -lctx12 -lzx12 -lgx12 -lctx12 -lzx12 -lgx12 -lordimt12 -lclsra12 -ldbcfg12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -locr12 -locrb12 -locrutl12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12  -lgeneric12 -loraz -llzopro -lorabz2 -lipp_z -lipp_bz2 -lippdcemerged -lippsemerged -lippdcmerged  -lippsmerged -lippcore  -lippcpemerged -lippcpmerged  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lsnls12 -lunls12  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lasmclnt12 -lcommon12 -lcore12  -laio -lons    `cat /u02/app/oracle/product/12.1.0/dbhome_2/lib/sysliblist` -Wl,-rpath,/u02/app/oracle/product/12.1.0/dbhome_2/lib -lm    `cat /u02/app/oracle/product/12.1.0/dbhome_2/lib/sysliblist` -ldl -lm   -L/u02/app/oracle/product/12.1.0/dbhome_2/lib
test ! -f /u02/app/oracle/product/12.1.0/dbhome_2/bin/oracle ||\
  mv -f /u02/app/oracle/product/12.1.0/dbhome_2/bin/oracle /u02/app/oracle/product/12.1.0/dbhome_2/bin/oracleO
mv /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/lib/oracle /u02/app/oracle/product/12.1.0/dbhome_2/bin/oracle
chmod 6751 /u02/app/oracle/product/12.1.0/dbhome_2/bin/oracle
[oracle@oracle01 lib]$ cd $ORACLE_HOME
[oracle@oracle01 dbhome_2]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sun Jan 17 19:57:54 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size    2924928 bytes
Variable Size  520097408 bytes
Database Buffers 1073741824 bytes
Redo Buffers   13848576 bytes
Database mounted.
Database opened.
SQL> @?/javavm/install/update_javavm_db.sql
SQL> SET FEEDBACK 1
SQL> SET NUMWIDTH 10
SQL> SET LINESIZE 80
SQL> SET TRIMSPOOL ON
SQL> SET TAB OFF
SQL> SET PAGESIZE 100
SQL>
SQL> alter session set "_ORACLE_SCRIPT"=true;

Session altered.

SQL>
SQL> -- If Java is installed, do CJS.
SQL>
SQL> -- If CJS can deal with the SROs inconsistent with the new JDK,
SQL> -- the drop_sros() call here can be removed.
SQL> call initjvmaux.drop_sros();

Call completed.

SQL>
SQL> create or replace java system;
  2  /

Java created.

SQL>
SQL> update dependency$
  2    set p_timestamp=(select stime from obj$ where obj#=p_obj#)
  3    where (select stime from obj$ where obj#=p_obj#)!=p_timestamp and
  4          (select type# from obj$ where obj#=p_obj#)=29  and
  5          (select owner# from obj$ where obj#=p_obj#)=0;

0 rows updated.

SQL>
SQL> commit;

Commit complete.

SQL>
SQL> alter session set "_ORACLE_SCRIPT"=false;

Session altered.

SQL>
SQL> select dbms_java.get_jdk_version() from dual;

DBMS_JAVA.GET_JDK_VERSION()
--------------------------------------------------------------------------------
1.7.0_51

1 row selected.


2 comentários:

Adriano Tanaka disse...

Bom dia Alex,

Estou pegando esse erro durante um expdp:
ORA-29548: Java system class reported: release of Java system classes in the database (12.1.0.0.0 1.6) does not match that of the oracle executable (12.1.0.2.170117 1.6)
ORA-06512: at "SYS.DBMS_JAVA", line 520
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 10763

A versão do banco é a 12.1.0.2.0, posso executar esse procedimento que você fez?

Alex Zaballa disse...

Bom dia,

Esse banco é CDB ou NON-CDB?

Foi aplicado algum patch recente?