Issue Details (XML | Word | Printable)

Key: CONTINUUM-2039
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jose Morales Martinez
Reporter: Wendy Smoak
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Continuum

NPE in data management when a profile is active but not defined

Created: 16/Jan/09 04:40 PM   Updated: 30/Apr/09 09:29 PM   Resolved: 20/Apr/09 11:39 AM
Return to search
Component/s: Data Management
Affects Version/s: 1.3.3
Fix Version/s: 1.3.3

Time Tracking:
Not Specified

File Attachments: 1. Text File CONTINUUM-2039.patch (2 kB)

Environment: Continuum 1.2.x branch r734910

Complexity: Intermediate


 Description  « Hide
imbrium:tmp wsmoak$ java -Xmx512m -jar data-management-cli-1.2.4-SNAPSHOT-r734910-app.jar -buildsJdbcUrl jdbc:derby:/tmp/continuum/database -mode EXPORT -directory backups 
0 [main] INFO org.apache.maven.continuum.management.DataManagementCli  - Processing Continuum database...
Exception in thread "main" java.lang.NullPointerException
	at org.apache.maven.continuum.management.DataManagementCli.downloadArtifact(DataManagementCli.java:364)
	at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:198)
	at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:170)

Around line 364 of DataManagementCli, it assumes that any active profile has actually been defined.

If I move my settings.xml out of the way and let it work against central, then it proceeds.



Wendy Smoak added a comment - 25/Feb/09 06:56 PM

Updated description – it wasn't a problem with a profile not containing repositories, it was an active profile that wasn't defined in settings.xml.

If you have <activeProfile>abc</activeProfile>, but no <profile><id>abc</id>, then you get the NPE.


Jose Morales Martinez added a comment - 11/Apr/09 09:08 AM

Patch checks if profile exist


Jose Morales Martinez added a comment - 20/Apr/09 11:39 AM

Fixed for 1.3.3 in revision 766741, 1.2.4 in revision 766742, 1.4.0 in revision 766743.