Adding an invalid index hides existing valid indexes

Description

Description:
ModeShape does not validate the node type when adding a new index. If a user adds an invalid index in the JCR Indexes admin page then Kylo and ModeShape accept it but will cause errors when Kylo is restarted. After the restart then Kylo no longer shows any indexes on the JCR Indexes page.

Steps to reproduce:
1) Go to http://localhost:8400/index.html#!/admin/jcr-query and select JCR Indexes tab.
2) Create a new index using the node type tba:sdf
3) Click Register Index.

Expected result:
An error is displayed saying that the node type does not exist.

Actual result:
The index is added to ModeShape. When Kylo is restarted then the following error is logged:
java.lang.IllegalArgumentException: Internationalization field "errorIndexing" in class org.modeshape.jcr.JcrI18n: 1 parameter supplied, but 3 parameters required: "Error while indexing '{0}' in workspace '{1}': {2}" => "Error while indexing 'not creating index test because of unknown nodeType {httpthinkbiganalytics.commetadata}sdf' in workspace '{1}': {2}"

Environment

None

Status

Assignee

Ruslans Uralovs

Reporter

Greg Hart

Labels

None

Reviewer

None

Story point estimate

None

Time tracking

4h

Sprint

None

Fix versions

Priority

Low
Configure