polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: MongoDB Entity Store
Date Wed, 03 May 2017 12:23:56 GMT
Are you on Qi4j 2.1 ?

If I remember correctly, firstly you need to declare the ServerAddress as a
value composite in the configuration module of MongoDbEntityStore and
secondly you need to use JSON in the bootstrap configuration. I think (and
Paul can probably correct me if I am wrong) that you can either use .json
file instead of .properties file, or have a JSON object for the nodes

HOWEVER, the ServerAddress doesn't have setters, and I am not sure if
Jackson will deserialize that anyway.

But in principle this should work...

nodes=[ { "host":"n1.acme.com"}, { "host":"n2.acme.com"}, { "host":"
n3.acme.com"}, { "host":"n4.acme.com"} ]

I would be delighted to hear if it does or not, as this would affect 3.0
release as well.


On Wed, May 3, 2017 at 6:08 PM, Apostolos Krionidis <
aldrigmej@yahoo.gr.invalid> wrote:

> Hello I' m Apostolis
> I'm working with Qi4j a couple of years and recently I tried to connect
> with MongoDb Entity Store.
> Everything was fine and I successfully insert entities in Mongo when I
> configure the .property file with hostname and port.
> The problem came when I tried to configure in the .property file the nodes
> property.
> So when I use the nodes property I get back the following error:"Could not
> find any visible ValueComposite of type [com.mongodb.ServerAddress] in
> module [config]"
> How can I add more nodes in MongoEntityStore.
> My current version is 2.1
> Thank you very muchApostolis

Niclas Hedhman, Software Developer
http://polygene.apache.org - New Energy for Java

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message