OrganizationalDirctoryServiceImpl.getOrganizations() missing persistence check (sometimes) throws NULLPOINTER

Steps to reproduce

OrganizationalDirctoryServiceImpl.getOrganizations() may throw NULLPOINTER if [the dynamically available] setOrgPersistence wasn't set

Steps to reproduce:
1. Start up Matterhorn server
2. Turn off the service that implements the OrganizationalDatabase <-- this needs to be turned off before it gets assigned to the other module as a service.
This may be optional if you can use a service to call getOrganizations() before the persistence service is dynamically assigned to the class.
3. Use a service that calls a getOrganizations() [the "s" at the end is important]

Actual Results: Get a NULLPointer on the command line
ava.lang.NullPointerException
at org.opencastproject.kernel.security.OrganizationDirectoryServiceImpl.getOrganizations(OrganizationDirectoryServiceImpl.java:144)
at org.opencastproject.dataloader.UserAndSeriesLoader$Loader.run(UserAndSeriesLoader.java:149)

Expected Results: No null pointer

Note, the system still appeared to function with the NullPointer on th command line. So the calling module must have had a recovery.

Status

Assignee

Lukas Rohner

Reporter

Former user

Severity

Usability Issue

Tags (folksonomy)

Components

Fix versions

Affects versions

1.5.0
1.4.0

Priority

Minor
Configure