Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313732 - NPE while contacting updatesite
Summary: NPE while contacting updatesite
Status: CLOSED DUPLICATE of bug 313502
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-20 10:19 EDT by ekkehard gentz CLA
Modified: 2011-01-21 11:43 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ekkehard gentz CLA 2010-05-20 10:19:16 EDT
installed RC1 SDK + I-Build  I20100519-1548

installed some other software
restarted...

got a NPE while trying "Check for Updates" or "Install New Software"
since now I couldn't Check for Updates nor Install new Software
--------

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:698)
	at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:641)
	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.ui.LoadMetadataRepositoryJob.doLoad(LoadMetadataRepositoryJob.java:115)
	at org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob.runModal(LoadMetadataRepositoryJob.java:100)
	at org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler$2.runModal(PreloadingRepositoryHandler.java:82)
	at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:177)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 ekkehard gentz CLA 2010-05-20 14:40:33 EDT
tried some things using SDK helios RC1 with no problems

updated to I-Build 20100520-0800 
after restart tried again "Check for Update"
same NPE

couldn't do any check for updates or install new software - always getting NPE
Comment 2 Susan McCourt CLA 2010-05-20 15:54:10 EDT
happens in new code introduced by the fix to bug 306816
Comment 3 Ian Bull CLA 2010-05-20 17:41:34 EDT
Ekke, we are having problems reproducing this.  There were changes in this area, so this bug has me concerned.  Although this is very heavily used code and all the test cases pass, so there must be an edge case here.

What do you mean you installed RC1 SDK + IBuild I0100519-1548?  Do you mean you started with RC1 and tried to update to that IBuild, or you started with RC 1, updated to 0100519-1548 (yesterday I assume) and now are trying to update to 0520?

Also, what other sites do you have listed?  Do you have anything in your dropins folder?
Comment 4 ekkehard gentz CLA 2010-05-21 01:09:16 EDT
(In reply to comment #3)
> Ekke, we are having problems reproducing this.  There were changes in this
> area, so this bug has me concerned.  Although this is very heavily used code
> and all the test cases pass, so there must be an edge case here.
> 
> What do you mean you installed RC1 SDK + IBuild I0100519-1548?  Do you mean you
> started with RC1 and tried to update to that IBuild, or you started with RC 1,
> updated to 0100519-1548 (yesterday I assume) and now are trying to update to
> 0520?
> 
> Also, what other sites do you have listed?  Do you have anything in your
> dropins folder?

there's nothing in the dropins

yes:
I started with RC1 SDK
then check for update and updated to I-20100519 - later got the problems and deleted all,
then started with RC1 SDK, check for update, got I-20100520,
installed from some other sites and got the NPE, then
- couldn't check for update, couldnt install new software, even couldn't revert 
so I deleted this installation again

will see if I can makle it reproducable today - I was playing with some different other sites to test my own installations

ekke
Comment 5 Ian Bull CLA 2010-05-21 01:57:17 EDT
If you got 20100520, then installed from other sites, and then got the problem, I get the feeling that maybe this depends on the sites you have listed. 

The code that is failing is in the RepositoryTransport, after we try and download the p2.index file. We try to check the Status and the Status of the FileReader is null.  We could fix this by adding a Null check, but we need to understand why this code is failing.

Did something change in ECF? Is there something about this specific site that's returning a strange value (that ends up with our Status being null).  As a last resort we can put back the catch throwable for the p2.index file, but I'm worried that this will just move the problem elsewhere.
Comment 6 ekkehard gentz CLA 2010-05-21 02:34:01 EDT
(In reply to comment #5)
> If you got 20100520, then installed from other sites, and then got the problem,
> I get the feeling that maybe this depends on the sites you have listed. 
> 
> The code that is failing is in the RepositoryTransport, after we try and
> download the p2.index file. We try to check the Status and the Status of the
> FileReader is null.  We could fix this by adding a Null check, but we need to
> understand why this code is failing.
> 
> Did something change in ECF? Is there something about this specific site that's
> returning a strange value (that ends up with our Status being null).  As a last
> resort we can put back the catch throwable for the p2.index file, but I'm
> worried that this will just move the problem elsewhere.

I'll try to make it reproducable...
Comment 7 ekkehard gentz CLA 2010-05-21 06:20:05 EDT
perhaps I found the reason
did the same today to test things....

installed SDK RC1
update to 20100520-1744

then did some installs
suddenly it happend again: NPE was there

looking at the error log:
the first error coming up was a BundleExeption (see below)

followed by:
org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.mylyn.tasks.ui was unable to load class org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$TasksUiStartup.
Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

now if trying to install software, update software or revert from installation history I get NPE:
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.ui.LoadMetadataRepositoryJob.doLoad(LoadMetadataRepositoryJob.java:115)
	at org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob.runModal(LoadMetadataRepositoryJob.java:100)
	at org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler$2.runModal(PreloadingRepositoryHandler.java:82)
	at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:177)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


and now I'm standing in the dark -. no way to install, update or revert means I have to delete the installation and start new
I think the NPE should be handled at least to enable reverting

ekke
--------bundle exception-----

org.osgi.framework.BundleException: Exception in org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin.start() of bundle org.eclipse.mylyn.tasks.ui.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:267)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:52)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:263)
at org.eclipse.ui.internal.EarlyStartupRunnable.getExecutableExtension(EarlyStartupRunnable.java:117)
at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:66)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench$58.run(Workbench.java:2398)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:230)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:112)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:275)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272)
at org.apache.commons.httpclient.params.DefaultHttpParams.<clinit>(DefaultHttpParams.java:54)
at org.eclipse.mylyn.commons.net.WebUtil.<clinit>(WebUtil.java:149)
at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin.start(TasksUiPlugin.java:496)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
... 29 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 43 more
Root exception:
java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:230)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:112)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:275)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272)
at org.apache.commons.httpclient.params.DefaultHttpParams.<clinit>(DefaultHttpParams.java:54)
at org.eclipse.mylyn.commons.net.WebUtil.<clinit>(WebUtil.java:149)
at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin.start(TasksUiPlugin.java:496)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:267)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:52)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:263)
at org.eclipse.ui.internal.EarlyStartupRunnable.getExecutableExtension(EarlyStartupRunnable.java:117)
at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:66)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench$58.run(Workbench.java:2398)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 43 more
Comment 8 ekkehard gentz CLA 2010-05-21 07:29:32 EDT
(In reply to comment #7)
some more tests: it doesn't depend from I-Builds, happens also using RC1

but:
if I do it in this way:

Install fresh RC1
Install new software Mylyn
all works well, no error reported with mylyn

---
another fresh install RC1
add some software sites
now exactly the sam as before:
select helios Updatesite, install mylyn
after restart no error about mylyn

but if I try "Check for updates" I got a NPE for all installed update sites:

some sites could not be found.  See the error log for more detail.
Unexpected exception while loading http://ekkes-updates.de/redview-team-developer.
java.lang.NullPointerException
Unexpected exception while loading http://download.eclipse.org/eclipse/pde/incubator/visualization/site.
java.lang.NullPointerException
Unexpected exception while loading http://ekkes-updates.de/ekkes-corner.
java.lang.NullPointerException
Unexpected exception while loading http://download.eclipse.org/releases/helios.
java.lang.NullPointerException
Unexpected exception while loading http://download.eclipse.org/eclipse/updates/3.6.
java.lang.NullPointerException
Unexpected exception while loading http://ekkes-updates.de/emfstore.
java.lang.NullPointerException
Unexpected exception while loading http://offers.assembla.com/update-site.
java.lang.NullPointerException
Unexpected exception while loading http://bundlemonitor-updates.s3.amazonaws.com/.
java.lang.NullPointerException
Unexpected exception while loading http://download.eclipse.org/rt/riena/updatesites/rienatoolbox.
java.lang.NullPointerException
Unexpected exception while loading http://cbes.javaforge.com/update.
java.lang.NullPointerException

....and trying to install new software - no all sites
including http://download.eclipse.org/releases/helios
hav an error "could not find http://.....

--------
so it seems that only the presence of some update sites cases errors

under M7 this all worked well

hope my tests help to find the reason...

ekke
Comment 9 Pascal Rapicault CLA 2010-05-21 10:06:40 EDT
Ok, this is not a p2 problem. It is an issue with slf4j that is not properly setup and ends up being picked up by p2.
Comment 10 Pascal Rapicault CLA 2010-05-21 10:17:04 EDT

*** This bug has been marked as a duplicate of bug 313502 ***
Comment 11 ekkehard gentz CLA 2010-05-21 10:33:13 EDT
(In reply to comment #9)
> Ok, this is not a p2 problem. It is an issue with slf4j that is not properly
> setup and ends up being picked up by p2.

but why... 

A: fresh install RC1 SDK
A-1.  if I only install Mylyn from Helios Site - it works
A-2.  if I add then some updatesites without installing anything
A-3.  if then trying to install or update: all existing sites couldn't be used
anymore (got NPE on all Updatesites)

B: fresh install RC1 SDK
B-1. add some updatesites, then install Mylyn from Helios Site as done in A-1
and get NPE with slf4j problems

for me this seems not only to be a slf4j problem, because this happens only if
- while installing Mylyn - there are more update sites then only Helios
available

and most worse thing: after getting those error I'm not able to install, update
or revert

ekke
Comment 12 Kristian Rink CLA 2011-01-13 02:45:36 EST
Adding myself and my €0.02 to this issue, as it seems pretty much what I see here.

Eclipse version installed is

"
Eclipse Java EE IDE for Web Developers.

Version: Helios Service Release 1
Build id: 20100917-0705
"

all along with a bunch of other bundles (Subversive, m2eclipse the OEPE/Glassfish tooling, the Spring Tool Suite and the Google GWT tooling). Until a few days ago, updating / installing bundles worked pretty well out of the box, but, starting with yesterday (after doing an update, installing new mylyn packages it seems?), the very NPE appears for every remote update site I have on my list. I am not able to either install or update any software installed so far, no matter whether using "known" or "new" update sites. Starting -clean and/or in another workspace didn't change things. Platform is Sun Java 1.6.0_21 on Ubuntu 10.10.