| Currently the automated tests pass, but only because other tests were executed in the same JVM just a moment before, which initialized the (*mutable!*) static variables org.hibernate.search.analyzer.impl.RemoteAnalyzerReference.DEFAULT and org.hibernate.search.analyzer.impl.RemoteAnalyzerReference.PASS_THROUGH. Normally, though, index managers are not yet created when org.hibernate.search.engine.impl.ConfigContext.initLazyAnalyzerReferences(IndexManagerHolder) is called in org.hibernate.search.spi.SearchIntegratorBuilder.initDocumentBuilders(SearchConfiguration, BuildContext, SearchMapping), which results in a dangling remote analyzer reference, which ultimately explodes. Index managers were not yet created because they are created lazily when using dynamic sharding, as shown in IndexManagerHolder line 97. Relevant tests: everything in package org.hibernate.search.test.shards. Please make sure to enable those tests when solving this ticket. |