Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 246065 - [Net] Unexpected error encountered while preparing for the operation
Summary: [Net] Unexpected error encountered while preparing for the operation
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Pawel Pogorzelski CLA
QA Contact:
URL:
Whiteboard: hasPatch
Keywords:
: 247529 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-03 05:45 EDT by Jerome Lanneluc CLA
Modified: 2009-06-02 06:55 EDT (History)
4 users (show)

See Also:


Attachments
Patch_v01 (7.60 KB, patch)
2008-09-16 07:33 EDT, Pawel Pogorzelski CLA
no flags Details | Diff
Patch_v02 (7.81 KB, patch)
2008-09-17 05:55 EDT, Pawel Pogorzelski CLA
no flags Details | Diff
Patch_v02 slightly modified with tests (12.81 KB, patch)
2008-09-29 09:23 EDT, Szymon Brandys CLA
no flags Details | Diff
Test (5.79 KB, patch)
2008-09-29 09:42 EDT, Szymon Brandys CLA
no flags Details | Diff
Patch_v04 (8.81 KB, patch)
2008-09-30 05:08 EDT, Pawel Pogorzelski CLA
no flags Details | Diff
Patch_v04 & test (13.72 KB, patch)
2008-09-30 06:57 EDT, Szymon Brandys CLA
no flags Details | Diff
Patch_v05 (12.02 KB, patch)
2008-09-30 07:47 EDT, Pawel Pogorzelski CLA
pawel.pogorzelski1: iplog+
Details | Diff
Patch_v05 slightly modified (11.60 KB, patch)
2008-10-03 05:50 EDT, Szymon Brandys CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2008-09-03 05:45:02 EDT
I20080827

Attempting  to update my I20080827 sdk to I20080902, I got a 'Problem Occurred' dialog with the following contents:

Unexpected error encountered while preparing for the operation
java.lang.NullPointerException

and the following details:

Unexpected error encountered while preparing for the operation.
java.lang.NullPointerException


The Error Log contains the following trace:

java.lang.NullPointerException
at org.eclipse.core.internal.net.proxy.unix.UnixProxyProvider.getSystemProxyInfo(UnixProxyProvider.java:105)
at org.eclipse.core.internal.net.proxy.unix.UnixProxyProvider.getProxyData(UnixProxyProvider.java:52)
at org.eclipse.core.internal.net.AbstractProxyProvider.select(AbstractProxyProvider.java:43)
at org.eclipse.core.internal.net.ProxyManager.getProxyDataForHost(ProxyManager.java:291)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.setupProxies(AbstractRetrieveFileTransfer.java:695)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:638)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:381)
at org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter.sendRetrieveRequest(MultiProtocolRetrieveAdapter.java:95)
at org.eclipse.equinox.internal.p2.updatesite.ECFTransport.transfer(ECFTransport.java:284)
at org.eclipse.equinox.internal.p2.updatesite.ECFTransport.performDownload(ECFTransport.java:193)
at org.eclipse.equinox.internal.p2.updatesite.ECFTransport.download(ECFTransport.java:167)
at org.eclipse.equinox.internal.p2.updatesite.UpdateSite.parseFeature(UpdateSite.java:191)
at org.eclipse.equinox.internal.p2.updatesite.UpdateSite.loadFeaturesFromSite(UpdateSite.java:453)
at org.eclipse.equinox.internal.p2.updatesite.UpdateSite.loadFeatures(UpdateSite.java:376)
at org.eclipse.equinox.internal.p2.updatesite.RemoteUpdateSiteAction.createActions(RemoteUpdateSiteAction.java:47)
at org.eclipse.equinox.internal.p2.updatesite.RemoteUpdateSiteAction.perform(RemoteUpdateSiteAction.java:38)
at org.eclipse.equinox.p2.publisher.Publisher.publish(Publisher.java:140)
at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory.generateMetadata(UpdateSiteMetadataRepositoryFactory.java:92)
at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory.initializeRepository(UpdateSiteMetadataRepositoryFactory.java:84)
at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory.load(UpdateSiteMetadataRepositoryFactory.java:61)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:485)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:451)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:435)
at org.eclipse.equinox.internal.p2.director.SimplePlanner.updatesFor(SimplePlanner.java:384)
at org.eclipse.equinox.internal.provisional.p2.ui.query.QueryableUpdates.query(QueryableUpdates.java:48)
at org.eclipse.equinox.internal.provisional.p2.ui.actions.UpdateAction.getProvisioningPlan(UpdateAction.java:71)
at org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction$1.run(ProfileModificationAction.java:62)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 1 Pawel Pogorzelski CLA 2008-09-16 07:33:02 EDT
Created attachment 112658 [details]
Patch_v01

This is a patch that fixes the problem. At least I hope it does:)

The problem stems from different implementation of IProxyService.getProxyDataForHost(String) method. In code that is responsible for getting this data from Eclipse settings the schema part is ignored and settings for all protocols are used.

On the other hand, if native proxy support is used (in Windows or Gnome environment) implementation of this method expects a schema passed along with a host. Since there is some code dependent on the way the method works without native support, I decided to make it behave it the same way with native proxy support enabled.

In addition method IProxyService.getProxyDataForHost(String) seems to be confusing for client developers. I cleared a javadoc to fix this and opened bug 247408 to deprecate the method and simplify the IProxyService interface a bit.

Szymon, please have a look at it.
Comment 2 Benjamin Muskalla CLA 2008-09-16 14:27:02 EDT
*** Bug 247529 has been marked as a duplicate of this bug. ***
Comment 3 Pawel Pogorzelski CLA 2008-09-17 05:55:32 EDT
Created attachment 112745 [details]
Patch_v02

During more elaborate testing I found wrong behaviour of the fix on the Linux platform.

This patch corrects it.
Comment 4 Szymon Brandys CLA 2008-09-29 09:23:38 EDT
Created attachment 113733 [details]
Patch_v02 slightly modified with tests
Comment 5 Szymon Brandys CLA 2008-09-29 09:42:01 EDT
Created attachment 113736 [details]
Test
Comment 6 Szymon Brandys CLA 2008-09-29 09:42:53 EDT
Comment on attachment 112745 [details]
Patch_v02

The attached test shows that the patch is not a good fix.
Comment 7 Pawel Pogorzelski CLA 2008-09-30 05:08:24 EDT
Created attachment 113845 [details]
Patch_v04

Indeed, it wasn't a good fix. How about this one?
Comment 8 Szymon Brandys CLA 2008-09-30 06:57:43 EDT
Created attachment 113853 [details]
Patch_v04 & test
Comment 9 Pawel Pogorzelski CLA 2008-09-30 07:47:48 EDT
Created attachment 113854 [details]
Patch_v05

Together with Szymon we decided that is better not to change the behaviour of the IProxyService.getProxyDataForHost(String).

So, the patch taking that into account.
Comment 10 Szymon Brandys CLA 2008-10-03 05:50:05 EDT
Created attachment 114170 [details]
Patch_v05 slightly modified
Comment 11 Tomasz Zarna CLA 2008-10-03 07:22:14 EDT
Latest patch released to HEAD.