Priyanka, Does the following work-around help your use case: As a work around for now can you specify userName and password separately.
<name>dt.operator.jdbcInputOperator.prop.store.userName</name> <value>root</value> </property> <name>dt.operator.jdbcInputOperator.prop.store.password</name> <value>password</value> </property> -Chandni On Sun, Jan 10, 2016 at 11:10 PM, Priyanka Gugale <priya...@datatorrent.com> wrote: > Hi, > > Thanks for inputs Ashwin and Chandni. > > Just an update, I had tried removing setter which accepts Properties > object, still the setter which has String input was not invoked. > > Chandni, > Are you going to take it up soon? I can help you in resolving this. > > -Priyanka > > On Fri, Jan 8, 2016 at 10:18 PM, Chandni Singh <chan...@datatorrent.com> > wrote: > > > Hi Priyanka, > > > > This looks like a bug and I will fix it. Since connectionProperties is of > > type Properties, I think setConnectionProperties(String ...) may not be > > working. > > > > As a work around for now can you specify userName and password > separately. > > > > <name>dt.operator.jdbcInputOperator.prop.store.userName</name> > > <value>root</value> > > </property> > > > > <name>dt.operator.jdbcInputOperator.prop.store.password</name> > > <value>password</value> > > </property> > > > > > > Thanks, > > Chandni > > > > On Fri, Jan 8, 2016 at 8:28 AM, Ashwin Chandra Putta < > > ashwinchand...@gmail.com> wrote: > > > > > I think I read the question wrong. Seems like the setter method for > > > connection properties is overloaded to take a different object, in this > > > case java.util.Properties. And you want to be able to use either method > > for > > > setting from properties file? > > > > > > I am not sure if method overloading for setters is supported for > setting > > > properties from properties file. Can you try removing the overloaded > > method > > > / or rename the one with java.util.Properties and see if it works? > > > > > > Regards, > > > Ashwin. > > > > > > On Fri, Jan 8, 2016 at 3:28 AM, Priyanka Gugale < > > priya...@datatorrent.com> > > > wrote: > > > > > > > Yes it is comma separated list of key-vale pairs, where key and value > > is > > > > colon separated e.g. "user:myuser,password:mypass". > > > > Here is my property from properties file, > > > > > > > > <property> > > > > > > > > > > > > > > <name>dt.operator.jdbcInputOperator.prop.store.connectionProperties</name> > > > > <value>user:root,password:password</value> > > > > </property> > > > > > > > > This doesn't work for me. > > > > > > > > -Priyanka > > > > > > > > On Fri, Jan 8, 2016 at 2:23 PM, Ashwin Chandra Putta < > > > > ashwinchand...@gmail.com> wrote: > > > > > > > > > I think it is a string of comma separated list of colon separated > key > > > > value > > > > > pairs. Have to confirm it from the setter code or its documentation > > > > though. > > > > > On Jan 8, 2016 12:49 AM, "Priyanka Gugale" <pri...@apache.org> > > wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > I am trying to write an application using JdbcPOJOInputOperator, > > for > > > > > this I > > > > > > am using JDBCStore. > > > > > > JDBCStore has property named "connectionProperties". There are > two > > > > setter > > > > > > methods for same properties. One accepts String and other > > Properties > > > > > > object. > > > > > > > > > > > > When I set connectionProperties as string from config file, it > > throws > > > > an > > > > > > exception saying it expects "Properties" object. > > > > > > Exception: > > > > > > > > > > > > > > > > > > *java.lang.IllegalArgumentException: Cannot invoke > > > > > > com.datatorrent.lib.db.jdbc.JdbcStore.setConnectionProperties on > > bean > > > > > class > > > > > > 'class com.datatorrent.lib.db.jdbc.JdbcStore' - argument type > > > mismatch > > > > - > > > > > > had objects of type "java.lang.String" but expected signature > > > > > > "java.util.Properties"* > > > > > > > > > > > > I updated malhar code to hide setter which accepts Properties > > object, > > > > > then > > > > > > also String setter isn't invoked, I am getting connection > > exceptions > > > as > > > > > > connectionProperties are not set. > > > > > > > > > > > > Any idea about this? > > > > > > > > > > > > -Priyanka > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Regards, > > > Ashwin. > > > > > >