Hi,

I attempted to fix this issue by renaming the overloaded function (
https://github.com/apache/incubator-apex-malhar/pull/169) i.e. renamed the
setConnectionProperties function which accepts "Properties" object. This
fixes the issue, but now I get semver error as I have changed method
signature.

Is there no way we can fix it before next major version release?

-Priyanka



On Mon, Jan 11, 2016 at 1:14 PM, Priyanka Gugale <[email protected]>
wrote:

> I haven't tried that, but it should work. Those are deprecated setters so
> want to avoid their usage.
> I can wait for couple of days so not using this work around. Will use it
> if no other option.
>
> -Priyanka
>
> On Mon, Jan 11, 2016 at 12:42 PM, Chandni Singh <[email protected]>
> wrote:
>
>> 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 <
>> [email protected]>
>> 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 <[email protected]
>> >
>> > 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 <
>> > > [email protected]> 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 <
>> > > [email protected]>
>> > > > 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 <
>> > > > > [email protected]> 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" <[email protected]>
>> > > 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.
>> > > >
>> > >
>> >
>>
>
>

Reply via email to