Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EE2E3200B3C for ; Wed, 29 Jun 2016 00:48:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ED2E7160A6C; Tue, 28 Jun 2016 22:48:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 198AE160A56 for ; Wed, 29 Jun 2016 00:48:16 +0200 (CEST) Received: (qmail 3306 invoked by uid 500); 28 Jun 2016 22:48:16 -0000 Mailing-List: contact users-help@apex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@apex.apache.org Delivered-To: mailing list users@apex.apache.org Received: (qmail 3296 invoked by uid 99); 28 Jun 2016 22:48:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jun 2016 22:48:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id CFF93C0284 for ; Tue, 28 Jun 2016 22:48:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.363 X-Spam-Level: * X-Spam-Status: No, score=1.363 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RDNS_DYNAMIC=0.363] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Tnq5Ao8DA6AJ for ; Tue, 28 Jun 2016 22:48:13 +0000 (UTC) Received: from mail.leadferret.com (ec2-184-169-148-195.us-west-1.compute.amazonaws.com [184.169.148.195]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 66AC45F572 for ; Tue, 28 Jun 2016 22:48:12 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.leadferret.com (Postfix) with ESMTP id 8AFB1B21E7F for ; Tue, 28 Jun 2016 22:46:27 +0000 (UTC) Received: from mail.leadferret.com ([127.0.0.1]) by localhost (mail.leadferret.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ik0TBLpp8jVW for ; Tue, 28 Jun 2016 22:46:26 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.leadferret.com (Postfix) with ESMTP id 5A58BB22109 for ; Tue, 28 Jun 2016 22:46:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at leadferret.com Received: from mail.leadferret.com ([127.0.0.1]) by localhost (mail.leadferret.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id T3OnyW7skTz5 for ; Tue, 28 Jun 2016 22:46:26 +0000 (UTC) Received: from mail.leadferret.com (mail.leadferret.com [10.197.83.85]) by mail.leadferret.com (Postfix) with ESMTP id 1DB1BB21E7F for ; Tue, 28 Jun 2016 22:46:26 +0000 (UTC) Date: Tue, 28 Jun 2016 22:46:25 +0000 (UTC) From: Jaikit Jilka To: users Message-ID: <447995649.492664.1467153985906.JavaMail.zimbra@leadferret.com> In-Reply-To: References: <1779869127.434487.1466702239430.JavaMail.zimbra@leadferret.com> <465301908.451318.1466791196236.JavaMail.zimbra@leadferret.com> <259070009.452826.1466793091374.JavaMail.zimbra@leadferret.com> <154219658.454257.1466802784579.JavaMail.zimbra@leadferret.com> Subject: Re: Jdbcoutputoperator implementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.197.83.85] X-Mailer: Zimbra 8.6.0_GA_1153 (ZimbraWebClient - GC51 (Win)/8.6.0_GA_1153) Thread-Topic: Jdbcoutputoperator implementation Thread-Index: RcDp0sfsxiEwNmYhFXSze777mllehA== archived-at: Tue, 28 Jun 2016 22:48:18 -0000 Hello, I am getting an error as follow: Stopped running due to an exception. java.lang.ClassCastException: java.lan= g.String cannot be cast to com.mycompany.test.PojoEvent =09at SC.get(Unknown Source) =09at com.datatorrent.lib.db.jdbc.JdbcPOJOOutputOperator.setStatementParame= ters(JdbcPOJOOutputOperator.java:175) =09at com.datatorrent.lib.db.jdbc.AbstractJdbcTransactionableOutputOperator= .processBatch(AbstractJdbcTransactionableOutputOperator.java:114) =09at com.datatorrent.lib.db.jdbc.AbstractJdbcTransactionableOutputOperator= .endWindow(AbstractJdbcTransactionableOutputOperator.java:93) =09at com.datatorrent.stram.engine.GenericNode.processEndWindow(GenericNode= .java:145) =09at com.datatorrent.stram.engine.GenericNode.run(GenericNode.java:351) =09at com.datatorrent.stram.engine.StreamingContainer$2.run(StreamingContai= ner.java:1388) I am not sure where to check the cast mismatch. I am inserting a value in t= he database. Thank You, Jaikit Jilka ----- Original Message ----- From: "Pradeep A. Dalvi" To: "users" Sent: Friday, June 24, 2016 4:45:18 PM Subject: Re: Jdbcoutputoperator implementation What are errors/exceptions seen in JdbcOutput container logs? Are you setting Context.PortContext.TUPLE_CLASS to POJO class being used? -- prad On Fri, Jun 24, 2016 at 2:13 PM, Jaikit Jilka wrote= : > Hello, > > I resolved that error and now I can launch the application, But now the c= ontainer which has jdbcoperator is getting killed. I am attaching the dt.lo= g file of container which is running but does not have any operator. > > Thank You, > > Jaikit Jilka > > ----- Original Message ----- > From: "Pradeep A. Dalvi" > To: "users" > Sent: Friday, June 24, 2016 11:41:47 AM > Subject: Re: Jdbcoutputoperator implementation > > Yes, because it is not yet released. Compile & install latest malhar > in local ~/.m2 directory. > For that, git clone Malhar library repository. And do 'mvn clean > install' in that malhar clone. > > On Fri, Jun 24, 2016 at 11:31 AM, Jaikit Jilka wr= ote: >> Hello, >> >> When I change my malher version in POM.xml to the latest i.e 3.5.0-SNAPS= HOT it gives me an build time error : Failure to find org.apache.apex:malha= r-library:jar:3.5.0-SNAPSHOT in https://www.datatorrent.com/maven/content/r= epositories/snapshots/. >> >> Thank You, >> >> Jaikit Jilka >> >> ----- Original Message ----- >> From: "Pradeep A. Dalvi" >> To: "users" >> Sent: Friday, June 24, 2016 11:13:42 AM >> Subject: Re: Jdbcoutputoperator implementation >> >> This issue was in 3.4 malhar and fixed later on. Fix is present in >> master branch. You can use latest malhar. >> For reference: https://github.com/apache/apex-malhar/blob/master/library= /src/main/java/com/datatorrent/lib/db/jdbc/AbstractJdbcTransactionableOutpu= tOperator.java#L142 >> >> On Fri, Jun 24, 2016 at 10:59 AM, Jaikit Jilka w= rote: >>> Hello, >>> >>> I am setting UpdateCommand to empty string from properties.xml file sti= ll I am getting the same error >>> >>> >>> dt.application.MyWordCountApplication.operator.JdbcOutput= .prop.setupdateCommand >>> >>> >>> >>> error: >>> >>> An error occurred trying to launch the application. Server message: jav= ax.validation.ConstraintViolationException: Operator JdbcOutput violates co= nstraints [ConstraintViolationImpl{rootBean=3DJdbcPOJOOutputOperator{name= =3Dnull}, propertyPath=3D'updateCommand', message=3D'may not be null', leaf= Bean=3DJdbcPOJOOutputOperator{name=3Dnull}, value=3Dnull}] at com.datatorre= nt.stram.plan.logical.LogicalPlan.validate(LogicalPlan.java:1680) at com.da= tatorrent.stram.StramClient.(StramClient.java:161) at com.datatorrent= .stram.client.StramAppLauncher.launchApp(StramAppLauncher.java:509) at com.= datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:2050) at com.d= atatorrent.stram.cli.DTCli.launchAppPackage(DTCli.java:3456) at com.datator= rent.stram.cli.DTCli.access$7100(DTCli.java:106) at com.datatorrent.stram.c= li.DTCli$LaunchCommand.execute(DTCli.java:1895) at com.datatorrent.stram.cl= i.DTCli$3.run(DTCli.java:1449) >>> >>> Thank You, >>> >>> Jaikit Jilka >>> >>> ----- Original Message ----- >>> From: "Munagala Ramanath" >>> To: "users" >>> Sent: Thursday, June 23, 2016 3:32:42 PM >>> Subject: Re: Jdbcoutputoperator implementation >>> >>> Please look at: >>> >>> http://docs.datatorrent.com/beginner/ and >>> http://docs.datatorrent.com/application_packages/ >>> >>> for examples on how to set properties from XML files. >>> >>> Ram >>> >>> On Thu, Jun 23, 2016 at 3:25 PM, Jaikit Jilka w= rote: >>> >>>> Hello, >>>> >>>> How to pass an empty string for updatecommand in properties.xml. >>>> When I change my malhar version to 3.5.0-SNAPSHOT it gives me a compli= e >>>> time error -Failure to find >>>> org.apache.apex:malhar-library:jar:3.5.0-SNAPSHOT in >>>> https://www.datatorrent.com/maven/content/repositories/snapshots/ >>>> >>>> Thank You, >>>> >>>> Jaikit Jilka >>>> >>>> ----- Original Message ----- >>>> From: "Pradeep A. Dalvi" >>>> To: "users" >>>> Sent: Thursday, June 23, 2016 12:43:40 PM >>>> Subject: Re: Jdbcoutputoperator implementation >>>> >>>> Hi Jaikit, >>>> >>>> This constraint violation exception was enforced from >>>> AbstractJdbcTransactionableOutputOperator. In 3.3/3.4 malhar library, >>>> updateCommand parameter has constraint set to @NotNull on getter >>>> method. >>>> >>>> You could do either of following to solve this: >>>> 1. Set updateCommand from properties.xml to empty string >>>> 2. Use master branch of Malhar >>>> 3. Remove @NotNull on getUpdateCommand in >>>> AbstractJdbcTransactionableOutputOperator >>>> >>>> Cheers, >>>> Pradeep A. Dalvi >>>> >>>> On Thu, Jun 23, 2016 at 11:36 AM, Jaikit Jilka >>>> wrote: >>>> > Hi Devendra, >>>> > >>>> > I tried to run your application. I followed all steps mentioned but = I am >>>> getting following error. >>>> > >>>> > An error occurred trying to launch the application. Server message: >>>> javax.validation.ConstraintViolationException: Operator JdbcOutput vio= lates >>>> constraints >>>> [ConstraintViolationImpl{rootBean=3DJdbcPOJOOutputOperator{name=3Dnull= }, >>>> propertyPath=3D'updateCommand', message=3D'may not be null', >>>> leafBean=3DJdbcPOJOOutputOperator{name=3Dnull}, value=3Dnull}] at >>>> com.datatorrent.stram.plan.logical.LogicalPlan.validate(LogicalPlan.ja= va:1680) >>>> at com.datatorrent.stram.StramClient.(StramClient.java:161) at >>>> com.datatorrent.stram.client.StramAppLauncher.launchApp(StramAppLaunch= er.java:509) >>>> at com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:20= 50) >>>> at com.datatorrent.stram.cli.DTCli.launchAppPackage(DTCli.java:3456) a= t >>>> com.datatorrent.stram.cli.DTCli.access$7100(DTCli.java:106) at >>>> com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:1895)= at >>>> com.datatorrent.stram.cli.DTCli$3.run(DTCli.java:1449) >>>> > >>>> > Thank you, >>>> > >>>> > Jaikit Jilka >>>> > >>>> > ----- Original Message ----- >>>> > From: "Devendra Tagare" >>>> > To: "users" >>>> > Sent: Thursday, June 23, 2016 10:32:17 AM >>>> > Subject: Re: Jdbcoutputoperator implementation >>>> > >>>> > Hi Jalkit, >>>> > >>>> > The JdbcPOJOOutputOperator is being configured with the >>>> > JdbcTransactionalStore which requires an additional dt_meta table. >>>> > >>>> > The table schema is here - >>>> > >>>> https://github.com/devtagare/examples/blob/SPOI-8251/tutorials/jdbcToJ= dbc/src/test/resources/example.sql >>>> > >>>> > You can find an example application which uses the JdbcPOJOOutputOpe= rator >>>> > here - >>>> > >>>> https://github.com/devtagare/examples/tree/SPOI-8251/tutorials/jdbcToJ= dbc >>>> > >>>> > Thanks, >>>> > Dev >>>> > >>>> > On Thu, Jun 23, 2016 at 10:17 AM, Jaikit Jilka >>>> > wrote: >>>> > >>>> >> Hello, >>>> >> >>>> >> I am currently working on an application which simply read data fro= m >>>> .txt >>>> >> file and slpits the words and inserts them into mysql. But I am get= ting >>>> >> error. I am using jdbcpojooutputoperator from malhar library. But I= am >>>> >> getting an error on ActiveFieldInfos which says it is protected in >>>> >> jdbcpojoinputoperator and also I do not know what to do in >>>> Application.java >>>> >> file. I am attaching both the file here. Kindly help me resolve the >>>> issue. >>>> >> >>>> >> Thank You, >>>> >> >>>> >> Jaikit Jilka >>>>