Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330030 - P2 Nullpointer Exception at RepositoryTransport.download
Summary: P2 Nullpointer Exception at RepositoryTransport.download
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.6.2   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 323149
Blocks:
  Show dependency tree
 
Reported: 2010-11-11 13:14 EST by Pascal Rapicault CLA
Modified: 2011-01-11 15:02 EST (History)
6 users (show)

See Also:


Attachments
patch (4.13 KB, patch)
2011-01-11 15:01 EST, DJ Houghton CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2010-11-11 13:14:42 EST
I propose we backport this bug to 3.6.x.

+++ This bug was initially created as a clone of Bug #323149 +++

Build Identifier: 3.6.0 I20100608-0911

    I'm following the Product based build for our RCP application. The build creates a local repository in the build directory in my local system. Once the build is successful, I copy the P2 repository to a remote URL (http). 

    The application is pointing to the remote URL. Now when I start my application, I'm getting NullPointer Exception at RepositoryTransport.download(RepositoryTransport.java:75). If I connect to the local repository (in build directory), it works fine. The following is the exception that I'm getting, 

java.lang.reflect.InvocationTargetException
        at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:477)
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
        at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
        at ams.client.eclipse.actions.UpdateAction.run(Unknown Source)
        at ams.client.eclipse.AMSClientWorkbenchAdvisor.preStartup(Unknown Source)
        at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1564)
        at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2537)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at ams.client.eclipse.AMSClient.start(Unknown Source)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        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(EclipseStarter.java:369)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.lang.NullPointerException
        at org.eclipse.equinox.internal.p2.repository.RepositoryTransport.download(RepositoryTransport.java:75)
        at org.eclipse.equinox.internal.p2.repository.RepositoryTransport.download(RepositoryTransport.java:127)
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadIndexFile(AbstractRepositoryManager.java:719)
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:640)
        at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
        at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
        at org.eclipse.equinox.p2.engine.ProvisioningContext.loadMetadataRepository(ProvisioningContext.java:211)
        at org.eclipse.equinox.p2.engine.ProvisioningContext.getLoadedMetadataRepositories(ProvisioningContext.java:194)
        at org.eclipse.equinox.p2.engine.ProvisioningContext.getMetadata(ProvisioningContext.java:275)
        at org.eclipse.equinox.internal.p2.director.SimplePlanner.updatesFor(SimplePlanner.java:769)
        at org.eclipse.equinox.p2.operations.UpdateOperation.updatesFor(UpdateOperation.java:144)
        at org.eclipse.equinox.p2.operations.UpdateOperation.computeProfileChangeRequest(UpdateOperation.java:181)
        at org.eclipse.equinox.p2.operations.UpdateOperation$1.run(UpdateOperation.java:325)
        at org.eclipse.equinox.internal.p2.operations.SearchForUpdatesResolutionJob.runModal(SearchForUpdatesResolutionJob.java:37)
        at org.eclipse.equinox.p2.operations.ProfileChangeOperation.resolveModal(ProfileChangeOperation.java:115)
        at ams.client.eclipse.actions.UpdateAction$Runner.checkForUpdates(Unknown Source)
        at ams.client.eclipse.actions.UpdateAction$Runner.run(Unknown Source)
        at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)



Reproducible: Always
Comment 1 DJ Houghton CLA 2011-01-11 15:01:13 EST
Created attachment 186557 [details]
patch
Comment 2 DJ Houghton CLA 2011-01-11 15:02:53 EST
Patch released to maintenance branch.