[ELASTIC-16] Reindexing of app content failed with NullPointerException when no "Mapped Field" is specified Created: 03/Dec/21  Updated: 18/Jan/22

Status: Open
Project: Elasticsearch
Component/s: None
Affects Version/s: 1.0.0
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: wolf bubenik Assignee: Scot Rhodes
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   
  • go to Index-Editor-App and open config for content app
  • in Tab “Datasource” scroll down and check field “Mapped Field”: If empty you can test
  • close editing of indexer and choose “Create Index“ from the Item actions on the right of the Index editor
  • No RpcInvocationException should be shown

 

ERROR info.magnolia.admincentral.AdmincentralErrorHandler 12.11.2021 11:49:36 -- Admincentral ist auf einen unerwarteten Fehler gestoßen.
com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method click in com.vaadin.shared.ui.button.ButtonServerRpc
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:159) ~[vaadin-server-8.13.1.jar:8.13.1]
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:116) ~[vaadin-server-8.13.1.jar:8.13.1]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:442) [vaadin-server-8.13.1.jar:8.13.1]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:407) [vaadin-server-8.13.1.jar:8.13.1]
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274) [vaadin-server-8.13.1.jar:8.13.1]
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90) [vaadin-server-8.13.1.jar:8.13.1]

Caused by: java.lang.NullPointerException
	at info.magnolia.elasticsearch.jcr.ServerProfileBuilder.buildMappingsFromJcr(ServerProfileBuilder.java:76) ~[magnolia-query-manager-1.0.0-RC3.jar:?]
	at info.magnolia.elasticsearch.jcr.ServerProfileBuilder.buildServerProfile(ServerProfileBuilder.java:68) ~[magnolia-query-manager-1.0.0-RC3.jar:?]
	at info.magnolia.elasticsearch.jcr.ServerProfileBuilder.build(ServerProfileBuilder.java:63) ~[magnolia-query-manager-1.0.0-RC3.jar:?]
	at info.magnolia.elasticsearch.actions.DropAndReindexCallback.createIndex(DropAndReindexCallback.java:103) ~[magnolia-query-manager-1.0.0-RC3.jar:?]
	at info.magnolia.elasticsearch.actions.DropAndReindexCallback.onSuccess(DropAndReindexCallback.java:87) ~[magnolia-query-manager-1.0.0-RC3.jar:?]
	at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]
	at info.magnolia.ui.AlertBuilder.lambda$build$ccff1191$1(AlertBuilder.java:188) ~[magnolia-ui-framework-6.2.11.jar:?]

 

Expected behaviour:

 

  • When the "Mapped Field" is required for indexing, it should be required in config editing dialog
  • When not required, the NPE should be fixed.

We patched the class info.magnolia.elasticsearch.configuration.MappingItemConfiguration:

private List<MappingFieldItemConfiguration> fields = Collections.emptyList(); // was null

 


Generated at Mon Feb 12 01:46:28 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.