Git Product home page Git Product logo

tmongodbconnection's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @adrien-mogenet
  • ๐Ÿ‘€ Iโ€™m interested in Decision Theory
  • ๐ŸŒฑ Iโ€™m currently learning Decision Theory
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on Decision Theory
  • ๐Ÿ“ซ How to reach me http://mogenet.me

tmongodbconnection's People

Contributors

adrien-mogenet avatar haeusler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tmongodbconnection's Issues

authenticate fails

There's a bug if you try to authenticate against a server:
"The method authenticate(String, char[]) in the type DB is not applicable for the argument (String, String)"

According to this javadoc authenticate wants a charArray not string
http://api.mongodb.org/java/2.6.3/com/mongodb/DB.html#DB(com.mongodb.Mongo, java.lang.String)

In the file tMongoDBConnection_begin.javajet - change the last part to


db_<%=cid%>.authenticate(<%=dbuser%>, <%=dbpass%>.toCharArray());

Build failed if context variable is used to define port

Hi,

There is a problem if you use context variable to define port :

Caused by: java.lang.NumberFormatException: For input string: "context.output_database_port"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:449)
    at java.lang.Integer.<init>(Integer.java:660)
    at org.talend.designer.codegen.translators.nosql.mongodb.TMongoDBConnectionBeginJava.generate(Unknown Source)

Below how to resolve this issue :
In the tMongoDBConnection_begin.javajet file, replace this

Integer dbport  = new Integer(ElementParameterParser.getValue(node, "__PORT__"));
%>
com.mongodb.Mongo mongo_<%=cid%> = new com.mongodb.Mongo(<%=dbhost%>, <%=dbport%>);

by

String dbport  = ElementParameterParser.getValue(node, "__PORT__");
%>
com.mongodb.Mongo mongo_<%=cid%> = new com.mongodb.Mongo(<%=dbhost%>, new Integer(<%=dbport%>));

Support for Replica Sets

It would be great if this supported connecting to Mongo replicasets -- any chance you can include this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.