avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Casadio Phaedra <Phaedra.Casa...@datamanagementpa.it>
Subject R: java.util.Date RPC AvroRuntimeException
Date Wed, 18 Feb 2015 08:20:57 GMT
Thanks, but the problem is that the compiler does not compile date type.

Another patch?

Da: S G [mailto:sg.online.email@gmail.com]
Inviato: martedì 17 febbraio 2015 20:58
A: user@avro.apache.org
Oggetto: Re: java.util.Date RPC AvroRuntimeException

I haven't tried the Date fix myself.
But there is a testcase included in the patch: https://issues.apache.org/jira/secure/attachment/12601861/AVRO-739.patch

If you cannot find it in the trunk, maybe the patch is not merged yet and you need to apply
the patch locally to test it out.

Cheers
Sachin

On Tue, Feb 17, 2015 at 5:14 AM, Casadio Phaedra <Phaedra.Casadio@datamanagementpa.it<mailto:Phaedra.Casadio@datamanagementpa.it>>
wrote:
I downloaded trunk of Avro from svn, but as i can see i cannot find date type definition,
where it is?

Also, if i can: is avro in active development or it is slowing down? This because i can’t
see many differences from 1.7.7 to 1.8.

Maybe i’m wrong.

Thanks, Phaedra.

Da: Casadio Phaedra [mailto:Phaedra.Casadio@datamanagementpa.it<mailto:Phaedra.Casadio@datamanagementpa.it>]
Inviato: martedì 17 febbraio 2015 09:32
A: user@avro.apache.org<mailto:user@avro.apache.org>
Oggetto: R: java.util.Date RPC AvroRuntimeException

I’m using version 1.7.7.

I’m in a production environment so i can’t use alphas.

When will you release 1.8?

Thanks, Phaedra.

Da: S G [mailto:sg.online.email@gmail.com]
Inviato: lunedì 16 febbraio 2015 20:00
A: user@avro.apache.org<mailto:user@avro.apache.org>
Oggetto: Re: java.util.Date RPC AvroRuntimeException

Avro added support for Date types recently.
https://issues.apache.org/jira/browse/AVRO-739

Which version are you using?
Also, note that support for java.util.* classes like UUID is still to be added.
https://issues.apache.org/jira/browse/AVRO-1554


On Mon, Feb 16, 2015 at 6:02 AM, Casadio Phaedra <Phaedra.Casadio@datamanagementpa.it<mailto:Phaedra.Casadio@datamanagementpa.it>>
wrote:
No one can help with?

Da: Casadio Phaedra [mailto:Phaedra.Casadio@datamanagementpa.it<mailto:Phaedra.Casadio@datamanagementpa.it>]
Inviato: giovedì 12 febbraio 2015 11:49
A: user@avro.apache.org<mailto:user@avro.apache.org>
Oggetto: java.util.Date RPC AvroRuntimeException

Hi, I’m trying to pass a date object trough avro IPC, but I’m caught in this situation:

Exception without union

  record Movement {
    @java-class("java.util.Date") string dtStart;
  }

2015-02-12 11:42:32,510 WARN  org.apache.avro.ipc.Responder.warn(363) system error
java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.CharSequence
               at org.apache.avro.generic.GenericDatumWriter.writeString(GenericDatumWriter.java:213)
               at org.apache.avro.specific.SpecificDatumWriter.writeString(SpecificDatumWriter.java:69)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:76)
               at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:114)
               at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:104)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:66)
               at org.apache.avro.generic.GenericDatumWriter.writeArray(GenericDatumWriter.java:138)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:68)
               at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:114)
               at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:104)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:66)
               at org.apache.avro.generic.GenericDatumWriter.writeArray(GenericDatumWriter.java:138)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:68)
               at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:114)
               at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:104)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:66)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:58)
               at org.apache.avro.ipc.generic.GenericResponder.writeResponse(GenericResponder.java:68)
               at org.apache.avro.ipc.Responder.respond(Responder.java:166)
               at org.apache.avro.ipc.Responder.respond(Responder.java:99)
               at org.apache.avro.ipc.ResponderServlet.doPost(ResponderServlet.java:48)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
               at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
               at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
               at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
               at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
               at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
               at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
               at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
               at java.lang.Thread.run(Thread.java:744)

Exception with union:

  record Movement {
    union(null, @java-class("java.util.Date") string) dtStart;
  }

2015-02-12 11:15:03,009 WARN  org.apache.avro.ipc.Responder.warn(363) system error
org.apache.avro.AvroRuntimeException: Unknown datum type java.util.Date: Fri Nov 14 13:54:16
CET 2014
               at org.apache.avro.generic.GenericData.getSchemaName(GenericData.java:636)
               at org.apache.avro.specific.SpecificData.getSchemaName(SpecificData.java:265)
               at org.apache.avro.generic.GenericData.resolveUnion(GenericData.java:601)
               at org.apache.avro.generic.GenericDatumWriter.resolveUnion(GenericDatumWriter.java:151)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:71)
               at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:114)
               at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:104)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:66)
               at org.apache.avro.generic.GenericDatumWriter.writeArray(GenericDatumWriter.java:138)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:68)
               at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:114)
               at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:104)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:66)
               at org.apache.avro.generic.GenericDatumWriter.writeArray(GenericDatumWriter.java:138)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:68)
               at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:114)
               at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:104)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:66)
               at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:58)
               at org.apache.avro.ipc.generic.GenericResponder.writeResponse(GenericResponder.java:68)
               at org.apache.avro.ipc.Responder.respond(Responder.java:166)
               at org.apache.avro.ipc.Responder.respond(Responder.java:99)
               at org.apache.avro.ipc.ResponderServlet.doPost(ResponderServlet.java:48)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
               at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
               at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
               at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
               at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
               at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
               at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
               at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
               at java.lang.Thread.run(Thread.java:744)




Mime
View raw message