MongoDB - component gives error on an OK query

One Star

MongoDB - component gives error on an OK query

I'm trying to extend my job to update logged activities with a higher timestamp.
So I've extended my query in the tMongoDBInput-component, but it gives me errors.

From the database that holds:
{ "_id" : ObjectId("4fb19c90ae20889fb54f999d"), "ty" : "auth", "u" : "7224621ef1de421c8d3529cd85a89b4a", "ts" : "May 15, 2012 12:00:16 AM", "c" : "US", "ag" : "product x", "ip" : "23.20.8.225", "tsr" : { "floatApprox" : 1337040016204 } }
Am I trying to get all documents with an higher tsr than e.g. 1337040014785
When I run this query in console: db.logins.find({'tsr' : {$gt : 1337040014785}})
it works fine!

BUT When put {'tsr' : {$gt : 1337040014785}} in the query-filed of the tMongoDBInput-component it gives me error:
Exception in component tMongoDBInput_1
com.mongodb.util.JSONParseException:
{'tsr' : {$gt : 1337040014785}}
^
Arrow pointing at dollar-sign.

AND If I simplify the query to only: "{'tsr' : 1337040014785}"
It gives me another error:
Exception in component tMongoDBInput_1
java.lang.NumberFormatException: For input string: "1337040014785"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:484)
at java.lang.Integer.<init>(Integer.java:636)

What makes the error happen in Talend when it works fine from terminal?
(and how do I get this condition in the talend mongo component query field :-/

- - Edit - -
When I remove all conditions (no query), I also get an error:
Exception in component tMongoDBInput_1
java.lang.NullPointerException
Could this be related to the fact that the document has an embedded document and that I define the schema unsatisfactory?

- - - Edit2 - - -
https://github.com/adrien-mogenet/tMongoDBInput/issues/2
One Star

Re: MongoDB - component gives error on an OK query

Hi
As tMongoDBInput is a custom component, we hope Adrien-mogenet can offer a solution.
Regards,
Pedro