mirror of https://github.com/apache/nifi.git
NIFI-1818 Adjusting exceptions to reflect the appropriate repository instantiation that caused the issue.
This closes #385. Signed-off-by: Andy LoPresto <alopresto@apache.org>
This commit is contained in:
parent
6938c3db54
commit
11cff0dd39
|
@ -418,12 +418,16 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
|
|||
try {
|
||||
this.provenanceEventRepository = createProvenanceRepository(properties);
|
||||
this.provenanceEventRepository.initialize(createEventReporter(bulletinRepository));
|
||||
|
||||
this.contentRepository = createContentRepository(properties);
|
||||
} catch (final Exception e) {
|
||||
throw new RuntimeException("Unable to create Provenance Repository", e);
|
||||
}
|
||||
|
||||
try {
|
||||
this.contentRepository = createContentRepository(properties);
|
||||
} catch (final Exception e) {
|
||||
throw new RuntimeException("Unable to create Content Repository", e);
|
||||
}
|
||||
|
||||
try {
|
||||
this.stateManagerProvider = StandardStateManagerProvider.create(properties);
|
||||
} catch (final IOException e) {
|
||||
|
@ -735,7 +739,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
|
|||
private ContentRepository createContentRepository(final NiFiProperties properties) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
|
||||
final String implementationClassName = properties.getProperty(NiFiProperties.CONTENT_REPOSITORY_IMPLEMENTATION, DEFAULT_CONTENT_REPO_IMPLEMENTATION);
|
||||
if (implementationClassName == null) {
|
||||
throw new RuntimeException("Cannot create Provenance Repository because the NiFi Properties is missing the following property: "
|
||||
throw new RuntimeException("Cannot create Content Repository because the NiFi Properties is missing the following property: "
|
||||
+ NiFiProperties.CONTENT_REPOSITORY_IMPLEMENTATION);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue