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

Bug 354892

Summary: Loading a maven repository fails with an NPE from Maven2RepositoryLoader. IProvisioningAgent not set?
Product: [Technology] CBI Reporter: Wolfgang Werner <wolfgang.werner+eclipsebugs>
Component: CBI p2 Repository AggregatorAssignee: Project Inbox <b3.aggregator-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: henrik.lindberg, thomas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Screenshot of the b2aggr model in the model editor none

Description Wolfgang Werner CLA 2011-08-16 17:28:25 EDT
Build Identifier: 20110615-0604

When loading a (valid, w/ metadata & checksums) maven repository I get the exception shown below.

java.lang.NullPointerException
	at org.eclipse.b3.p2.maven.loader.Maven2RepositoryLoader.getTransport(Maven2RepositoryLoader.java:709)
	at org.eclipse.b3.p2.maven.loader.Maven2RepositoryLoader.load(Maven2RepositoryLoader.java:866)
	at org.eclipse.b3.p2.maven.loader.Maven2RepositoryLoader.reload(Maven2RepositoryLoader.java:268)
	at org.eclipse.b3.aggregator.p2.util.MetadataRepositoryResourceImpl$RepositoryLoaderJob.run(MetadataRepositoryResourceImpl.java:476)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

My model looks like this:

<aggregator:Aggregation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:aggregator="http://www.eclipse.org/b3/2011/aggregator/1.1.0" label="restlet" buildRoot="./build">
  <validationSets label="main">
    <contributions label="restlet">
      <repositories location="http://maven.restlet.org/org/restlet/jee/org.restlet" nature="maven2" mirrorArtifacts="false"/>
    </contributions>
  </validationSets>
  <configurations/>
</aggregator:Aggregation>

Am I missing something?

Reproducible: Always

Steps to Reproduce:
1. Create a new b3aggr model
2. Add a validation set and a contribution
3. Add the repository http://maven.restlet.org/org/restlet/jee/org.restlet or http://maven.restlet.org/org/restlet/jee/org.restlet/2.0.8
4. (re-)load the repository
Comment 1 Henrik Lindberg CLA 2011-08-17 21:01:59 EDT
Is this headless, or b3aggr running in the IDE?

Can you load a p2 repository ok? (Just checking to see if there is some general problem with the configuration you are using).
Comment 2 Wolfgang Werner CLA 2011-08-18 02:59:23 EDT
Created attachment 201692 [details]
Screenshot of the b2aggr model in the model editor
Comment 3 Wolfgang Werner CLA 2011-08-18 03:00:57 EDT
I use it from the IDE, the p2 repository loads fine.
Screenshot illustrating this is attached, hope it helps.
Comment 4 Thomas Hallgren CLA 2011-08-18 10:06:10 EDT
Fixed.

Please note that your aggregation URL is incorrect. It should be:

 http://maven.restlet.org/

and not:

 http://maven.restlet.org/org/restlet/jee/org.restlet

The fix was in this commit:

 http://git.eclipse.org/c/b3/b3.git/commit/?id=d48373de9cd40bd099636bea04519d368168ecc3

and it has been pushed to our update sites.
Comment 5 Wolfgang Werner CLA 2011-08-19 08:08:02 EDT
Verified successfully. Works as expected now.
Great support, thanks for the quick resolution!
Comment 6 Thomas Hallgren CLA 2011-08-19 08:16:52 EDT
Glad to hear that it now works.
Comment 7 David Williams CLA 2016-09-16 15:52:32 EDT
[Bookkeeping change only. Moving bugs to the new "home" of aggregator, CBI.
Made no changes to assignee's for closed bugs, even though some were old inbox.]