0

I'm using Apache Polygene (Qi4j) 2.1 and I'm trying to use the MongoDB entity store with multiple nodes and replicaSet.

my current configuration in my mongodb.booking.store.properties file is:

hostname=localhost
port=27017
nodes=192.168.1.100:27017, 192.168.1.101:27017, 192.168.1.102:27017
database=example
collection=example

I get back the following error:

org.qi4j.api.value.NoSuchValueException: Could not find any visible ValueComposite of type [com.mongodb.ServerAddress] in module [config]

But when I remove the nodes property from the above file, then it all works fine and the connection with mongo is successful.

How can I use multiple nodes and replicaSet?

1 Answers1

0

This was an unfortunate release of the MongoDB extension, and there is no good answer to initialize this configuration from properties files.

Polygene 3.0 was released in July 2017 and this particular issue was solved. See https://issues.apache.org/jira/browse/POLYGENE-172

Niclas Hedhman
  • 584
  • 4
  • 14