I have a development tool bundle that updates a running equinox framework in batch mode.
I.e. it updates a list of bundles via Bundle.update() and then calls "FrameworkWiring.refresh()" on the entire batch. Sometimes the list includes the updater bundle itself.
In this case the thread that performs the updates needs to complete it's job - including the self update and then as the last act of the dead revision issue a refresh. In that case I expected that the bundle update will succeed with no noticeable effects. Later during the refresh the updater will be rebooted as normal.
Instead however the updater is rebooted within the thread that performs Bundle.update(), and subsequently as the updater thread proceeds I hit a ClassNotFoundError since the old class loader is already destroyed and the old bundle revision jar is removed. I.e. the root cause of the error is a FileNotFoundException for the bundle revision to which the ModuleClassLoader of the old revision is bound.
I have also noticed such "eager update" mode in other cases that do not involve self update. So I though this is a nice occasion to ask when this happens and should it happen at all.