JBAS016840: Patch does not apply - expected (6.3.0.GA), but was (6.3.2.GA)

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.2+

Issue

  • When trying to upgrade from EAP6.3.2 to EAP6.3.3 with command as below:
patch apply /tmp/jboss-eap-6.3.3-patch.zip

An error shows:

JBAS016840: Patch does not apply - expected (6.3.0.GA), but was (6.3.2.GA)
  • When trying to apply a individual patch an error is shown:
patch apply BZ1234567.zip
Conflicts detected: org.jboss.as.ejb3:main
[standalone@localhost:9999 /] patch apply /tmp/jboss-eap-6.4.22-patch.zip
JBAS016840: Patch does not apply - expected (6.4.19.GA), but was (6.4.0.GA)

Resolution

  1. Stopping problematic EAP6.3.2 instance;
  2. Copying the hidden folder .installation with files inside from original ${EAP6.3.2_HOME}\ to problematic ${EAP6.3.2_HOME}\;
  3. Starting problematic EAP6.3.2 instance;
  4. Accessing to CLI console and using command as below to update.
patch apply /tmp/jboss-eap-6.3.3-patch.zip

Root Cause

  • The hidden folder .installation stores patches info, it is key point for updating or rollbacking patches.
    This folder should not be deleted!
  • If I create a new EAP_HOME by copying some folders from original one but missed the hidden folder .installation, this issue ca be caused when I do patch action.

Diagnostic Steps

  • Go to ${EAP_HOME}\, using command ls -a to find if hidden folder .installation exists.
  • Access to CLI console, using command patch info or patch history to find if the output is correct.

Main article with overview and links :
Updated Patch Management with EAP 6.2+
JBAS016840: Patch does not apply - expected (6.4.0.GA), but was (6.4.x.GA)

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.