OPatch command error, Oracle SOA 12c opatch commad

I was executing opatch command to know about version but I had been facing the following error. I could not understand why is it happening. Then I used the correct path of JDK with below command an it worked.
[oracle@bpm01 OPatch]$ ./opatch lsinventory
Exception in thread “main” java.lang.UnsupportedClassVersionError: com/oracle/cie/gdr/external/InventoryException : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at oracle.opatch.OPatch.main(OPatch.java:548)

OPatch failed with error code 1
[oracle@bpm01 OPatch]$

Here is the command with JDK path in linux

[oracle@bpm01 OPatch]$ ./opatch lsinventory -jdk /usr/java/jdk1.7.0_75

OPatch Version : 13.2.0.0.0
  OUI  Version : 12.1.0.1.0
The OPatch version is not applicable for current OUI version.

Since OUI Version starts with 12.1, Please go to ‘My Oracle Support’ and get right OPatch 12.1.*.*.* based on patch 6880880, release version 12.1.0.0.0 and appropriate platform.
 I hope it could be helpful if someone faces this issue.


Posted

in

, ,

by

Tags:

Comments

2 responses to “OPatch command error, Oracle SOA 12c opatch commad”

  1. akula Avatar

    Excellent. Thankyou

  2. Ravi Avatar

    This helped. Thanks. It worked.