The plugins have been downloaded but update didn't take place:
I faced this issue myself for some time. Researching the internet resulted in finding someone who suggest removing the JRE folder. The solution sounded like trying to fix a cracked wall with glue but I tried it and it worked!!
P2 update apparently uses this JRE folder and will regenerate it if you delete it. Removing the JRE folder also implies that the application is now going to use the default JRE. This means that now we have no control over the run level of the application. If our application is using JRE version 1.6 and the default runtime environment is 1.5, then we are at risk that our application will not work.
A college of mine was analysing this issue. He used a packet analyser and discovered something very interesting.
P2 sends a time stamp to the repository location. This time stamp represents the time of creation of the artifacts used for the latest update made by the application.
P2 will make the usual steps for updating (e.g. check the meta-data repository if a later version exist, download that version). But before actual update of the application (or un-install then install to be exact), this is the moment where the use of the time stamp kicks in.
P2 uses this time stamp to make sure that the artifacts downloaded are created after the artifacts already installed (in other words, comparing the time of creation of the artifacts on the repository with the time of creation of the installed artifacts).
So if the platform downloaded artifacts that were created on the same day (or earlier) as the files it already has, then even thou the versions suggests that this update is a later one, P2 will not update.
The other thing we need to take notice of is that the time stamp smallest unit is the day. That means that if the artifacts of the repository are created later that same day, P2 would still refuse to update.
Testing this is rather easy. Change the clock on your PC a couple of days back and create a product. Afterwards, move it back to the current time and create another product (the one we are going to update to). We are going to use the repository created with the second product for the update. You will find that P2 will update smoothly.
In my opinion, this will not cause a problem in an actual production environment because almost never will it happen that we create a product, distribute it then add an update for it that was created on the same day as the product itself!. If this ever happens to you, my advice is wait a day before you put create your update artifacts.
Thanks for reading.