brooklyncentral / brooklyn

This project has moved and is now part of the ASF
https://github.com/apache/incubator-brooklyn
72 stars 27 forks source link

NPE in HighAvailabilityManagerImpl #1418

Closed sjcorbett closed 10 years ago

sjcorbett commented 10 years ago

HighAvailabilityManagerImpl.loadManagementPlaneSyncRecord throws a NullPointerException if neither start nor disabled was previously called.

The entry point is ServerResource.getHighAvailability() in the rest-server project.

I think the solution is to get rid of ownNodeId and to call management.getNodeId() in ownNodeId each time it's needed.

See also: https://github.com/brooklyncentral/brooklyn/pull/1389#issuecomment-43654263

e.g. At the moment apps must make a modification to BrooklynRestApiLauncher like that in https://github.com/brooklyncentral/brooklyn/commit/80c40c52e66fa25ed46c208a63e8a81131ae87a8

sjcorbett commented 10 years ago

Believe this was fixed by @aledsage in ac87e04680f1179d8e0b32c189389ee9353032bf.