Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » How can I read an updatesite
How can I read an updatesite [message #599929] Mon, 02 November 2009 22:21
Markus Oley is currently offline Markus OleyFriend
Messages: 254
Registered: July 2009
Location: Germany
Senior Member
Hi,

I want to read an updatesite to determine the features and plugins it keeps....


UpdateSite updatesite;
try {
updatesite = UpdateSite.load(new URI(updatesiteURL), new NullProgressMonitor());
Feature[] loadFeatures = updatesite.loadFeatures(new NullProgressMonitor());

} catch (ProvisionException e) {
e.printStackTrace();
} catch (URISyntaxException e) {
e.printStackTrace();
}

updatesiteURL is a URI to the site itself, in the browser it works fine, but with the code seen above, I get the following exception:

2009-11-02 23:02:47,186 INFO [main] controlfile.UpdatesiteFeature - Created UpdatesiteFeature http://www.eclipse.org/downloads/download.php?r=1&file=/ technology/swtbot/galileo/dev-build/update-site/features/org .eclipse.swtbot.eclipse_2.0.0.394-dev-e35.jar, ID org.eclipse.swtbot.eclipse, Version 2.0.0.394-dev-e35
org.eclipse.equinox.internal.provisional.p2.core.ProvisionEx ception: Unable to read repository at http://download.eclipse.org/technology/swtbot/galileo/dev-bu ild/update-site/site.xml
at org.eclipse.equinox.internal.p2.updatesite.UpdateSite.loadAc tualSiteFile(UpdateSite.java:218)
at org.eclipse.equinox.internal.p2.updatesite.UpdateSite.loadSi teFile(UpdateSite.java:155)
at org.eclipse.equinox.internal.p2.updatesite.UpdateSite.load(U pdateSite.java:126)
at vsa.vsaeclipse.distributor.controlfile.UpdatesiteSynchronize r.readUpdatesite(UpdatesiteSynchronizer.java:158)
at vsa.vsaeclipse.distributor.controlfile.UpdatesiteSynchronize r. <init>(UpdatesiteSynchronizer.java:116)
at vsa.vsaeclipse.distributor.rcp.rcpdistributor.details.Update siteSynchronizeSelection. <init>(UpdatesiteSynchronizeSelection.java:34)
at vsa.vsaeclipse.distributor.rcp.rcpdistributor.synchronizer.S ynchronizerUIPartUpdatesite.synchronize(SynchronizerUIPartUp datesite.java:22)
at vsa.vsaeclipse.distributor.rcp.rcpdistributor.details.Abstra ctDistributionPartDetailPanel.widgetSelected(AbstractDistrib utionPartDetailPanel.java:347)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at vsa.vsaeclipse.distributor.rcp.rcpdistributor.VSAEclipseDist ributor.start(VSAEclipseDistributor.java:28)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Caused by: org.eclipse.core.runtime.CoreException: Transport initialization error.
at org.eclipse.equinox.internal.p2.repository.RepositoryStatusH elper.fromExceptionMessage(RepositoryStatusHelper.java:101)
at org.eclipse.equinox.internal.p2.repository.RepositoryStatusH elper.fromMessage(RepositoryStatusHelper.java:97)
at org.eclipse.equinox.internal.p2.repository.FileReader.sendRe trieveRequest(FileReader.java:291)
at org.eclipse.equinox.internal.p2.repository.FileReader.readIn to(FileReader.java:263)
at org.eclipse.equinox.internal.p2.repository.RepositoryTranspo rt.download(RepositoryTransport.java:70)
at org.eclipse.equinox.internal.p2.repository.RepositoryTranspo rt.download(RepositoryTransport.java:121)
at org.eclipse.equinox.internal.p2.updatesite.UpdateSite.loadAc tualSiteFile(UpdateSite.java:187)
... 33 more


I debugged and noticed that in the line
IRetrieveFileTransferFactory factory = Activator.getDefault().getRetrieveFileTransferFactory();
in FileReader#sendRetrieveRequest.... factory is null which seems to be an configuration error....

what shall I configure? what's wrong?

Thank you for your help

Greetings Markus
Previous Topic:How to access the data of the task list through public API?
Next Topic:How can I read an updatesite
Goto Forum:
  


Current Time: Fri Nov 28 04:47:05 GMT 2014

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

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