Sunday, April 4, 2010

OPatch failed with error code = 1 java.lang.UnsupportedClassVersionError

Problem Description
Issuing "opatch version" failed with Exception in thread "main" java.lang.UnsupportedClassVersionError: oracle/opatch like below.

$ opatch version
Received the following error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: oracle/opatch
/OPatch (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)

OPatch failed with error code = 1

Cause of the Problem
The problem happened because opatch version is latest and it is higher than the oracle database version. When you download 11.1.0.6.3 OPatch utility for Oracle 9.2 Release, 11.1.6.0.3 OPatch expects the Oracle Home JDK version to be 1.4 and above, whereas the 9.2 ORACLE_HOME jdk version was 1.3 and hence it errored out with Java exceptions.

Solution of the Problem
Download the correct OPatch utility for your Database Release.
The new OPatch utility is available at Metalink as Patch 6880880.
Select Release "10.1.0.0.0" for 9.2 and 10gR1,
"10.2.0.0.0" for 10gR2 and
"11.1.0.0.0" for 11gR1.

Related Documents
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed
OPatch failed with error code 74 - CheckActiveFilesAndExecutables failed
How to Download Patchset or Opatch from metalink
List of Patchset number in metalink
SEVERE:OUI-67073: Apply Session failed: ApplySession::processLocal() failed in system
OPatch supported patch methods in RAC environment

No comments:

Post a Comment