Skip to content

OKAPI-1271: NPE TenantManager.jobRunPending .isExclusive - #1493

Merged
julianladisch merged 3 commits into
masterfrom
OKAPI-1271
Nov 16, 2026
Merged

julianladisch merged 3 commits into
masterfrom
OKAPI-1271

Conversation

@julianladisch

Copy link
Copy Markdown
Contributor

Okapi v7.0.14 failed when trying to install any module:

Cannot invoke "org.folio.okapi.bean.ModuleDescriptor.getSystemInterface(String)" because "md" is null
java.lang.NullPointerException: Cannot invoke "org.folio.okapi.bean.ModuleDescriptor.getSystemInterface(String)" because "md" is null
	at org.folio.okapi.managers.TenantManager.isExclusive(TenantManager.java:1055)
	at org.folio.okapi.managers.TenantManager.jobRunPending(TenantManager.java:1084)
	at org.folio.okapi.managers.TenantManager.lambda$jobInvoke$67(TenantManager.java:1118)
	at io.vertx.core.Future.future(Future.java:224)
	at org.folio.okapi.managers.TenantManager.jobInvoke(TenantManager.java:1118)
	at org.folio.okapi.managers.TenantManager.lambda$runJob$60(TenantManager.java:1011)
	at io.vertx.core.impl.future.Composition.complete(Composition.java:40)

Restarting Okapi worked around the issue.

The solution is to test for null to avoid the NullPointerException.

Okapi v7.0.14 failed when trying to install any module:
```
Cannot invoke "org.folio.okapi.bean.ModuleDescriptor.getSystemInterface(String)" because "md" is null
java.lang.NullPointerException: Cannot invoke "org.folio.okapi.bean.ModuleDescriptor.getSystemInterface(String)" because "md" is null
	at org.folio.okapi.managers.TenantManager.isExclusive(TenantManager.java:1055)
	at org.folio.okapi.managers.TenantManager.jobRunPending(TenantManager.java:1084)
	at org.folio.okapi.managers.TenantManager.lambda$jobInvoke$67(TenantManager.java:1118)
	at io.vertx.core.Future.future(Future.java:224)
	at org.folio.okapi.managers.TenantManager.jobInvoke(TenantManager.java:1118)
	at org.folio.okapi.managers.TenantManager.lambda$runJob$60(TenantManager.java:1011)
	at io.vertx.core.impl.future.Composition.complete(Composition.java:40)
```

Restarting Okapi worked around the issue.

The solution is to test for null to avoid the NullPointerException.

@adamdickmeiss adamdickmeiss left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tm.setMessage is not just informative. It allows the promise to eventually complete in the loop in line 1112-

Co-authored-by: Adam Dickmeiss <adam@indexdata.dk>
@sonarqubecloud

Copy link
Copy Markdown

@julianladisch
julianladisch merged commit c64884b into master Nov 16, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants