-
Notifications
You must be signed in to change notification settings - Fork 78
EmbeddedElastic.createIndex method throws NullPointerException #67
Comments
To be able to do anything with this I will need to see your embedded elasticsearch configuration and full stacktrace |
Hello, I have a similar problem. I find this strange, because in athoner I insert a reference code to what I mean: class BasicElasticSearchIndexApiTest {
private var embeddedES : EmbeddedElastic = EmbeddedElastic.builder()
.withElasticVersion(ESVersion)
.withSetting(PopularProperties.CLUSTER_NAME, CLUSTER)
.withSetting(PopularProperties.TRANSPORT_TCP_PORT, 9350)
.withIndex(META_INDEX)
.withStartTimeout(1000, TimeUnit.SECONDS)
.build()
@Before
fun setUp() {
embeddedES.start().recreateIndex(META_INDEX)
}
@Test
fun `test which works`(context: TestContext){
embeddedES.index(META_INDEX, META_TYPE, data.encode())
}
@Test
fun `test which returns NPE`(context: TestContext){
embeddedES.createIndex(TEST_INDEX)
}
} This code above is in Kotlin and contains only relevant information regarding this problem. The stacktrace was the following:
Thank you for your forward help |
Update: I think I have misread the usage and functionality. If I understood correctly,
So @mallim could it be, that the index you are trying to create is not yet created via |
NullPointerException at the following place when calling EmbeddedElastic.createIndex:
For reference, I am able to do the following with high level rest client:
The text was updated successfully, but these errors were encountered: