java.io.SyncFailedException: JBAS016855: copied content does not match expected hash for item: ModuleItem{...}

Solution Verified - Updated

Environment

  • Red Hat JBoss Developer Studio(JBDS) 9.0.0
  • Red Enterprise Application Platform (EAP) 6.4

Issue

I'm configuring JBDS 9.0.0GA (jboss-devstudio-9.0.0.GA-CVE-2015-7501-installer-eap.jar) and just tried to patch its EAP to 6.4.5 (jboss-eap-6.4.5-patch.zip)... it fails with this error:

java.io.SyncFailedException: JBAS016855: copied content does not match expected hash for item: ModuleItem{org.apache.commons.collections:main}
  • Used jboss-cli.bat with "patch apply D:\path\jboss-eap-6.4.5-patch.zip"
  • Same error if I try to patch to 6.4.4
  • The patch works SUCCESSFULLY on the older CR1 release jboss-devstudio-9.0.0.CR1-installer-eap.jar
  • I applied the patch immediately after installing JBDS, doing a one time start of jbdevstudio.bat

And these lines are printed in the EAP server log:

11:57:11,286 ERROR [org.jboss.as.patching] (management-handler-thread - 5) JBAS016802: failed to undo change for: 'MiscContentItem{bin/client/jboss-cli-client.jar}'
11:57:11,365 ERROR [org.jboss.as.patching] (management-handler-thread - 5) JBAS016802: failed to undo change for: 'MiscContentItem{bin/client/jboss-client.jar}'
11:57:11,366 ERROR [org.jboss.as.patching] (management-handler-thread - 5) JBAS016802: failed to undo change for: 'MiscContentItem{bin/standalone.sh}'
11:57:11,366 ERROR [org.jboss.as.patching] (management-handler-thread - 5) JBAS016802: failed to undo change for: 'MiscContentItem{docs/schema/jboss-web_7_2.xsd}'
11:57:11,367 ERROR [org.jboss.as.patching] (management-handler-thread - 5) JBAS016802: failed to undo change for: 'MiscContentItem{version.txt}'

Resolution

  • Rollback the one off patch as shown in [1] (use --reset-configuration=false to not change your configuration) and then apply the cumulative patch using the patch command as shown in [2]

  • It can be a issue where the files copied from Windows to Unix Machine and it has Ctrl+M characters, which can be confirmed by using cat -v <FILENAME>. If the file has CtrlM characters, that can be handled by using dos2unix /path/to/<FILENAME>.

There is a bug listed in the root cause to fix the issue in a future cumulative patch, so that the rollback is not needed.

[1] How do I rollback individual or cumulative patches in JBoss EAP 6.2 and beyond? - https://access.redhat.com/solutions/639403
[2] How do I apply individual or cumulative patches for zip-based installations of JBoss EAP 6.2 and later? - https://access.redhat.com/solutions/625683

Root Cause

This content is not included.Cumulative patch fails to apply when current patches modules are not included in CP with: java.io.SyncFailedException: JBAS016855: copied content does not match expected hash for item: ModuleItem - https://bugzilla.redhat.com/show_bug.cgi?id=1295999

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.