Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Eclipse 4 and p2(An error occurred while collecting items to be installed)
Eclipse 4 and p2 [message #1005171] Thu, 24 January 2013 15:30 Go to next message
Beat Schaller is currently offline Beat SchallerFriend
Messages: 42
Registered: July 2009
Member
We are working with a pure E4 Application.

After reading some posts and all the necessary stuff to get working the p2 update we still have a problem.
http://www.ralfebert.de/blog/eclipsercp/p2_updates_tutorial_36/
http://wiki.eclipse.org/Equinox/p2/Adding_Self-Update_to_an_RCP_Application
http://aniefer.blogspot.ch/2009/03/building-p2-rcp-products-in-eclipse.html
http://www.vogella.com/articles/EclipseP2Update/article.html

All seems to work as long as we test on a file repository. The update is done, no error.

But if we copy the repository to our Web-Server we got an error. The first part - check if an update is needed works...
        final UpdateOperation operation = new UpdateOperation(session);
        final SubMonitor sub = SubMonitor.convert(monitor, "Checking for application updates...", 200);
        IStatus status = operation.resolveModal(sub.newChild(100));
        if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
            LOG.debug("nothing to update");
            return status;
        }
        if (status.getSeverity() == IStatus.CANCEL) {
            LOG.debug("update - cancel");
            throw new OperationCanceledException();
        }
        if (status.getSeverity() != IStatus.ERROR) {
            LOG.debug("update - install");
            final ProvisioningJob job = operation.getProvisioningJob(null);
            status = job.runModal(sub.newChild(100));
            if (status.getSeverity() == IStatus.CANCEL) {
                LOG.debug("update - install - cancel");
                throw new OperationCanceledException();
            } else if (status.getSeverity() == IStatus.OK) {
                LOG.debug("update - install - ok");
            } else {
                LOG.debug("update - install - " + status.getSeverity() + "/" + status.getMessage());
            }
        }


after the check in
status = job.runModal(sub.newChild(100));
we got an error: >> An error occurred while collecting items to be installed

Why there is a difference between file and http?? no other message
And - the plugin to update is now on the client side, but the client allways tries to update...

Any hints?

Thx
Beat
Re: Eclipse 4 and p2 [message #1005175 is a reply to message #1005171] Thu, 24 January 2013 15:33 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Can it be that you miss the HTTP-Provider from ecf?

Tom

Am 24.01.13 16:30, schrieb Beat Schaller:
> We are working with a pure E4 Application.
>
> After reading some posts and all the necessary stuff to get working the
> p2 update we still have a problem.
> http://www.ralfebert.de/blog/eclipsercp/p2_updates_tutorial_36/
> http://wiki.eclipse.org/Equinox/p2/Adding_Self-Update_to_an_RCP_Application
> http://aniefer.blogspot.ch/2009/03/building-p2-rcp-products-in-eclipse.html
> http://www.vogella.com/articles/EclipseP2Update/article.html
>
> All seems to work as long as we test on a file repository. The update is
> done, no error.
>
> But if we copy the repository to our Web-Server we got an error. The
> first part - check if an update is needed works...
>
> final UpdateOperation operation = new UpdateOperation(session);
> final SubMonitor sub = SubMonitor.convert(monitor, "Checking for
> application updates...", 200);
> IStatus status = operation.resolveModal(sub.newChild(100));
> if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
> LOG.debug("nothing to update");
> return status;
> }
> if (status.getSeverity() == IStatus.CANCEL) {
> LOG.debug("update - cancel");
> throw new OperationCanceledException();
> }
> if (status.getSeverity() != IStatus.ERROR) {
> LOG.debug("update - install");
> final ProvisioningJob job = operation.getProvisioningJob(null);
> status = job.runModal(sub.newChild(100));
> if (status.getSeverity() == IStatus.CANCEL) {
> LOG.debug("update - install - cancel");
> throw new OperationCanceledException();
> } else if (status.getSeverity() == IStatus.OK) {
> LOG.debug("update - install - ok");
> } else {
> LOG.debug("update - install - " + status.getSeverity() +
> "/" + status.getMessage());
> }
> }
>
>
> after the check in status = job.runModal(sub.newChild(100)); we got an
> error: >> An error occurred while collecting items to be installed
>
> Why there is a difference between file and http?? no other message
> And - the plugin to update is now on the client side, but the client
> allways tries to update...
>
> Any hints?
>
> Thx Beat
Re: Eclipse 4 and p2 [message #1005366 is a reply to message #1005175] Fri, 25 January 2013 06:39 Go to previous messageGo to next message
Beat Schaller is currently offline Beat SchallerFriend
Messages: 42
Registered: July 2009
Member
Thanks Tom

But no, the httpclient is available. And as i wrote in my question - it is strange because the changed plugin and feature was transfered, so no http problem in sense of the protocol. And in the artifact.xml the changed versions are available.

So the problem is why i get an error on update? And why the client tries to reupdate if the plugin is updated?

Beat
Re: Eclipse 4 and p2 [message #1005390 is a reply to message #1005366] Fri, 25 January 2013 08:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Is it possible that your HTTP-Server is compressing stuff? We had
problems in one of our product because the sizes in the artifact didn't
match anymore what the server delivered?

So we turned of gzip-ing in our apache config for the p2 sites.

Tom

Am 25.01.13 07:39, schrieb Beat Schaller:
> Thanks Tom
>
> But no, the httpclient is available. And as i wrote in my question - it
> is strange because the changed plugin and feature was transfered, so no
> http problem in sense of the protocol. And in the artifact.xml the
> changed versions are available.
>
> So the problem is why i get an error on update? And why the client tries
> to reupdate if the plugin is updated?
> Beat
Re: Eclipse 4 and p2 [message #1005396 is a reply to message #1005390] Fri, 25 January 2013 09:00 Go to previous messageGo to next message
Beat Schaller is currently offline Beat SchallerFriend
Messages: 42
Registered: July 2009
Member
Could be - Thanks. I will check it. In the artifact.xml I see different size for the updated feature and plugin. I will update you...

Beat
Re: Eclipse 4 and p2 [message #1005402 is a reply to message #1005396] Fri, 25 January 2013 09:42 Go to previous messageGo to next message
Beat Schaller is currently offline Beat SchallerFriend
Messages: 42
Registered: July 2009
Member
I tested both local and server (http) update again. The download size is the same but:
A difference between the two artifact.xml files
    <artifact classifier='osgi.bundle' id='org.sat4j.core' version='2.3.0.v20110329'>
      <properties size='1'>
        <property name='download.size' value='210700'/>
      </properties>
    </artifact>
    <artifact classifier='org.eclipse.update.feature' id='ch.sbb.test.p2.feature' version='1.0.3'>
      <properties size='1'>
        <property name='download.size' value='724'/>
      </properties>
      <repositoryProperties size='1'>
        <property name='artifact.folder' value='true'/>
      </repositoryProperties>
    </artifact>


    <artifact classifier='org.eclipse.update.feature' id='ch.sbb.test.p2.feature' version='1.0.1'>
      <properties size='1'>
        <property name='download.size' value='725'/>
      </properties>
      <repositoryProperties size='1'>
        <property name='artifact.folder' value='true'/>
      </repositoryProperties>
    </artifact>


The update with http leads to an artifact.xml with two feature entries with version 1.0.1 and 1.0.2, the updated one and the old one.
If I update over file:/// the second (red) is deleted.

So how can I influence this behaviour or what is the reason? Where is this update done and why this behaviour?

Beat
Re: Eclipse 4 and p2 [message #1005405 is a reply to message #1005402] Fri, 25 January 2013 09:49 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I guess this forum is the wrong one to discuss p2 strangness ;-) Are you
saying that the artifact you get from the server is different than the
one you generate as part of your build?

Tom

Am 25.01.13 10:42, schrieb Beat Schaller:
> I tested both local and server (http) update again. The download size is
> the same but:
> A difference between the two artifact.xml files
> <artifact classifier='osgi.bundle' id='org.sat4j.core'
> version='2.3.0.v20110329'>
> <properties size='1'>
> <property name='download.size' value='210700'/>
> </properties>
> </artifact>
> <artifact classifier='org.eclipse.update.feature'
> id='ch.sbb.test.p2.feature' version='1.0.3'>
> <properties size='1'>
> <property name='download.size' value='724'/>
> </properties>
> <repositoryProperties size='1'>
> <property name='artifact.folder' value='true'/>
> </repositoryProperties>
> </artifact>
>
>
>
> <artifact classifier='org.eclipse.update.feature'
> id='ch.sbb.test.p2.feature' version='1.0.1'>
> <properties size='1'>
> <property name='download.size' value='725'/>
> </properties>
> <repositoryProperties size='1'>
> <property name='artifact.folder' value='true'/>
> </repositoryProperties>
> </artifact>
>
>
> The update with http leads to an artifact.xml with two feature entries
> with version 1.0.1 and 1.0.2, the updated one and the old one. If I
> update over file:/// the second (red) is deleted.
>
> So how can I influence this behaviour or what is the reason? Where is
> this update done and why this behaviour?
>
> Beat
Re: Eclipse 4 and p2 [message #1005434 is a reply to message #1005405] Fri, 25 January 2013 12:37 Go to previous messageGo to next message
Beat Schaller is currently offline Beat SchallerFriend
Messages: 42
Registered: July 2009
Member
In the meantime I tried another way. Our webserver is an ms iis server. So I tried the same with a jetty server - and - it works. So at the end I can't say what didn't work (a better error handling/returning would be nice) but I know to not use MS IIS for the repo.

Thx for your support Tom
Beat
Re: Eclipse 4 and p2 [message #1005696 is a reply to message #1005434] Mon, 28 January 2013 10:22 Go to previous messageGo to next message
Beat Schaller is currently offline Beat SchallerFriend
Messages: 42
Registered: July 2009
Member
Just for those with the same problem...
For the IIS update site we had to define a default mime-type with the extension "*" and content-type "application/x-zip-compressed".
In the binary folder of the repository the product had the extension of the version.qualifier (.201301280838).

Beat

Re: Eclipse 4 and p2 [message #1016073 is a reply to message #1005696] Mon, 04 March 2013 20:11 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Beat,

I am experiencing the same issue - have to manually add mime type on IIS server. Can you elaborate on how did you add mime type with extension '*'? At what point in the build and where do you do this? Also, looking for the answer for wildcard support, I stumbled upon this: http://support.microsoft.com/kb/326965, are running IIS with version prior to 6.0?
Re: Eclipse 4 and p2 [message #1021642 is a reply to message #1016073] Wed, 20 March 2013 12:59 Go to previous messageGo to next message
Yves Schumann is currently offline Yves SchumannFriend
Messages: 1
Registered: March 2013
Junior Member
Hi Alex,

Beat is a colleague of me and pointed me to your question, so here are some details on how we fixed this issue.

You need to start the IIS Manager. Then navigate to your site and doubleclick MIME Types. Now you see the list of all known MIME types. Click Add... on the Actions on the right side of the manager, type ".*" as the file name extension and "application/x-zip-comressed" as the MIME type. Last step is to restart the web site. That's it.

Kind regards,
Yves
Re: Eclipse 4 and p2 [message #1704190 is a reply to message #1021642] Sat, 08 August 2015 13:19 Go to previous message
Timothy Vogel is currently offline Timothy VogelFriend
Messages: 82
Registered: July 2009
Member
Yves,
Thanks so much for the detailed instructions. Worked like a champ! Very Happy
Previous Topic:Parameter / Argument to Part Descriptor
Next Topic:E4 Luna to Mars migration
Goto Forum:
  


Current Time: Wed Apr 24 19:16:04 GMT 2024

Powered by FUDForum. Page generated in 0.05024 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top