Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335043

Summary: [discovery] NullPonterException when calling the discovery dialog in the EPP SOA 3.6.2 RC1 package
Product: [Eclipse Project] Equinox Reporter: Zsolt Beothy-Elo <zsolt.beothy-elo>
Component: p2Assignee: Pascal Rapicault <pascal>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P2 CC: dj.houghton, kpqb38, pascal, steffen.pingel, tjwatson
Version: unspecifiedFlags: tjwatson: pmc_approved+
dj.houghton: review+
Target Milestone: 3.6.2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Full stacktrace of NullPointerException
none
fixed discovery bundle
none
Take two none

Description Zsolt Beothy-Elo CLA 2011-01-21 13:50:46 EST
Created attachment 187310 [details]
Full stacktrace of NullPointerException

When testing the EPP SOA 3.6.2 RC1 [1] package the following exception is thrown when invoking the "Tutorial Discovery Dialog". Because of this exception the dialog" does not work anymore.

...
Root exception:
java.lang.NullPointerException
at org.eclipse.equinox.internal.p2.discovery.compatibility.util.TransportUtil.readResource(TransportUtil.java:100)
at org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy.performDiscovery(RemoteBundleDiscoveryStrategy.java:81)
at org.eclipse.equinox.internal.p2.discovery.Catalog.performDiscovery(Catalog.java:85)
at org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer$6.run(CatalogViewer.java:569)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

see attachment for full stacktrace

Reproducible: Always

Steps to Reproduce:
1) invoke Help -> SOA -> Install New Tutorials...
2)
 
A quick look into the sources reveals that the "Bundle-Activator" entry is missing in the MANIFEST of bundle org.eclipse.equinox.p2.discovery.compatibility (at least in revision 1.2.2.1, revision 1.5 correctly contains the entry Bundle-Activator: org.eclipse.equinox.internal.p2.discovery.compatibility.Activator). The getDefault() method in the Activator therefore returns null and causes the NullPointerException at org.eclipse.equinox.internal.p2.discovery.compatibility.util.TransportUtil.readResource(TransportUtil.java:100)



[1] you can download the package from http://build.eclipse.org/technology/epp/epp_build/36/download/20110121-0509/ take one of the packages starting with  20110121-0509_eclipse-soa-helios-SR2-RC1-*
Comment 1 Zsolt Beothy-Elo CLA 2011-02-04 09:12:27 EST
Still happens in RC2 and apparently also in the pulsar package. THis should really be fixed before we get out 3.6.2.
Comment 2 Zsolt Beothy-Elo CLA 2011-02-04 09:15:09 EST
(In reply to comment #1)
> Still happens in RC2 and apparently also in the pulsar package. THis should
> really be fixed before we get out 3.6.2.

For the pulsar problem see bug 33504
Comment 3 Zsolt Beothy-Elo CLA 2011-02-04 09:16:48 EST
*** Bug 336077 has been marked as a duplicate of this bug. ***
Comment 4 DJ Houghton CLA 2011-02-04 09:17:34 EST
I'm not sure who owns the discovery code but I'm pretty sure it isn't Pascal. Let's leave it up to the component owners to decide if it should be fixed for Eclipse 3.6.2. (the RC2 build is today in an hour)
Comment 5 Zsolt Beothy-Elo CLA 2011-02-04 09:19:00 EST
Just forget comment #2
Comment 6 Zsolt Beothy-Elo CLA 2011-02-04 09:24:41 EST
(In reply to comment #4)
> I'm not sure who owns the discovery code but I'm pretty sure it isn't Pascal.
> Let's leave it up to the component owners to decide if it should be fixed for
> Eclipse 3.6.2. (the RC2 build is today in an hour)

I don't know who is owning the code, but Pascal was the one doing the improvements in 3.7 and also incompletely applying them to the 3.6 line, which led to the NPE. So, I think he is the most competent to decide how to further proceed with th ebug.
Comment 7 Pascal Rapicault CLA 2011-02-04 09:56:23 EST
I'll take that one back.
Comment 8 Daniel Drigo Pastore CLA 2011-02-04 10:26:50 EST
(In reply to comment #2)
> (In reply to comment #1)
> > Still happens in RC2 and apparently also in the pulsar package. THis should
> > really be fixed before we get out 3.6.2.
> 
For the pulsar problem see bug 336077.

(In reply to comment #4)
> I'm not sure who owns the discovery code but I'm pretty sure it isn't Pascal.
> Let's leave it up to the component owners to decide if it should be fixed for
> Eclipse 3.6.2. (the RC2 build is today in an hour)

It is present in our RC2 build, and we would also like it fixed for RC3, if possible. We would be glad to help if we can.
Comment 9 Pascal Rapicault CLA 2011-02-04 11:21:38 EST
Created attachment 188334 [details]
fixed discovery bundle

Your analysis about the manifest is right on. I released a fix for this. Sorry about this.
Here is a binary version of the jar. To use it, hack the bundles.info file in your configuration to point at this file and you will be set.
Comment 10 Pascal Rapicault CLA 2011-02-04 11:28:04 EST
Zsolt, Daniel, could you please confirm that the attached jar works for you.
Thx.
Comment 11 Zsolt Beothy-Elo CLA 2011-02-04 12:55:25 EST
(In reply to comment #10)
> Zsolt, Daniel, could you please confirm that the attached jar works for you.
> Thx.

Sort of,
I have to first start the bundle explicitly in the console, because it's only in the resolved state. Then everything works fine. Otherwise I get the well-known NPE.
Comment 12 Daniel Drigo Pastore CLA 2011-02-04 13:09:15 EST
(In reply to comment #11)
> (In reply to comment #10)
> > Zsolt, Daniel, could you please confirm that the attached jar works for you.
> > Thx.
> 
> Sort of,
> I have to first start the bundle explicitly in the console, because it's only
> in the resolved state. Then everything works fine. Otherwise I get the
> well-known NPE.

Same thing for us. :)

Pascal, will this new version be available for Helios SR2 RC3 build then?
And can we change our dependency to this version?

Last but not least, thanks for the quick fix!

Daniel Pastore
Sequoyah Team
Comment 13 Pascal Rapicault CLA 2011-02-04 13:27:05 EST
Created attachment 188346 [details]
Take two

Second take at the fix, forgot to mark auto activate.
Comment 14 Pascal Rapicault CLA 2011-02-04 13:27:21 EST
Closing again.
Comment 15 Daniel Drigo Pastore CLA 2011-02-04 14:17:09 EST
(In reply to comment #13)
> Created attachment 188346 [details]
> Take two
> 
> Second take at the fix, forgot to mark auto activate.

Works fine now!
And will it be version 1.0.1 on RC3? I'll change our dependency to use this version.

Thanks again,

Daniel Pastore
Sequoyah Team
Comment 16 Pascal Rapicault CLA 2011-02-05 00:39:37 EST
Yes it will be version 1.0.1
Comment 17 Zsolt Beothy-Elo CLA 2011-02-05 02:42:58 EST
(In reply to comment #14)
> Closing again.

Now also works for SOA package :)
Comment 18 Daniel Drigo Pastore CLA 2011-02-08 08:29:59 EST
(In reply to comment #16)
> Yes it will be version 1.0.1

Hi Pascal,

Do you know when will this be on the composite repository? I tried updating the Pulsar package yesterday and I broke the build, since it still doesn't have the new version. :) (FYI, I already reverted it :)

Thanks again for your attention,

Daniel Pastore
Sequoyah Team
Comment 19 Thomas Watson CLA 2011-02-09 10:38:28 EST
I agree this bug is critical and needs to be fixed.  But ...

It does not appear the necessary rules have been followed during the rampdown of SR2.  I am not suggesting we backout the fixes, but we need to get a review of the changes (no patch on the bug report to review) and PMC approval.  I have asked DJ to review the changes.  I am willing to give approval after a review.

I know we are running fast, but we still need to follow the rampdown process.
Comment 20 Daniel Drigo Pastore CLA 2011-02-09 10:45:24 EST
(In reply to comment #19)
> I agree this bug is critical and needs to be fixed.  But ...
> 
> It does not appear the necessary rules have been followed during the rampdown
> of SR2.  I am not suggesting we backout the fixes, but we need to get a review
> of the changes (no patch on the bug report to review) and PMC approval.  I have
> asked DJ to review the changes.  I am willing to give approval after a review.
> 
> I know we are running fast, but we still need to follow the rampdown process.

Alright, we agree too.
Still, do you think it would be available for RC3? The packages are usually generated on late Thursday, but maybe we could ask EPP team for a little delay.

Thanks for your attention,

Daniel Pastore
Sequoyah Team
Comment 21 DJ Houghton CLA 2011-02-09 10:46:36 EST
The changes appear to be incrementing the bundle version by 0.0.1 and adding the following lines to the manifest file:

Bundle-Activator: org.eclipse.equinox.internal.p2.discovery.compatibility.Activator
Bundle-ActivationPolicy: lazy
Comment 22 Thomas Watson CLA 2011-02-09 11:06:07 EST
(In reply to comment #20)
> 
> Alright, we agree too.
> Still, do you think it would be available for RC3? The packages are usually
> generated on late Thursday, but maybe we could ask EPP team for a little delay.
> 
> Thanks for your attention,
> 
> Daniel Pastore
> Sequoyah Team

RC3 is done, we are in the middle of building RC4 right now.
Comment 23 Daniel Drigo Pastore CLA 2011-02-09 11:27:02 EST
(In reply to comment #22)
> (In reply to comment #20)
> > 
> > Alright, we agree too.
> > Still, do you think it would be available for RC3? The packages are usually
> > generated on late Thursday, but maybe we could ask EPP team for a little delay.
> > 
> > Thanks for your attention,
> > 
> > Daniel Pastore
> > Sequoyah Team
> 
> RC3 is done, we are in the middle of building RC4 right now.

Hi Thomas,

When can we expect a build with this fix then? Since Equinox is has a +0 offset, it should be on next monday, right?
If not, can we have a nightly build in the next day or two? Our concern is to test Pascal's fix in a Pulsar build ASAP, in order to mitigate the risk of not having a "quiet week" before GA.

Thanks for your attention,

Daniel Pastore
Sequoyah Team
Comment 24 Thomas Watson CLA 2011-02-09 11:32:49 EST
We will have a build today, but that build is not being contributed to RC3.  You should be able to test with today's build, but you are also correct that our final contribution for RC4 will happen on Monday.