Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21D051007C for ; Mon, 17 Jun 2013 05:03:14 +0000 (UTC) Received: (qmail 891 invoked by uid 500); 17 Jun 2013 05:03:12 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 143 invoked by uid 500); 17 Jun 2013 05:03:06 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 133 invoked by uid 99); 17 Jun 2013 05:03:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jun 2013 05:03:04 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=HTML_MESSAGE,MSGID_MULTIPLE_AT,RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [173.201.193.234] (HELO p3plsmtpa09-05.prod.phx3.secureserver.net) (173.201.193.234) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jun 2013 05:02:56 +0000 Received: from FONNOIDSK53 ([59.90.180.189]) by p3plsmtpa09-05.prod.phx3.secureserver.net with id pH291l00E45an3P01H2Bbg; Sun, 16 Jun 2013 22:02:13 -0700 From: "Shlok Thakur" To: Subject: Issue with Protobuf and Thrift content type Date: Mon, 17 Jun 2013 10:27:21 +0530 Message-ID: <000901ce6b17$28539830$78fac890$@thakur@fonantrix.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_000A_01CE6B45.420BD430" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac5o1iPwnTpPtIU+TiCJb+XIP2WPPAAC1QMQAI1kL5A= Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org This is a multipart message in MIME format. ------=_NextPart_000_000A_01CE6B45.420BD430 Content-Type: multipart/alternative; boundary="----=_NextPart_001_000B_01CE6B45.420CBE90" ------=_NextPart_001_000B_01CE6B45.420CBE90 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, In my Java application,I want to provide support for Avro, Thrift and Protobuf. I am using java classes generated by avro schema and avro idl. When I use ProtoBufDatumReader and ProtoBufDatumWriter classes to support encode and decode Protobuf content. I get following exception: java.lang.RuntimeException: java.lang.NoSuchMethodException: org.openrtb.common.api.BidRequest.getDescriptor() at org.apache.avro.protobuf.ProtobufData.getSchema(ProtobufData.java:181) at org.apache.avro.protobuf.ProtobufDatumWriter.(ProtobufDatumWriter.java :36) at org.openrtb.dsp.core.DemandSideServerTest.writeBidRequest(DemandSideServerTe st.java:293) at org.openrtb.dsp.core.DemandSideServerTest.protobufRespondTest(DemandSideServ erTest.java:263) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod. java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.j ava:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.ja va:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.jav a:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28 ) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunne r.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav a:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav a:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) Similarly Thrift content type is also not working for me. Following is the exception: java.lang.NullPointerException: null of org.openrtb.common.api.BidRequest at org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:93) at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:87) at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:58) at org.openrtb.dsp.core.DemandSideServerTest.writeBidRequest(DemandSideServerTe st.java:295) at org.openrtb.dsp.core.DemandSideServerTest.thriftRespondTest(DemandSideServer Test.java:275) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:597) pls find the attachment to complete stack trace for Protobuf & Thirft issue Can you pls advice and help me to resolve this issue. Regards Shlok Thakur ------=_NextPart_001_000B_01CE6B45.420CBE90 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

 

 

Hi,

         &= nbsp;     

In my Java application,I want to provide support = for Avro, Thrift and Protobuf. I am using java classes generated by avro schema = and  avro idl. When I use ProtoBufDatumReader and ProtoBufDatumWriter = classes to support encode and decode Protobuf content. I get following = exception:

java.lang.RuntimeException: = java.lang.NoSuchMethodException: org.openrtb.common.api.BidRequest.getDescriptor()

      at org.apache.avro.protobuf.ProtobufData.getSchema(ProtobufData.java:181)

      at org.apache.avro.protobuf.ProtobufDatumWriter.<init>(ProtobufDatumWriter.java:36)

      at org.openrtb.dsp.core.DemandSideServerTest.writeBidRequest(DemandSideServerTest.java:293)

      at org.openrtb.dsp.core.DemandSideServerTest.protobufRespondTest(<= span style=3D'font-size:10.0pt;font-family:"Courier = New";color:navy'>DemandSideServerTest.java:263)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native = Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:597)

      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)

      at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

      at = org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

 

Similarly Thrift content type is also not working = for me. Following is the exception:

java.lang.NullPointerException: null of org.openrtb.common.api.BidRequest

      at org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:93)

      at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:87)

      at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:58)

      at org.openrtb.dsp.core.DemandSideServerTest.writeBidRequest(DemandSideServerTest.java:295)

      at org.openrtb.dsp.core.DemandSideServerTest.thriftRespondTest(DemandSideServerTest.java:275)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native = Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at = java.lang.reflect.Method.invoke(Method.java:597)

 

pls find the attachment to complete stack trace for  Protobuf & Thirft issue   

Can you pls advice and help me to resolve this = issue.

 

Regards

Shlok Thakur

------=_NextPart_001_000B_01CE6B45.420CBE90-- ------=_NextPart_000_000A_01CE6B45.420BD430 Content-Type: text/plain; name="protobuf.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="protobuf.txt" org.openrtb.dsp.intf.model.DSPException: = org.openrtb.dsp.intf.model.DSPException: java.lang.RuntimeException: = java.lang.NoSuchMethodException: = org.openrtb.common.api.BidRequest.getDescriptor() at = org.openrtb.dsp.core.DemandSideServer.respond(DemandSideServer.java:142) at = org.openrtb.dsp.core.DemandSideServerTest.protobufRespondTest(DemandSideS= erverTest.java:265) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at = sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :39) at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at = org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMeth= od.java:44) at = org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallabl= e.java:15) at = org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod= .java:41) at = org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.= java:20) at = org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java= :28) at = org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRu= nner.java:79) at = org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.= java:71) at = org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.= java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at = org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4Test= Reference.java:49) at = org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.jav= a:38) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes= tRunner.java:467) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes= tRunner.java:683) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunn= er.java:390) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRun= ner.java:197) Caused by: org.openrtb.dsp.intf.model.DSPException: = java.lang.RuntimeException: java.lang.NoSuchMethodException: = org.openrtb.common.api.BidRequest.getDescriptor() at = org.openrtb.dsp.core.DemandSideServer.readRequest(DemandSideServer.java:2= 14) at = org.openrtb.dsp.core.DemandSideServer.respond(DemandSideServer.java:123) ... 25 more Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: = org.openrtb.common.api.BidRequest.getDescriptor() at = org.apache.avro.protobuf.ProtobufData.getSchema(ProtobufData.java:181) at = org.apache.avro.protobuf.ProtobufDatumReader.(ProtobufDatumReader.j= ava:40) at = org.openrtb.dsp.core.DemandSideServer.getDatumReader(DemandSideServer.jav= a:170) at = org.openrtb.dsp.core.DemandSideServer.readRequest(DemandSideServer.java:2= 05) ... 26 more Caused by: java.lang.NoSuchMethodException: = org.openrtb.common.api.BidRequest.getDescriptor() at java.lang.Class.getMethod(Class.java:1605) at = org.apache.avro.protobuf.ProtobufData.getSchema(ProtobufData.java:179) ... 29 more ------=_NextPart_000_000A_01CE6B45.420BD430 Content-Type: text/plain; name="thirft.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="thirft.txt" org.openrtb.dsp.intf.model.DSPException: = org.openrtb.dsp.intf.model.DSPException: java.lang.NullPointerException at = org.openrtb.dsp.core.DemandSideServer.respond(DemandSideServer.java:142) at = org.openrtb.dsp.core.DemandSideServerTest.thriftRespondTest(DemandSideSer= verTest.java:277) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at = sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :39) at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at = org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMeth= od.java:44) at = org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallabl= e.java:15) at = org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod= .java:41) at = org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.= java:20) at = org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java= :28) at = org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRu= nner.java:79) at = org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.= java:71) at = org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.= java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at = org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4Test= Reference.java:49) at = org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.jav= a:38) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes= tRunner.java:467) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes= tRunner.java:683) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunn= er.java:390) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRun= ner.java:197) Caused by: org.openrtb.dsp.intf.model.DSPException: = java.lang.NullPointerException at = org.openrtb.dsp.core.DemandSideServer.readRequest(DemandSideServer.java:2= 14) at = org.openrtb.dsp.core.DemandSideServer.respond(DemandSideServer.java:123) ... 25 more Caused by: java.lang.NullPointerException at org.apache.avro.thrift.ThriftData.getRecordState(ThriftData.java:98) at = org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.= java:171) at = org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:1= 48) at = org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:1= 39) at = org.openrtb.dsp.core.DemandSideServer.readRequest(DemandSideServer.java:2= 07) ... 26 more ------=_NextPart_000_000A_01CE6B45.420BD430--