Opatch fails with "Java could not be located. OPatch cannot proceed!" (Doc ID 2144961.1)

Last updated on JUNE 02, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.0. and later
Information in this document applies to any platform.

Symptoms

opatch commands fails with "Java could not be located. OPatch cannot proceed!" error.

 -bash-4.1$ ./opatch version
Found opatch_env.sh. OPatch is going to source it.
OPATCH_MAX_HEAP_MEMORY=3
OPatch was not able to set FMW_COMPONENT_HOME by itself.
- Detect the option -jre/-jdk ? 0
- Start JVM Discovery ...
CAS jars exist ? 0 [./jlib/com.oracle.glcm.patch.content-store_12.2.0.0.jar]
JAVA version : 5 [/oracle/asm/grid/product/11.2.0.3/grid/jdk]
Can Use JAVA ? 0
- Detect the bundled jre (./jre) ? 1
CAS jars exist ? 0 [./jlib/com.oracle.glcm.patch.content-store_12.2.0.0.jar]
JAVA version : [./jre]                  <-------------------- No Java version is returned from $ORACLE_HOME/OPatch/jre
Can Use JAVA ? 0
Java could not be located. OPatch cannot proceed!
OPatch returns with error code = 1

 

Changes

 Installed latest Opatch (11.2.0.3.13)

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