Return-Path: X-Original-To: apmail-apex-dev-archive@minotaur.apache.org Delivered-To: apmail-apex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B532818F85 for ; Mon, 11 Jan 2016 07:12:26 +0000 (UTC) Received: (qmail 25869 invoked by uid 500); 11 Jan 2016 07:12:26 -0000 Delivered-To: apmail-apex-dev-archive@apex.apache.org Received: (qmail 25810 invoked by uid 500); 11 Jan 2016 07:12:26 -0000 Mailing-List: contact dev-help@apex.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apex.incubator.apache.org Delivered-To: mailing list dev@apex.incubator.apache.org Received: (qmail 25783 invoked by uid 99); 11 Jan 2016 07:12:26 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jan 2016 07:12:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DC7801A0659 for ; Mon, 11 Jan 2016 07:12:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.98 X-Spam-Level: ** X-Spam-Status: No, score=2.98 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=datatorrent-com.20150623.gappssmtp.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id WvWAubt9W6ic for ; Mon, 11 Jan 2016 07:12:20 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 5AE8031ACD for ; Mon, 11 Jan 2016 07:12:19 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id l65so198944173wmf.1 for ; Sun, 10 Jan 2016 23:12:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datatorrent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=rPGUnWIuebs71kaFR2l8KthMINd0kDHzOZEKCK/nxv0=; b=ohFF9CNuaBmRAjwBQ+IJCKZsBjbsL8IN15rn3qFRZ6Q8YpSjVWknANxpgDLipEGQNw lioVeecBPw9QR83EpoS4cXXG0fEHFBwgYd3H6nrniP8CCbVkRK7tZVR42OX7fDhuWFNf AaHm744D2bGoqaZ5P+oI9YrYTibUpclTIjbKzvfTTOVnL/9FOoO7N+L4DUxvwvxuhEN8 rxPfPCyoSgTK8Fm9Ybzl9MQ45jQwE38x7M3ZBiTtUDMvzFfSU7GgWPxuXzoGbiVEcZbD ptRp/56WFVhjpb2R5TwP1r6wv952pJd12yA0yP9eOkXcKPtNdUEKJdN69DJmHn2mYuPl sA0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=rPGUnWIuebs71kaFR2l8KthMINd0kDHzOZEKCK/nxv0=; b=FR3YhlgJf4LeqGN4v/40OmNTlglRoisqnzVXUcj99zn7+kXNBpOyrw0de2xS7prJnL xwZ/U0zN2YnO+fUvovSIMlalNnu+g5L6F0zyMHNLCQRpjGM0Masa1ecevW30y/LApsgM UK1nbhffNeaJqQX5LIKpKuD+GqFuipRDZRI9XVtac9D4U+6zkSeRAN0AEutA4n8d/790 3RcZ4OM0RKEL00AYrwxbCOniy41TOq4cxvl9SE4JExCP2LTOhsAZv0i/OyKNSuGlg7Lx EnTJCORy+znwHUg99hTvUhUZZDtcMMa0EMYSgwlHhBBedK3ci3mR5JE8l74E1c8ES7OM jqxw== X-Gm-Message-State: ALoCoQkV29ElmGspcGw1w3J431MSoIYEclD9O/ahJZuDCrSRzD+09fp5DSwosZ11t44v8OPU96MFRR7hO/x+/xK57tbh7fMOpKapn+HMMoMSYOle7FqmHkQ= MIME-Version: 1.0 X-Received: by 10.28.7.72 with SMTP id 69mr1079409wmh.50.1452496333165; Sun, 10 Jan 2016 23:12:13 -0800 (PST) Received: by 10.28.46.3 with HTTP; Sun, 10 Jan 2016 23:12:13 -0800 (PST) In-Reply-To: References: Date: Sun, 10 Jan 2016 23:12:13 -0800 Message-ID: Subject: Re: JDBCStore: problem setting connection properties From: Chandni Singh To: dev@apex.incubator.apache.org Content-Type: multipart/alternative; boundary=001a11443a3af9ef3a052909a7f9 --001a11443a3af9ef3a052909a7f9 Content-Type: text/plain; charset=UTF-8 Priyanka, Does the following work-around help your use case: As a work around for now can you specify userName and password separately. dt.operator.jdbcInputOperator.prop.store.userName root dt.operator.jdbcInputOperator.prop.store.password password -Chandni On Sun, Jan 10, 2016 at 11:10 PM, Priyanka Gugale 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 > 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. > > > > dt.operator.jdbcInputOperator.prop.store.userName > > root > > > > > > dt.operator.jdbcInputOperator.prop.store.password > > password > > > > > > > > Thanks, > > Chandni > > > > On Fri, Jan 8, 2016 at 8:28 AM, Ashwin Chandra Putta < > > ashwinchandrap@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 < > > priyanka@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, > > > > > > > > > > > > > > > > > > > > > > dt.operator.jdbcInputOperator.prop.store.connectionProperties > > > > user:root,password:password > > > > > > > > > > > > This doesn't work for me. > > > > > > > > -Priyanka > > > > > > > > On Fri, Jan 8, 2016 at 2:23 PM, Ashwin Chandra Putta < > > > > ashwinchandrap@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" > > 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. > > > > > > --001a11443a3af9ef3a052909a7f9--