Mined Opinions For API: org.joda

This tab contains all the opinions collected from Stack Overflow about the API. The other tabs present summaries of the opinions using different algorithms.
  • Could you expand on this please?. details
  • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?. details
  • I know it, but it is easy to convert joda DateTime to regular Date and then apply standard java date formatter.. details
  • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?. details
  • from my point of view, you should be able to configure JodaModule itself and then simply register it as usual, yeh, maybe it's a good thing to work on.. details
  • I suppose a patch will be welcome ;).. details
  • By my search it's recommended to change the Datetime format to String in the webservice, is that a good solution?. details
  • Thanks for your reply by the way.. details
  • According to URL_http://joda-time.sourceforge.net/userguide.html [JodaTime- official-guide] CODETERM2 returns - _the standard ISO8601 string for the DateTime._ Also, standard CODETERM3 always creates UTC datetimes.. details
  • JodaTime CODETERM1 use standard toString() method.. details
  • According to URL_http://joda-time.sourceforge.net/userguide.html [JodaTime- official-guide] CODETERM2 returns - _the standard ISO8601 string for the DateTime._ Also, standard CODETERM3 always creates UTC datetimes.. details
  • It looks like timezone information is lost.. details
  • I understand that is it pretty standard to serialize dates in Json this way, however how can I get this value deserialized into a Joda DateTime?. details
  • thanks, i was hunting for the providers... it seems the upgrade fixed a whole host of minor problems as well (double comma being one).. details
  • Not missing, but on its own project -- URL_https://github.com/FasterXML/jackson - jaxrs-json-provider -- same applies for some other things like Joda types.. details
  • In my case, I was happy with unix time, so: CODESNIPPET_JAVA2 .. details
  • In my case, I was happy with unix time, so: CODESNIPPET_JAVA2 .. details
  • so as you can see I am using JodaModule to serialize/deserialize org.joda.time.DateTime But my date format doesn't applies during serialization process and it produces date like this: CODETERM1 I took a look on JodaModule and I see that it registers following CODESNIPPET_JAVA2 .. details
  • Looking for your oppinions.Thank you.. details
  • This has become very easy with Jackson 2.0 and the Joda module.. details
  • I am trying to start working with jackson for serializing objects having Joda CODETERM1 members.. details
  • Definitely plan to use Joda Time as well.. details
  • Definitely plan to use Joda Time as well.. details
  • Good luck!. details
  • If you're doing anything _significant_ with dates and times, I'd thoroughly recommend using URL_http://joda-time.sf.net [Joda-Time] instead of the classes in java.util.. details
  • If you're doing anything _significant_ with dates and times, I'd thoroughly recommend using URL_http://joda-time.sf.net [Joda-Time] instead of the classes in java.util.. details
  • This is working perfectly fine in my unit test.. details
  • Jackson JSON not serializing Joda DateTime correctly.. details
  • Hmm, interesting.. details
  • Their solution is pretty similar to mine :).. details
  • Their solution is pretty similar to mine :).. details
  • Hmm, interesting.. details
  • How do I get Jackson to serialize my Joda DateTime object according to a simple pattern (like "dd-MM-yyyy"?. details
  • Thanks!. details
  • when I add that I get the compile error "incompatible types: JodaModule cannot be converted to Module" - the method expects a org.codehaus.jackson.map.Module but JodaModule does not have this in its heirarchy so how could this work?. details
  • You can still register custom serializer and deserializer, and those will have precedence over default implementation.. details
  • Instead of complaining, have you actually tried to contact authors of module, offering your help?. details
  • So there's a whole separate module devoted to handling Joda objects, but it does the serialization in the most simplistic manner possible, failing to retain crucial information... That's a shame.. details
  • when I add that I get the compile error "incompatible types: JodaModule cannot be converted to Module" - the method expects a org.codehaus.jackson.map.Module but JodaModule does not have this in its heirarchy so how could this work?. details
  • I'm using Joda DateTime, may be this problem?. details
  • I'm using Joda DateTime, may be this problem?. details
  • I'm using Joda DateTime, may be this problem?. details
  • I already try other versions os Joda and it throws the same exception.. details
  • Default is CODETERM8 .. details
  • Default is CODETERM8 .. details
  • From URL_http://joda-time.sourceforge.net/apidocs/org/joda/time/base/AbstractI nstant.html#equals%28java.lang.Object%29 [the-Javadoc-for- AbstractInstant#equals()] which is a superclass of CODETERM1 : Compares this object with the specified object for equality based on the millisecond instant, chronology _and time zone_**.. details
  • From URL_http://joda-time.sourceforge.net/apidocs/org/joda/time/base/AbstractI nstant.html#equals%28java.lang.Object%29 [the-Javadoc-for- AbstractInstant#equals()] which is a superclass of CODETERM1 : Compares this object with the specified object for equality based on the millisecond instant, chronology _and time zone_**.. details
  • Jackson loses time offset from dates when deserializing to JodaTime.. details
  • and date format is hard coded and it's ISO.. details
  • I realize this question is from a while back, but for future reference, objectMapper.getSerializationConfig().setDateFormat(df) is now deprecated.. details
  • Exception would indicate that you are using incompatible Joda version (most likely an older version).. details
  • JSON: [{"Description":"Cliente Jos","EndDate":"/Date(1353319200000+0000)/","ID":0,"S tartDate":"/Date(1353315600000+0000)/"},{"Description":"Cliente Carlos","EndDa te":"/Date(1353348000000+0000)/","ID":0,"StartDate":"/Date(1353344400000+0000) /"},{"Description":"Cliente Pedro","EndDate":"/Date(1353513600000+0000)/","ID" :0,"StartDate":"/Date(1353510000000+0000)/"},{"Description":"Cliente Marco","E ndDate":"/Date(1353664800000+0000)/","ID":0,"StartDate":"/Date(1353661200000+0 000)/"},{"Description":"Cliente Jos","EndDate":"/Date(1353319200000+0000)/","I D":0,"StartDate":"/Date(1353315600000+0000)/"},{"Description":"Cliente Carlos" ,"EndDate":"/Date(1353348000000+0000)/","ID":0,"StartDate":"/Date(135334440000 0+0000)/"},{"Description":"Cliente Pedro","EndDate":"/Date(1353513600000+0000) /","ID":0,"StartDate":"/Date(1353510000000+0000)/"},{"Description":"Cliente Ma rco","EndDate":"/Date(1353664800000+0000)/","ID":0,"StartDate":"/Date(13536612 00000+0000)/"}] Full log 01-03 17:39:24.700: E/dalvikvm(18494): Unable to resolve Lorg/joda/time/base/AbstractInstant; annotation class 155701-03 17:39:28.505: W/dalvikvm(18494): threadid=11: thread exiting with uncaught exception (group=0x40c4d1f8)01-03 17:39:28.650: E/AndroidRuntime(18494): FATAL EXCEPTION: AsyncTask 101-03 17:39:28.650: E/AndroidRuntime(18494): java.lang.RuntimeException: An error occured while executing doInBackground()01-03 17:39:28.650: E/AndroidRuntime(18494): at android.os.AsyncTask$3.done(AsyncTask.java:278)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask$Sync.innerSetExcep tion(FutureTask.java:273)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask.run(FutureTask.java:137)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1076)01-03 17:39:28.650: E/AndroidRuntime(18494): at j ava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.Thread.run(Thread.java:856)01-03 17:39:28.650: E/AndroidRuntime(18494): Caused by: java.lang.NoClassDefFoundError: org/joda/convert/ToString01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.reflect.Method.getDeclaredAnnotations(Native Method)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:267)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.AnnotatedClass._addMixUnders(AnnotatedClass.java:999)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass._addMemberMethods(AnnotatedClass.java:610)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass.resolveMemberMethods(AnnotatedClass.java:421)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass.memberMethods(AnnotatedClass.java:243)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.POJOProp ertiesCollector._addMethods(POJOPropertiesCollector.java:442)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.POJOPropertiesCollector.collect(POJOPropertiesCollector.java:232)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.BasicClassIntrospector.collectProperties(BasicClassIntrospector.java:142 )01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databin d.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.. details
  • This seemed to do the trick for me: URL_http://stackoverflow.com/questions/3269459/how-to-serialize-joda-datetime- with-jackson-json-processer [How-to-serialize-Joda-DateTime-with-Jackson-JSON- processer?]. details
  • Do you have the optional URL_http://joda-convert.sourceforge.net/ [joda- convert] jar on your classpath?. details
  • I am getting the following exception (I fail to understand what I was doing wrong): CODESNIPPET_JAVA3 .. details
  • I am getting the following exception (I fail to understand what I was doing wrong): CODESNIPPET_JAVA3 .. details
  • Also makes sure that the value must be of type long like: System.out.println(new Date(1323288181l*1000l));.. details
  • Also makes sure that the value must be of type long like: System.out.println(new Date(1323288181l*1000l));.. details
  • You can use CODETERM1 of URL_http://joda- time.sourceforge.net/ [Joda-time] library to convert ISO date string to java data object.. details
  • Consider URL_http://joda-time.sourceforge.net/ [Joda-time-plug] .. details
  • However, I recommend using URL_http://joda-time.sourceforge.net/ [JodaTime] .. details
  • However, I recommend using URL_http://joda-time.sourceforge.net/ [JodaTime] .. details
  • However, I recommend using URL_http://joda-time.sourceforge.net/ [JodaTime] .. details
  • However, I recommend using URL_http://joda-time.sourceforge.net/ [JodaTime] .. details
  • As for Joda Time, my project is on Android and I want to use as little external libs as possible.. details
  • As for Joda Time, my project is on Android and I want to use as little external libs as possible.. details
  • They offer (among many things) a URL_http ://joda-time.sourceforge.net/api- release/org/joda/time/format/ISODateTimeFormat.html [CODETERM1] to parse these kinds of strings.. details
  • URL_http://www.java2s.com/Code/Java/Data-Type/ISO8601dateparsingutility.htm [Here's-one] If you are open to using something other than Java's built-in Date/Time/Calendar classes, I would also suggest URL_http://joda- time.sourceforge.net [Joda-Time] .. details
  • They offer (among many things) a URL_http ://joda-time.sourceforge.net/api- release/org/joda/time/format/ISODateTimeFormat.html [CODETERM1] to parse these kinds of strings.. details
  • URL_http://www.java2s.com/Code/Java/Data-Type/ISO8601dateparsingutility.htm [Here's-one] If you are open to using something other than Java's built-in Date/Time/Calendar classes, I would also suggest URL_http://joda- time.sourceforge.net [Joda-Time] .. details
  • Both of above should actually also work (@JsonSerialize should imply that field is to be serialized; and date format should also ideally apply to Joda), so you might want to file a Jira bug at URL_http://jira.codehaus.org/browse/JACKSON .. details
  • For best compatibility 1.6.1 has some further improvements to reduce warnings during initialization (used to complain about missing javax.xml and Joda classes, not any more) .. details
  • Since I am more familiar with Jackson, here are some aspects where I think Jackson has more complete support than Gson (apologies if I miss a Gson feature): Extensive annotation support; including full inheritance, and advanced "mix-in" annotations (associate annotations with a class for cases where you can not directly add them) Streaming (incremental) reading, writing, for ultra-high performance (or memory-limited) use cases; can mix with data binding (bind sub-trees) -- EDIT latest versions of Gson also include streaming reader Tree model (DOM-like access); can convert between various models (tree <-> java object <-> stream) Can use any constructors (or static factory methods), not just default constructor Field and getter/setter access (earlier gson versions only used fields, this may have changed) Out-of-box JAX-RS support Interoperability: can also use JAXB annotations, has support/work-arounds for common packages (joda, ibatis, cglib), JVM languages (groovy, clojure, scala) Ability to force static (declared) type handling for output Support for deserializing polymorphic types (Jackson 1.5) -- can serialize AND deserialize things like List correctly (with additional type information) Integrated support for binary content (base64 to/from JSON Strings) .. details
  • Since I am more familiar with Jackson, here are some aspects where I think Jackson has more complete support than Gson (apologies if I miss a Gson feature): Extensive annotation support; including full inheritance, and advanced "mix-in" annotations (associate annotations with a class for cases where you can not directly add them) Streaming (incremental) reading, writing, for ultra-high performance (or memory-limited) use cases; can mix with data binding (bind sub-trees) -- EDIT latest versions of Gson also include streaming reader Tree model (DOM-like access); can convert between various models (tree <-> java object <-> stream) Can use any constructors (or static factory methods), not just default constructor Field and getter/setter access (earlier gson versions only used fields, this may have changed) Out-of-box JAX-RS support Interoperability: can also use JAXB annotations, has support/work-arounds for common packages (joda, ibatis, cglib), JVM languages (groovy, clojure, scala) Ability to force static (declared) type handling for output Support for deserializing polymorphic types (Jackson 1.5) -- can serialize AND deserialize things like List correctly (with additional type information) Integrated support for binary content (base64 to/from JSON Strings) .. details
Summaries the opinions about org.joda using topic modeling.
  • 0. standard datetime accord jodatime tostring utc datetimedeserializer datetimes return create: 6
    • I suppose a patch will be welcome ;).. details
    • According to JodaTime- official-guide] toString() returns - _the standard ISO8601 string for the DateTime._ Also, standard DateTimeDeserializer always creates UTC datetimes.. details
    • It looks like timezone information is lost.. details
    • This is working perfectly fine in my unit test.. details
    • Hmm, interesting.. details
    • Their solution is pretty similar to mine :).. details
  • 1. datetime apply thing provider minor comma upgrade search yeh solution: 5
    • from my point of view, you should be able to configure JodaModule itself and then simply register it as usual, yeh, maybe it's a good thing to work on.. details
    • I know it, but it is easy to convert joda DateTime to regular Date and then apply standard java date formatter.. details
    • By my search it's recommended to change the Datetime format to String in the webservice, is that a good solution?. details
    • thanks, i was hunting for the providers... it seems the upgrade fixed a whole host of minor problems as well (double comma being one).. details
    • This has become very easy with Jackson 2.0 and the Joda module.. details
  • 2. datetime jodamodule serialize time jackson register apply format 541z 15t09: 2
    • so as you can see I am using JodaModule to serialize/deserialize org.joda.time.DateTime But my date format doesn't applies during serialization process and it produces date like this: 2013-06-15T09:50:08.541Z I took a look on JodaModule and I see that it registers following CODESNIPPET .. details
    • I am trying to start working with jackson for serializing objects having Joda DateTime members.. details
  • 3. serialize datetime time standard jackson pattern simple yyyy accord deserialized: 8
    • JodaTime DateTimeSerializer use standard toString() method.. details
    • I understand that is it pretty standard to serialize dates in Json this way, however how can I get this value deserialized into a Joda DateTime?. details
    • Looking for your oppinions.Thank you.. details
    • Good luck!. details
    • If you're doing anything _significant_ with dates and times, I'd thoroughly recommend using Joda-Time instead of the classes in java.util.. details
    • Jackson JSON not serializing Joda DateTime correctly.. details
    • Thanks!. details
    • How do I get Jackson to serialize my Joda DateTime object according to a simple pattern (like "dd-MM-yyyy"?. details
  • 4. time datetimeformatter dateformat plugin normal provide thing apply provider jaxrs: 6
    • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?. details
    • Could you expand on this please?. details
    • Thanks for your reply by the way.. details
    • Not missing, but on its own project -- - jaxrs-json-provider -- same applies for some other things like Joda types.. details
    • In my case, I was happy with unix time, so: CODESNIPPET .. details
    • Definitely plan to use Joda Time as well.. details
  • 0. androidruntime jackson exception register implementation precedence custom deserializer compatibility reduce: 3
    • You can still register custom serializer and deserializer, and those will have precedence over default implementation.. details
    • I am getting the following exception (I fail to understand what I was doing wrong): CODESNIPPET .. details
    • For best compatibility 1.6.1 has some further improvements to reduce warnings during initialization (used to complain about missing javax.xml and Joda classes, not any more) .. details
  • 1. androidruntime jackson fasterxml databind util futuretask concurrent annotatedclass introspect lang: 5
    • when I add that I get the compile error "incompatible types: JodaModule cannot be converted to Module" - the method expects a org.codehaus.jackson.map.Module but JodaModule does not have this in its heirarchy so how could this work?. details
    • I realize this question is from a while back, but for future reference, objectMapper.getSerializationConfig().setDateFormat(df) is now deprecated.. details
    • JSON: [{"Description":"Cliente Jos","EndDate":"/Date(1353319200000+0000)/","ID":0,"S tartDate":"/Date(1353315600000+0000)/"},{"Description":"Cliente Carlos","EndDa te":"/Date(1353348000000+0000)/","ID":0,"StartDate":"/Date(1353344400000+0000) /"},{"Description":"Cliente Pedro","EndDate":"/Date(1353513600000+0000)/","ID" :0,"StartDate":"/Date(1353510000000+0000)/"},{"Description":"Cliente Marco","E ndDate":"/Date(1353664800000+0000)/","ID":0,"StartDate":"/Date(1353661200000+0 000)/"},{"Description":"Cliente Jos","EndDate":"/Date(1353319200000+0000)/","I D":0,"StartDate":"/Date(1353315600000+0000)/"},{"Description":"Cliente Carlos" ,"EndDate":"/Date(1353348000000+0000)/","ID":0,"StartDate":"/Date(135334440000 0+0000)/"},{"Description":"Cliente Pedro","EndDate":"/Date(1353513600000+0000) /","ID":0,"StartDate":"/Date(1353510000000+0000)/"},{"Description":"Cliente Ma rco","EndDate":"/Date(1353664800000+0000)/","ID":0,"StartDate":"/Date(13536612 00000+0000)/"}] Full log 01-03 17:39:24.700: E/dalvikvm(18494): Unable to resolve Lorg/joda/time/base/AbstractInstant; annotation class 155701-03 17:39:28.505: W/dalvikvm(18494): threadid=11: thread exiting with uncaught exception (group=0x40c4d1f8)01-03 17:39:28.650: E/AndroidRuntime(18494): FATAL EXCEPTION: AsyncTask 101-03 17:39:28.650: E/AndroidRuntime(18494): java.lang.RuntimeException: An error occured while executing doInBackground()01-03 17:39:28.650: E/AndroidRuntime(18494): at android.os.AsyncTask$3.done(AsyncTask.java:278)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask$Sync.innerSetExcep tion(FutureTask.java:273)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask.run(FutureTask.java:137)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1076)01-03 17:39:28.650: E/AndroidRuntime(18494): at j ava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.Thread.run(Thread.java:856)01-03 17:39:28.650: E/AndroidRuntime(18494): Caused by: java.lang.NoClassDefFoundError: org/joda/convert/ToString01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.reflect.Method.getDeclaredAnnotations(Native Method)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:267)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.AnnotatedClass._addMixUnders(AnnotatedClass.java:999)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass._addMemberMethods(AnnotatedClass.java:610)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass.resolveMemberMethods(AnnotatedClass.java:421)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass.memberMethods(AnnotatedClass.java:243)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.POJOProp ertiesCollector._addMethods(POJOPropertiesCollector.java:442)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.POJOPropertiesCollector.collect(POJOPropertiesCollector.java:232)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.BasicClassIntrospector.collectProperties(BasicClassIntrospector.java:142 )01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databin d.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.. details
    • This seemed to do the trick for me: with-jackson-json-processer [How-to-serialize-Joda-DateTime-with-Jackson-JSON- processer?]. details
    • Both of above should actually also work (@JsonSerialize should imply that field is to be serialized; and date format should also ideally apply to Joda), so you might want to file a Jira bug at .. details
  • 2. gson stream jackson model mix include case constructor module manner: 3
    • So there's a whole separate module devoted to handling Joda objects, but it does the serialization in the most simplistic manner possible, failing to retain crucial information... That's a shame.. details
    • Do you have the optional joda- convert] jar on your classpath?. details
    • Since I am more familiar with Jackson, here are some aspects where I think Jackson has more complete support than Gson (apologies if I miss a Gson feature): Extensive annotation support; including full inheritance, and advanced "mix-in" annotations (associate annotations with a class for cases where you can not directly add them) Streaming (incremental) reading, writing, for ultra-high performance (or memory-limited) use cases; can mix with data binding (bind sub-trees) -- EDIT latest versions of Gson also include streaming reader Tree model (DOM-like access); can convert between various models (tree <-> java object <-> stream) Can use any constructors (or static factory methods), not just default constructor Field and getter/setter access (earlier gson versions only used fields, this may have changed) Out-of-box JAX-RS support Interoperability: can also use JAXB annotations, has support/work-arounds for common packages (joda, ibatis, cglib), JVM languages (groovy, clojure, scala) Ability to force static (declared) type handling for output Support for deserializing polymorphic types (Jackson 1.5) -- can serialize AND deserialize things like List correctly (with additional type information) Integrated support for binary content (base64 to/from JSON Strings) .. details
  • 3. androidruntime jackson exception time concurrent deserializing jodatime offset iso format: 7
    • I'm using Joda DateTime, may be this problem?. details
    • I already try other versions os Joda and it throws the same exception.. details
    • Default is TimeZone.getTimeZone("GMT") .. details
    • Jackson loses time offset from dates when deserializing to JodaTime.. details
    • and date format is hard coded and it's ISO.. details
    • Exception would indicate that you are using incompatible Joda version (most likely an older version).. details
    • However, I recommend using JodaTime .. details
  • 4. time androidruntime offer html lang equals thing format isodatetimeformat calendar: 8
    • Instead of complaining, have you actually tried to contact authors of module, offering your help?. details
    • From nstant.html#equals%28java.lang.Object%29 [the-Javadoc-for- AbstractInstant#equals()] which is a superclass of DateTimeSerializer : Compares this object with the specified object for equality based on the millisecond instant, chronology _and time zone_**.. details
    • Also makes sure that the value must be of type long like: System.out.println(new Date(1323288181l*1000l));.. details
    • You can use ISODate("2012-04-23T20:30:27.421Z") of time.sourceforge.net/ [Joda-time] library to convert ISO date string to java data object.. details
    • Consider Joda-time-plug .. details
    • As for Joda Time, my project is on Android and I want to use as little external libs as possible.. details
    • Here's-one If you are open to using something other than Java's built-in Date/Time/Calendar classes, I would also suggest time.sourceforge.net [Joda-Time] .. details
    • They offer (among many things) a ://joda-time.sourceforge.net/api- release/org/joda/time/format/ISODateTimeFormat.html [CODETERM1] to parse these kinds of strings.. details
Summaries of the opinions about org.joda using three algorithms (Textrank, Lexrank and Luhn) adopted from extractive summarization. Each algorithm was used once for the positive opinions and once for the negative opinions.
  • thanks, i was hunting for the providers it seems the upgrade fixed a whole host of minor problems as well (double comma being one) .
  • so as you can see I am using JodaModule to serialize deserialize org joda time DateTime But my date format doesn't applies during serialization process and it produces date like this: 2013-06-15T09:50:08.541Z I took a look on JodaModule and I see that it registers following CODESNIPPET JAVA2 .
  • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?.
  • I know it, but it is easy to convert joda DateTime to regular Date and then apply standard java date formatter .
  • JodaTime DateTimeSerializer use standard toString() method .
  • Jackson JSON not serializing Joda DateTime correctly .
  • I understand that is it pretty standard to serialize dates in Json this way, however how can I get this value deserialized into a Joda DateTime?.
  • By my search it's recommended to change the Datetime format to String in the webservice, is that a good solution?.
  • Thanks for your reply by the way .
  • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?.
  • Definitely plan to use Joda Time as well .
  • If you're doing anything significant with dates and times, I'd thoroughly recommend using Joda Time instead of the classes in java util .
  • so as you can see I am using JodaModule to serialize deserialize org joda time DateTime But my date format doesn't applies during serialization process and it produces date like this: 2013-06-15T09:50:08.541Z I took a look on JodaModule and I see that it registers following CODESNIPPET JAVA2 .
  • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?.
  • According to JodaTime official guide toString() returns the standard ISO8601 string for the DateTime Also, standard DateTimeDeserializer always creates UTC datetimes .
  • I understand that is it pretty standard to serialize dates in Json this way, however how can I get this value deserialized into a Joda DateTime?.
  • Definitely plan to use Joda Time as well .
  • If you're doing anything significant with dates and times, I'd thoroughly recommend using Joda Time instead of the classes in java util .
  • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?.
  • According to JodaTime official guide toString() returns the standard ISO8601 string for the DateTime Also, standard DateTimeDeserializer always creates UTC datetimes .
  • If you're doing anything significant with dates and times, I'd thoroughly recommend using Joda Time instead of the classes in java util .
  • so as you can see I am using JodaModule to serialize deserialize org joda time DateTime But my date format doesn't applies during serialization process and it produces date like this: 2013-06-15T09:50:08.541Z I took a look on JodaModule and I see that it registers following CODESNIPPET JAVA2 .
  • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?.
  • I know it, but it is easy to convert joda DateTime to regular Date and then apply standard java date formatter .
  • According to JodaTime official guide toString() returns the standard ISO8601 string for the DateTime Also, standard DateTimeDeserializer always creates UTC datetimes .
  • I understand that is it pretty standard to serialize dates in Json this way, however how can I get this value deserialized into a Joda DateTime?.
  • By my search it's recommended to change the Datetime format to String in the webservice, is that a good solution?.
  • If you're doing anything significant with dates and times, I'd thoroughly recommend using Joda Time instead of the classes in java util .
  • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?.
  • According to JodaTime official guide toString() returns the standard ISO8601 string for the DateTime Also, standard DateTimeDeserializer always creates UTC datetimes .
  • Since I am more familiar with Jackson, here are some aspects where I think Jackson has more complete support than Gson (apologies if I miss a Gson feature): Extensive annotation support; including full inheritance, and advanced "mix in" annotations (associate annotations with a class for cases where you can not directly add them) Streaming (incremental) reading, writing, for ultra high performance (or memory limited) use cases; can mix with data binding (bind sub trees) EDIT latest versions of Gson also include streaming reader Tree model (DOM like access); can convert between various models (tree < > java object < > stream) Can use any constructors (or static factory methods), not just default constructor Field and getter setter access (earlier gson versions only used fields, this may have changed) Out of box JAX RS support Interoperability: can also use JAXB annotations, has support work arounds for common packages (joda, ibatis, cglib), JVM languages (groovy, clojure, scala) Ability to force static (declared) type handling for output Support for deserializing polymorphic types (Jackson 1 5) can serialize AND deserialize things like List correctly (with additional type information) Integrated support for binary content (base64 to from JSON Strings) .
  • However, I recommend using JodaTime .
  • Here's one If you are open to using something other than Java's built in Date Time Calendar classes, I would also suggest time sourceforge net Joda Time .
  • and date format is hard coded and it's ISO .
  • I'm using Joda DateTime, may be this problem?.
  • Both of above should actually also work (@JsonSerialize should imply that field is to be serialized; and date format should also ideally apply to Joda), so you might want to file a Jira bug at .
  • when I add that I get the compile error "incompatible types: JodaModule cannot be converted to Module" the method expects a org codehaus jackson map Module but JodaModule does not have this in its heirarchy so how could this work?.
  • However, I recommend using JodaTime .
  • Here's one If you are open to using something other than Java's built in Date Time Calendar classes, I would also suggest time sourceforge net Joda Time .
  • You can use ISODate("2012-04-23T20:30:27.421Z") of time sourceforge net Joda time library to convert ISO date string to java data object .
  • Since I am more familiar with Jackson, here are some aspects where I think Jackson has more complete support than Gson (apologies if I miss a Gson feature): Extensive annotation support; including full inheritance, and advanced "mix in" annotations (associate annotations with a class for cases where you can not directly add them) Streaming (incremental) reading, writing, for ultra high performance (or memory limited) use cases; can mix with data binding (bind sub trees) EDIT latest versions of Gson also include streaming reader Tree model (DOM like access); can convert between various models (tree < > java object < > stream) Can use any constructors (or static factory methods), not just default constructor Field and getter setter access (earlier gson versions only used fields, this may have changed) Out of box JAX RS support Interoperability: can also use JAXB annotations, has support work arounds for common packages (joda, ibatis, cglib), JVM languages (groovy, clojure, scala) Ability to force static (declared) type handling for output Support for deserializing polymorphic types (Jackson 1 5) can serialize AND deserialize things like List correctly (with additional type information) Integrated support for binary content (base64 to from JSON Strings) .
  • Here's one If you are open to using something other than Java's built in Date Time Calendar classes, I would also suggest time sourceforge net Joda Time .
  • They offer (among many things) a : joda time sourceforge net api release org joda time format ISODateTimeFormat html Z to parse these kinds of strings .
  • As for Joda Time, my project is on Android and I want to use as little external libs as possible .
  • From nstant html#equals%28java lang Object%29 the Javadoc for AbstractInstant#equals() which is a superclass of DateTimeSerializer : Compares this object with the specified object for equality based on the millisecond instant, chronology and time zone ** .
  • JSON: {"Description":"Cliente Jos","EndDate":" Date(1353319200000 0000) ","ID":0,"S tartDate":" Date(1353315600000 0000) "},{"Description":"Cliente Carlos","EndDa te":" Date(1353348000000 0000) ","ID":0,"StartDate":" Date(1353344400000 0000) "},{"Description":"Cliente Pedro","EndDate":" Date(1353513600000 0000) ","ID" :0,"StartDate":" Date(1353510000000 0000) "},{"Description":"Cliente Marco","E ndDate":" Date(1353664800000 0000) ","ID":0,"StartDate":" Date(1353661200000 0 000) "},{"Description":"Cliente Jos","EndDate":" Date(1353319200000 0000) ","I D":0,"StartDate":" Date(1353315600000 0000) "},{"Description":"Cliente Carlos" ,"EndDate":" Date(1353348000000 0000) ","ID":0,"StartDate":" Date(135334440000 0 0000) "},{"Description":"Cliente Pedro","EndDate":" Date(1353513600000 0000) ","ID":0,"StartDate":" Date(1353510000000 0000) "},{"Description":"Cliente Ma rco","EndDate":" Date(1353664800000 0000) ","ID":0,"StartDate":" Date(13536612 00000 0000) "} Full log 01 03 17:39:24 700: E dalvikvm(18494): Unable to resolve Lorg joda time base AbstractInstant; annotation class 155701 03 17:39:28 505: W dalvikvm(18494): threadid=11: thread exiting with uncaught exception (group=0x40c4d1f8)01 03 17:39:28 650: E AndroidRuntime(18494): FATAL EXCEPTION: AsyncTask 101 03 17:39:28 650: E AndroidRuntime(18494): java lang RuntimeException: An error occured while executing doInBackground()01 03 17:39:28 650: E AndroidRuntime(18494): at android os AsyncTask$3 done(AsyncTask java:278)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent FutureTask$Sync innerSetExcep tion(FutureTask java:273)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent FutureTask setException(FutureTask java:124)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent FutureTask$Sync innerRun(FutureTask java:307)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent FutureTask run(FutureTask java:137)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent ThreadPoolExecutor runWorker( ThreadPoolExecutor java:1076)01 03 17:39:28 650: E AndroidRuntime(18494): at j ava util concurrent ThreadPoolExecutor$Worker run(ThreadPoolExecutor java:569) 01 03 17:39:28 650: E AndroidRuntime(18494): at java lang Thread run(Thread java:856)01 03 17:39:28 650: E AndroidRuntime(18494): Caused by: java lang NoClassDefFoundError: org joda convert ToString01 03 17:39:28 650: E AndroidRuntime(18494): at java lang reflect Method getDeclaredAnnotations(Native Method)01 03 17:39:28 650: E AndroidRuntime(18494): at java lang reflect Method getDeclaredAnnotations(Method java:267)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind intro spect AnnotatedClass addMixUnders(AnnotatedClass java:999)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind introspect Annotate dClass addMemberMethods(AnnotatedClass java:610)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind introspect Annotate dClass resolveMemberMethods(AnnotatedClass java:421)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind introspect Annotate dClass memberMethods(AnnotatedClass java:243)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind introspect POJOProp ertiesCollector addMethods(POJOPropertiesCollector java:442)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind intro spect POJOPropertiesCollector collect(POJOPropertiesCollector java:232)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind intro spect BasicClassIntrospector collectProperties(BasicClassIntrospector java:142 )01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databin d introspect BasicClassIntrospector forDeserialization(BasicClassIntrospector .
  • Here's one If you are open to using something other than Java's built in Date Time Calendar classes, I would also suggest time sourceforge net Joda Time .
  • They offer (among many things) a : joda time sourceforge net api release org joda time format ISODateTimeFormat html Z to parse these kinds of strings .
  • As for Joda Time, my project is on Android and I want to use as little external libs as possible .
  • From nstant html#equals%28java lang Object%29 the Javadoc for AbstractInstant#equals() which is a superclass of DateTimeSerializer : Compares this object with the specified object for equality based on the millisecond instant, chronology and time zone ** .
  • Since I am more familiar with Jackson, here are some aspects where I think Jackson has more complete support than Gson (apologies if I miss a Gson feature): Extensive annotation support; including full inheritance, and advanced "mix in" annotations (associate annotations with a class for cases where you can not directly add them) Streaming (incremental) reading, writing, for ultra high performance (or memory limited) use cases; can mix with data binding (bind sub trees) EDIT latest versions of Gson also include streaming reader Tree model (DOM like access); can convert between various models (tree < > java object < > stream) Can use any constructors (or static factory methods), not just default constructor Field and getter setter access (earlier gson versions only used fields, this may have changed) Out of box JAX RS support Interoperability: can also use JAXB annotations, has support work arounds for common packages (joda, ibatis, cglib), JVM languages (groovy, clojure, scala) Ability to force static (declared) type handling for output Support for deserializing polymorphic types (Jackson 1 5) can serialize AND deserialize things like List correctly (with additional type information) Integrated support for binary content (base64 to from JSON Strings) .
  • Here's one If you are open to using something other than Java's built in Date Time Calendar classes, I would also suggest time sourceforge net Joda Time .
  • They offer (among many things) a : joda time sourceforge net api release org joda time format ISODateTimeFormat html Z to parse these kinds of strings .
  • As for Joda Time, my project is on Android and I want to use as little external libs as possible .
  • From nstant html#equals%28java lang Object%29 the Javadoc for AbstractInstant#equals() which is a superclass of DateTimeSerializer : Compares this object with the specified object for equality based on the millisecond instant, chronology and time zone ** .
  • when I add that I get the compile error "incompatible types: JodaModule cannot be converted to Module" the method expects a org codehaus jackson map Module but JodaModule does not have this in its heirarchy so how could this work?.
  • JSON: {"Description":"Cliente Jos","EndDate":" Date(1353319200000 0000) ","ID":0,"S tartDate":" Date(1353315600000 0000) "},{"Description":"Cliente Carlos","EndDa te":" Date(1353348000000 0000) ","ID":0,"StartDate":" Date(1353344400000 0000) "},{"Description":"Cliente Pedro","EndDate":" Date(1353513600000 0000) ","ID" :0,"StartDate":" Date(1353510000000 0000) "},{"Description":"Cliente Marco","E ndDate":" Date(1353664800000 0000) ","ID":0,"StartDate":" Date(1353661200000 0 000) "},{"Description":"Cliente Jos","EndDate":" Date(1353319200000 0000) ","I D":0,"StartDate":" Date(1353315600000 0000) "},{"Description":"Cliente Carlos" ,"EndDate":" Date(1353348000000 0000) ","ID":0,"StartDate":" Date(135334440000 0 0000) "},{"Description":"Cliente Pedro","EndDate":" Date(1353513600000 0000) ","ID":0,"StartDate":" Date(1353510000000 0000) "},{"Description":"Cliente Ma rco","EndDate":" Date(1353664800000 0000) ","ID":0,"StartDate":" Date(13536612 00000 0000) "} Full log 01 03 17:39:24 700: E dalvikvm(18494): Unable to resolve Lorg joda time base AbstractInstant; annotation class 155701 03 17:39:28 505: W dalvikvm(18494): threadid=11: thread exiting with uncaught exception (group=0x40c4d1f8)01 03 17:39:28 650: E AndroidRuntime(18494): FATAL EXCEPTION: AsyncTask 101 03 17:39:28 650: E AndroidRuntime(18494): java lang RuntimeException: An error occured while executing doInBackground()01 03 17:39:28 650: E AndroidRuntime(18494): at android os AsyncTask$3 done(AsyncTask java:278)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent FutureTask$Sync innerSetExcep tion(FutureTask java:273)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent FutureTask setException(FutureTask java:124)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent FutureTask$Sync innerRun(FutureTask java:307)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent FutureTask run(FutureTask java:137)01 03 17:39:28 650: E AndroidRuntime(18494): at java util concurrent ThreadPoolExecutor runWorker( ThreadPoolExecutor java:1076)01 03 17:39:28 650: E AndroidRuntime(18494): at j ava util concurrent ThreadPoolExecutor$Worker run(ThreadPoolExecutor java:569) 01 03 17:39:28 650: E AndroidRuntime(18494): at java lang Thread run(Thread java:856)01 03 17:39:28 650: E AndroidRuntime(18494): Caused by: java lang NoClassDefFoundError: org joda convert ToString01 03 17:39:28 650: E AndroidRuntime(18494): at java lang reflect Method getDeclaredAnnotations(Native Method)01 03 17:39:28 650: E AndroidRuntime(18494): at java lang reflect Method getDeclaredAnnotations(Method java:267)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind intro spect AnnotatedClass addMixUnders(AnnotatedClass java:999)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind introspect Annotate dClass addMemberMethods(AnnotatedClass java:610)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind introspect Annotate dClass resolveMemberMethods(AnnotatedClass java:421)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind introspect Annotate dClass memberMethods(AnnotatedClass java:243)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind introspect POJOProp ertiesCollector addMethods(POJOPropertiesCollector java:442)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind intro spect POJOPropertiesCollector collect(POJOPropertiesCollector java:232)01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databind intro spect BasicClassIntrospector collectProperties(BasicClassIntrospector java:142 )01 03 17:39:28 650: E AndroidRuntime(18494): at com fasterxml jackson databin d introspect BasicClassIntrospector forDeserialization(BasicClassIntrospector .
  • Here's one If you are open to using something other than Java's built in Date Time Calendar classes, I would also suggest time sourceforge net Joda Time .
  • They offer (among many things) a : joda time sourceforge net api release org joda time format ISODateTimeFormat html Z to parse these kinds of strings .
  • From nstant html#equals%28java lang Object%29 the Javadoc for AbstractInstant#equals() which is a superclass of DateTimeSerializer : Compares this object with the specified object for equality based on the millisecond instant, chronology and time zone ** .
Summaries of the opinions about org.joda using Opinosis, an abstractive summarizer of opinions..
  • dates and i 'd thoroughly recommend using joda time instead of the classes in java util .
  • jodatime official guide tostring (/( )/) returns the standard iso8601 string for the datetime also .
  • my case , i was happy with unix time , so :/: codesnippet java2 .
  • java 's dateformat and joda time 's datetimeformatter are not the same .
  • if you 're doing anything significant with dates and times .
  • datetime also , standard datetimedeserializer always creates utc datetimes .
  • their solution is pretty similar to mine :/: )/) .
  • unix time .
  • if you are using something other than java 's built in date time and date time calendar classes .
  • my project is on android and i want to use as little external libs as possible .
  • value must be of type long like :/: system out println (/( new date (/( )/) .
  • java 's built in date time , i would also suggest time sourceforge net joda time .
  • api release org joda time format isodatetimeformat html z to parse these kinds of strings .
Summaries of the opinions about org.joda using contrastive viewpoints. Each entry contains a pair of positive and negative sentences that are most likely discussing about similar API features.
    • How do I get Jackson to serialize my Joda DateTime object according to a simple pattern (like "dd MM yyyy"?.
    • This seemed to do the trick for me: with jackson json processer How to serialize Joda DateTime with Jackson JSON processer?.
    • Jackson JSON not serializing Joda DateTime correctly .
    • I'm using Joda DateTime, may be this problem?.
    • I know it, but it is easy to convert joda DateTime to regular Date and then apply standard java date formatter .
    • I'm using Joda DateTime, may be this problem?.
    • Definitely plan to use Joda Time as well .
    • Consider Joda time plug .
    • Definitely plan to use Joda Time as well .
    • Consider Joda time plug .
Summaries of opinions about based on specific API aspects, such as, performance, usability, etc. The 'Overview' page provides an overview of the aspects detected in the opinions. The 'Trend' page shows the distribution of polarity over time for each aspect. The 'Positive Opinions' page groups positive opinions by the detected aspects. The 'Contrastive By Aspect' page shows paris of contrastive opinions under each aspect (where found).
Features:
  • I suppose a patch will be welcome ;).
  • JSON: [{"Description":"Cliente Jos","EndDate":"/Date(1353319200000+0000)/","ID":0,"S tartDate":"/Date(1353315600000+0000)/"},{"Description":"Cliente Carlos","EndDa te":"/Date(1353348000000+0000)/","ID":0,"StartDate":"/Date(1353344400000+0000) /"},{"Description":"Cliente Pedro","EndDate":"/Date(1353513600000+0000)/","ID" :0,"StartDate":"/Date(1353510000000+0000)/"},{"Description":"Cliente Marco","E ndDate":"/Date(1353664800000+0000)/","ID":0,"StartDate":"/Date(1353661200000+0 000)/"},{"Description":"Cliente Jos","EndDate":"/Date(1353319200000+0000)/","I D":0,"StartDate":"/Date(1353315600000+0000)/"},{"Description":"Cliente Carlos" ,"EndDate":"/Date(1353348000000+0000)/","ID":0,"StartDate":"/Date(135334440000 0+0000)/"},{"Description":"Cliente Pedro","EndDate":"/Date(1353513600000+0000) /","ID":0,"StartDate":"/Date(1353510000000+0000)/"},{"Description":"Cliente Ma rco","EndDate":"/Date(1353664800000+0000)/","ID":0,"StartDate":"/Date(13536612 00000+0000)/"}] Full log 01-03 17:39:24.700: E/dalvikvm(18494): Unable to resolve Lorg/joda/time/base/AbstractInstant; annotation class 155701-03 17:39:28.505: W/dalvikvm(18494): threadid=11: thread exiting with uncaught exception (group=0x40c4d1f8)01-03 17:39:28.650: E/AndroidRuntime(18494): FATAL EXCEPTION: AsyncTask 101-03 17:39:28.650: E/AndroidRuntime(18494): java.lang.RuntimeException: An error occured while executing doInBackground()01-03 17:39:28.650: E/AndroidRuntime(18494): at android.os.AsyncTask$3.done(AsyncTask.java:278)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask$Sync.innerSetExcep tion(FutureTask.java:273)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask.run(FutureTask.java:137)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1076)01-03 17:39:28.650: E/AndroidRuntime(18494): at j ava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.Thread.run(Thread.java:856)01-03 17:39:28.650: E/AndroidRuntime(18494): Caused by: java.lang.NoClassDefFoundError: org/joda/convert/ToString01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.reflect.Method.getDeclaredAnnotations(Native Method)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:267)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.AnnotatedClass._addMixUnders(AnnotatedClass.java:999)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass._addMemberMethods(AnnotatedClass.java:610)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass.resolveMemberMethods(AnnotatedClass.java:421)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass.memberMethods(AnnotatedClass.java:243)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.POJOProp ertiesCollector._addMethods(POJOPropertiesCollector.java:442)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.POJOPropertiesCollector.collect(POJOPropertiesCollector.java:232)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.BasicClassIntrospector.collectProperties(BasicClassIntrospector.java:142 )01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databin d.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.
Onlysentiment:
  • It looks like timezone information is lost.
  • I'm using Joda DateTime, may be this problem?
Performance:
  • N/A
  • Since I am more familiar with Jackson, here are some aspects where I think Jackson has more complete support than Gson (apologies if I miss a Gson feature): Extensive annotation support; including full inheritance, and advanced "mix-in" annotations (associate annotations with a class for cases where you can not directly add them) Streaming (incremental) reading, writing, for ultra-high performance (or memory-limited) use cases; can mix with data binding (bind sub-trees) -- EDIT latest versions of Gson also include streaming reader Tree model (DOM-like access); can convert between various models (tree <-> java object <-> stream) Can use any constructors (or static factory methods), not just default constructor Field and getter/setter access (earlier gson versions only used fields, this may have changed) Out-of-box JAX-RS support Interoperability: can also use JAXB annotations, has support/work-arounds for common packages (joda, ibatis, cglib), JVM languages (groovy, clojure, scala) Ability to force static (declared) type handling for output Support for deserializing polymorphic types (Jackson 1.5) -- can serialize AND deserialize things like List correctly (with additional type information) Integrated support for binary content (base64 to/from JSON Strings) .
Bug:
  • N/A
  • when I add that I get the compile error "incompatible types: JodaModule cannot be converted to Module" - the method expects a org.codehaus.jackson.map.Module but JodaModule does not have this in its heirarchy so how could this work?
Usability:
  • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?
  • Instead of complaining, have you actually tried to contact authors of module, offering your help?
  • Onlysentiment: 6
    1. general: 6
  • Features: 5
    1. general: 5
      • Could you expand on this please?. details
      • I suppose a patch will be welcome ;).. details
      • Thanks for your reply by the way.. details
      • According to URL_http://joda-time.sourceforge.net/userguide.html [JodaTime- official-guide] CODETERM2 returns - _the standard ISO8601 string for the DateTime._ Also, standard CODETERM3 always creates UTC datetimes.. details
      • According to URL_http://joda-time.sourceforge.net/userguide.html [JodaTime- official-guide] CODETERM2 returns - _the standard ISO8601 string for the DateTime._ Also, standard CODETERM3 always creates UTC datetimes.. details
  • Usability: 23
    1. upgrade: 1
      • thanks, i was hunting for the providers... it seems the upgrade fixed a whole host of minor problems as well (double comma being one).. details
    2. jackson: 3
      • This has become very easy with Jackson 2.0 and the Joda module.. details
      • I am trying to start working with jackson for serializing objects having Joda CODETERM1 members.. details
      • How do I get Jackson to serialize my Joda DateTime object according to a simple pattern (like "dd-MM-yyyy"?. details
    3. string: 1
      • By my search it's recommended to change the Datetime format to String in the webservice, is that a good solution?. details
    4. jodatime: 1
      • JodaTime CODETERM1 use standard toString() method.. details
    5. general: 9
      • from my point of view, you should be able to configure JodaModule itself and then simply register it as usual, yeh, maybe it's a good thing to work on.. details
      • Not missing, but on its own project -- URL_https://github.com/FasterXML/jackson - jaxrs-json-provider -- same applies for some other things like Joda types.. details
      • In my case, I was happy with unix time, so: CODESNIPPET_JAVA2 .. details
      • In my case, I was happy with unix time, so: CODESNIPPET_JAVA2 .. details
      • If you're doing anything _significant_ with dates and times, I'd thoroughly recommend using URL_http://joda-time.sf.net [Joda-Time] instead of the classes in java.util.. details
      • If you're doing anything _significant_ with dates and times, I'd thoroughly recommend using URL_http://joda-time.sf.net [Joda-Time] instead of the classes in java.util.. details
      • This is working perfectly fine in my unit test.. details
      • Their solution is pretty similar to mine :).. details
      • Their solution is pretty similar to mine :).. details
    6. json: 2
      • I understand that is it pretty standard to serialize dates in Json this way, however how can I get this value deserialized into a Joda DateTime?. details
      • Jackson JSON not serializing Joda DateTime correctly.. details
    7. time: 4
      • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?. details
      • Java's DateFormat and Joda Time's DateTimeFormatter are not the same, so it is pretty normal; doesn't the joda time plugin provide a way to specify a DateTimeFormatter?. details
      • Definitely plan to use Joda Time as well.. details
      • Definitely plan to use Joda Time as well.. details
    8. date: 1
      • I know it, but it is easy to convert joda DateTime to regular Date and then apply standard java date formatter.. details
    9. serialization: 1
      • so as you can see I am using JodaModule to serialize/deserialize org.joda.time.DateTime But my date format doesn't applies during serialization process and it produces date like this: CODETERM1 I took a look on JodaModule and I see that it registers following CODESNIPPET_JAVA2 .. details
  • Onlysentiment: 5
    1. general: 5
      • I'm using Joda DateTime, may be this problem?. details
      • I am getting the following exception (I fail to understand what I was doing wrong): CODESNIPPET_JAVA3 .. details
      • Consider URL_http://joda-time.sourceforge.net/ [Joda-time-plug] .. details
      • However, I recommend using URL_http://joda-time.sourceforge.net/ [JodaTime] .. details
      • However, I recommend using URL_http://joda-time.sourceforge.net/ [JodaTime] .. details
  • Performance: 1
    1. general: 1
      • Since I am more familiar with Jackson, here are some aspects where I think Jackson has more complete support than Gson (apologies if I miss a Gson feature): Extensive annotation support; including full inheritance, and advanced "mix-in" annotations (associate annotations with a class for cases where you can not directly add them) Streaming (incremental) reading, writing, for ultra-high performance (or memory-limited) use cases; can mix with data binding (bind sub-trees) -- EDIT latest versions of Gson also include streaming reader Tree model (DOM-like access); can convert between various models (tree <-> java object <-> stream) Can use any constructors (or static factory methods), not just default constructor Field and getter/setter access (earlier gson versions only used fields, this may have changed) Out-of-box JAX-RS support Interoperability: can also use JAXB annotations, has support/work-arounds for common packages (joda, ibatis, cglib), JVM languages (groovy, clojure, scala) Ability to force static (declared) type handling for output Support for deserializing polymorphic types (Jackson 1.5) -- can serialize AND deserialize things like List correctly (with additional type information) Integrated support for binary content (base64 to/from JSON Strings) .. details
  • Features: 3
    1. general: 3
      • JSON: [{"Description":"Cliente Jos","EndDate":"/Date(1353319200000+0000)/","ID":0,"S tartDate":"/Date(1353315600000+0000)/"},{"Description":"Cliente Carlos","EndDa te":"/Date(1353348000000+0000)/","ID":0,"StartDate":"/Date(1353344400000+0000) /"},{"Description":"Cliente Pedro","EndDate":"/Date(1353513600000+0000)/","ID" :0,"StartDate":"/Date(1353510000000+0000)/"},{"Description":"Cliente Marco","E ndDate":"/Date(1353664800000+0000)/","ID":0,"StartDate":"/Date(1353661200000+0 000)/"},{"Description":"Cliente Jos","EndDate":"/Date(1353319200000+0000)/","I D":0,"StartDate":"/Date(1353315600000+0000)/"},{"Description":"Cliente Carlos" ,"EndDate":"/Date(1353348000000+0000)/","ID":0,"StartDate":"/Date(135334440000 0+0000)/"},{"Description":"Cliente Pedro","EndDate":"/Date(1353513600000+0000) /","ID":0,"StartDate":"/Date(1353510000000+0000)/"},{"Description":"Cliente Ma rco","EndDate":"/Date(1353664800000+0000)/","ID":0,"StartDate":"/Date(13536612 00000+0000)/"}] Full log 01-03 17:39:24.700: E/dalvikvm(18494): Unable to resolve Lorg/joda/time/base/AbstractInstant; annotation class 155701-03 17:39:28.505: W/dalvikvm(18494): threadid=11: thread exiting with uncaught exception (group=0x40c4d1f8)01-03 17:39:28.650: E/AndroidRuntime(18494): FATAL EXCEPTION: AsyncTask 101-03 17:39:28.650: E/AndroidRuntime(18494): java.lang.RuntimeException: An error occured while executing doInBackground()01-03 17:39:28.650: E/AndroidRuntime(18494): at android.os.AsyncTask$3.done(AsyncTask.java:278)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask$Sync.innerSetExcep tion(FutureTask.java:273)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.FutureTask.run(FutureTask.java:137)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1076)01-03 17:39:28.650: E/AndroidRuntime(18494): at j ava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.Thread.run(Thread.java:856)01-03 17:39:28.650: E/AndroidRuntime(18494): Caused by: java.lang.NoClassDefFoundError: org/joda/convert/ToString01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.reflect.Method.getDeclaredAnnotations(Native Method)01-03 17:39:28.650: E/AndroidRuntime(18494): at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:267)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.AnnotatedClass._addMixUnders(AnnotatedClass.java:999)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass._addMemberMethods(AnnotatedClass.java:610)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass.resolveMemberMethods(AnnotatedClass.java:421)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.Annotate dClass.memberMethods(AnnotatedClass.java:243)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.introspect.POJOProp ertiesCollector._addMethods(POJOPropertiesCollector.java:442)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.POJOPropertiesCollector.collect(POJOPropertiesCollector.java:232)01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databind.intro spect.BasicClassIntrospector.collectProperties(BasicClassIntrospector.java:142 )01-03 17:39:28.650: E/AndroidRuntime(18494): at com.fasterxml.jackson.databin d.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.. details
      • This seemed to do the trick for me: URL_http://stackoverflow.com/questions/3269459/how-to-serialize-joda-datetime- with-jackson-json-processer [How-to-serialize-Joda-DateTime-with-Jackson-JSON- processer?]. details
      • Do you have the optional URL_http://joda-convert.sourceforge.net/ [joda- convert] jar on your classpath?. details
  • Bug: 4
    1. general: 4
      • when I add that I get the compile error "incompatible types: JodaModule cannot be converted to Module" - the method expects a org.codehaus.jackson.map.Module but JodaModule does not have this in its heirarchy so how could this work?. details
      • I'm using Joda DateTime, may be this problem?. details
      • I already try other versions os Joda and it throws the same exception.. details
      • I am getting the following exception (I fail to understand what I was doing wrong): CODESNIPPET_JAVA3 .. details
  • Usability: 27
    1. exception: 1
      • Exception would indicate that you are using incompatible Joda version (most likely an older version).. details
    2. jackson: 1
      • Jackson loses time offset from dates when deserializing to JodaTime.. details
    3. string: 1
      • You can use CODETERM1 of URL_http://joda- time.sourceforge.net/ [Joda-time] library to convert ISO date string to java data object.. details
    4. object: 2
      • From URL_http://joda-time.sourceforge.net/apidocs/org/joda/time/base/AbstractI nstant.html#equals%28java.lang.Object%29 [the-Javadoc-for- AbstractInstant#equals()] which is a superclass of CODETERM1 : Compares this object with the specified object for equality based on the millisecond instant, chronology _and time zone_**.. details
      • From URL_http://joda-time.sourceforge.net/apidocs/org/joda/time/base/AbstractI nstant.html#equals%28java.lang.Object%29 [the-Javadoc-for- AbstractInstant#equals()] which is a superclass of CODETERM1 : Compares this object with the specified object for equality based on the millisecond instant, chronology _and time zone_**.. details
    5. general: 16
      • when I add that I get the compile error "incompatible types: JodaModule cannot be converted to Module" - the method expects a org.codehaus.jackson.map.Module but JodaModule does not have this in its heirarchy so how could this work?. details
      • You can still register custom serializer and deserializer, and those will have precedence over default implementation.. details
      • Instead of complaining, have you actually tried to contact authors of module, offering your help?. details
      • I'm using Joda DateTime, may be this problem?. details
      • Default is CODETERM8 .. details
      • Default is CODETERM8 .. details
      • I realize this question is from a while back, but for future reference, objectMapper.getSerializationConfig().setDateFormat(df) is now deprecated.. details
      • Also makes sure that the value must be of type long like: System.out.println(new Date(1323288181l*1000l));.. details
      • Also makes sure that the value must be of type long like: System.out.println(new Date(1323288181l*1000l));.. details
      • However, I recommend using URL_http://joda-time.sourceforge.net/ [JodaTime] .. details
      • However, I recommend using URL_http://joda-time.sourceforge.net/ [JodaTime] .. details
      • They offer (among many things) a URL_http ://joda-time.sourceforge.net/api- release/org/joda/time/format/ISODateTimeFormat.html [CODETERM1] to parse these kinds of strings.. details
      • URL_http://www.java2s.com/Code/Java/Data-Type/ISO8601dateparsingutility.htm [Here's-one] If you are open to using something other than Java's built-in Date/Time/Calendar classes, I would also suggest URL_http://joda- time.sourceforge.net [Joda-Time] .. details
      • They offer (among many things) a URL_http ://joda-time.sourceforge.net/api- release/org/joda/time/format/ISODateTimeFormat.html [CODETERM1] to parse these kinds of strings.. details
      • URL_http://www.java2s.com/Code/Java/Data-Type/ISO8601dateparsingutility.htm [Here's-one] If you are open to using something other than Java's built-in Date/Time/Calendar classes, I would also suggest URL_http://joda- time.sourceforge.net [Joda-Time] .. details
      • For best compatibility 1.6.1 has some further improvements to reduce warnings during initialization (used to complain about missing javax.xml and Joda classes, not any more) .. details
    6. json: 1
      • Since I am more familiar with Jackson, here are some aspects where I think Jackson has more complete support than Gson (apologies if I miss a Gson feature): Extensive annotation support; including full inheritance, and advanced "mix-in" annotations (associate annotations with a class for cases where you can not directly add them) Streaming (incremental) reading, writing, for ultra-high performance (or memory-limited) use cases; can mix with data binding (bind sub-trees) -- EDIT latest versions of Gson also include streaming reader Tree model (DOM-like access); can convert between various models (tree <-> java object <-> stream) Can use any constructors (or static factory methods), not just default constructor Field and getter/setter access (earlier gson versions only used fields, this may have changed) Out-of-box JAX-RS support Interoperability: can also use JAXB annotations, has support/work-arounds for common packages (joda, ibatis, cglib), JVM languages (groovy, clojure, scala) Ability to force static (declared) type handling for output Support for deserializing polymorphic types (Jackson 1.5) -- can serialize AND deserialize things like List correctly (with additional type information) Integrated support for binary content (base64 to/from JSON Strings) .. details
    7. date: 2
      • and date format is hard coded and it's ISO.. details
      • Both of above should actually also work (@JsonSerialize should imply that field is to be serialized; and date format should also ideally apply to Joda), so you might want to file a Jira bug at URL_http://jira.codehaus.org/browse/JACKSON .. details
    8. serialization: 1
      • So there's a whole separate module devoted to handling Joda objects, but it does the serialization in the most simplistic manner possible, failing to retain crucial information... That's a shame.. details
    9. android: 2
      • As for Joda Time, my project is on Android and I want to use as little external libs as possible.. details
      • As for Joda Time, my project is on Android and I want to use as little external libs as possible.. details