We were applying a pre req patch before upgrade from 12.1.1 to 12.1.3. After sourcing the environment , I did OPATCH lsinventory and it gave expected output. After that when we applied OPATCH apply, it errored out with the message
OPATCH_JAVA_ERROR=OPatch Exception While Trying to Check for Mini Patchset
Looking in My Oracle Support did not give much clue. The Note ID 971783.1 OPATCH_JAVA_ERROR=OPatch Exception While Trying to Check for Mini Patchset’ while applying patch using opatch 184.108.40.206.x. This note suggested removing the ‘&’ and ‘<‘ character from the bug description section in the /etc/config/inventory file. However, my inventory file did not have any such characters except the XML tags, which I couldn’t remove.
It was then that I noticed that the patch was unzipped into a path which had a space in the folder name. We renamed the folder to a simpler name, without spaces and the patch proceeded normally.