Elusive IBM Connections 4.5 CR2 upgrade issue solved

We’ve had a lot of problems trying to upgrade one of our internal test environments
from IBM Connections 4.5 CR1 to CR2. The only symptom was the we were unable to move
past the screen in the update wizard (updateWizard.sh / updateWizard.bat) where we select
to install or remove fixes. The UI would simply refuse to move past this screen –
no message, no log, no nothing. To try “something else” I got the idea to try and run
the update installer in silent mode (updateSilent.bat / updateSilent.sh) and here we got
something – a stacktrace on the console (see at the end of the post). The stacktrace referenced
“org.xml.sax.SAXParseException: Premature end of file.” so it had to be something to do
with parsing an XML file.

The stacktrace also came when just trying to list the list of installed fixes.

Looking at the stacktrace there was a reference to trying to parse the history of the
Websphere installation so I started to look into the IBM Connections installation and
found some interesting difference between the installed applications. All the applications
(e.g. profiles) has a config/includes directory (profiles/profiles/profiles/config/includes)
which holds information about installed fixes. For some applications there were not mention
of CR1 being installed. Hmmmm… The stacktrace also mentioned “premature end of file” so
I started looking for empty files (e.g. files of 0 bytes) and there I found it.

In the version/history directory (C:/IBM/Connections/version/history) I found a file called
event.history of 0 bytes. Looking at another install I saw this was indeed, or should be,
be an XML file with information about installed fixes. On this system the file was empty. Maybe
the update process when installing CR1 failed to update or add it. Simply making it an
empty “event history” file solved it! (see below for template)

<!DOCTYPE event-history SYSTEM "eventHistory.dtd">
<event-history>

</event-history>

Now when we ran the updateSilent.bat to list the installed fixes we got the expected result
back (CR1). Now running the update wizard worked and we could install CR2.

I guess the lesson really is that if you parse a file that may be empty then treat the
absence of the file (or an empty file of 0 bytes) to mean the same.

C:IBMConnectionsupdateInstaller>updateSilent.bat -fix -installDir "c:ibmConnections"
Start of [ updateSilent.bat ]
Build 20130909_1034

Attempting to locate setupCmdLine.bat.

Setting permissions on c:IBMCONNEC~1version
Launch: com.ibm.websphere.update.silent.UpdateInstaller
  [1]: -fix
  [2]: -installDir
  [3]: c:ibmConnections
System file encoding: Cp1252
Set encoding: console
Console encoding set; checking file encoding.
File encoding is Cp1252; updating to Cp850.
Updating encoding
Locating target class: com.ibm.websphere.update.silent.UpdateInstaller
Locating main method
Building proper arguments
Invoking main method
Der er angivet en rettelsesopdatering
Målbibliotek for produkt: c:ibmConnections
Copyright (c) IBM Corporation 2002, 2013; All rights reserved.
IBM Connections
Version af installationsprogram til opdateringer: 4.5.0.0, dato: 09-09-13

Der er opstået en fejl under visning af installerede rettelser:
org.xml.sax.SAXParseException: Premature end of file.
   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at com.ibm.websphere.product.xml.BaseFactory.load(Unknown Source)
   at com.ibm.websphere.product.xml.BaseFactory.load(Unknown Source)
   at com.ibm.websphere.product.history.WASHistory.loadHistory(Unknown Source)
   at com.ibm.websphere.product.history.WPHistory.initialize(Unknown Source)
   at com.ibm.websphere.product.history.WASHistory.<init>(Unknown Source)
   at com.ibm.websphere.product.history.WPHistory.<init>(Unknown Source)
   at com.ibm.websphere.update.silent.BaseInstaller.commonInitializeProduct(Unknown Source)
   at com.ibm.websphere.update.silent.EFixInstaller.initializeProduct(Unknown Source)
   at com.ibm.websphere.update.silent.BaseInstaller.commonInitialize(Unknown Source)
   at com.ibm.websphere.update.silent.EFixInstaller.initialize(Unknown Source)
   at com.ibm.websphere.update.silent.EFixInstaller.listInstalled(Unknown Source)
   at com.ibm.websphere.update.silent.EFixInstaller.doListInstalled(Unknown Source)
   at com.ibm.websphere.update.silent.UpdateInstaller.process(Unknown Source)
   at com.ibm.websphere.update.silent.UpdateInstaller.main(Unknown Source)
   at com.ibm.websphere.update.silent.UpdateInstaller.main(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
   at java.lang.reflect.Method.invoke(Method.java:611)
   at com.ibm.websphere.update.launch.Launcher.invokeMain(Unknown Source)
   at com.ibm.websphere.update.launch.Launcher.main(Unknown Source)
UpdateInstaller.puiReturnCode is 9

End of [ updateSilent.bat ]