This is my first time using jodatime and i've got a stackoverflow error that i have no idea how to fix. I'm creating an android app that needs to be able to display the days between when a sqlite record was created and today. As far as i can tell everything is working correctly except jodatime. I got this error when building the project
[2010-08-10 02:08:50 - Grow Journal Beta] processing org/joda/time/DateTimeUtils.class... [2010-08-10 02:08:50 - Grow Journal Beta] processing org/joda/time/DateTimeZone$1.class... [2010-08-10 02:08:50 - Grow Journal Beta] warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.) [2010-08-10 02:08:50 - Grow Journal Beta] processing org/joda/time/DateTimeZone$Stub.class...
This is the logcat:
08-13 22:12:11.823: ERROR/AndroidRuntime(6537): Uncaught handler: thread main exiting due to uncaught exception 08-13 22:12:11.893: ERROR/AndroidRuntime(6537): java.lang.StackOverflowError 08-13 22:12:11.893: ERROR/AndroidRuntime(6537): at java.util.Hashtable.get(Hashtable.java:274) 08-13 22:12:11.893: ERROR/AndroidRuntime(6537): at java.util.Properties.getProperty(Properties.java:177) 08-13 22:12:11.893: ERROR/AndroidRuntime(6537): at java.lang.System.getProperty(System.java:440) 08-13 22:12:11.893: ERROR/AndroidRuntime(6537): at java.lang.System.getProperty(System.java:412) 08-13 22:12:11.893: ERROR/AndroidRuntime(6537): at org.joda.time.DateTimeZone.getDefault(DateTimeZone.java:132) 08-13 22:12:11.893: ERROR/AndroidRuntime(6537): at org.joda.time.DateTimeZone.forID(DateTimeZone.java:190) 08-13 22:12:11.893: ERROR/AndroidRuntime(6537): at org.joda.time.DateTimeZone.getDefault(DateTimeZone.java:132)
After looking around a bit i figure i just need to recompile the jodatime binary my self. I've been using eclipse, I created a new project, and imported the jodatime source. When I attempt to compile I get this in the console:
Usage: java org.joda.time.tz.ZoneInfoCompiler <options> <source files>
where possible options include: -src Specify where to read source files -dst Specify where to write generated files
Not really sure where to go from here. Any help would be greatly appreciated. Thanks for your time.
StackTrace from overflow:
Thread [ main] (Suspended (exception StackOverflowError)) DateTimeZone.getDefault() line: 147 ISOChronology.getInstance() line: 86 DateTimeUtils.getChronology(Chronology) line: 231 DateConverter(AbstractConverter).getChronology(Object, Chronology) line: 82 DateTime(BaseDateTime).(Object, Chronology) line: 170 DateTime.(Object) line: 168 PlantsCursorAdapter.newView(Context, Cursor, ViewGroup) line: 71 PlantsCursorAdapter(CursorAdapter).getView(int, View, ViewGroup) line: 182 ListView(AbsListView).obtainView(int) line: 1274 ListView.measureHeightOfChildren(int, int, int, int, int) line: 1147 ListView.onMeasure(int, int) line: 1060 ListView(View).measure(int, int) line: 7966 TableLayout(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 3077 TableLayout(LinearLayout).measureChildBeforeLayout(View, int, int, int, int, int) line: 888 TableLayout.measureChildBeforeLayout(View, int, int, int, int, int) line: 453 TableLayout(LinearLayout).measureVertical(int, int) line: 350 TableLayout.measureVertical(int, int) line: 465 TableLayout.onMeasure(int, int) line: 428 TableLayout(View).measure(int, int) line: 7966 FrameLayout(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 3077 FrameLayout.onMeasure(int, int) line: 245 FrameLayout(View).measure(int, int) line: 7966 LinearLayout.measureVertical(int, int) line: 464 LinearLayout.onMeasure(int, int) line: 278 LinearLayout(View).measure(int, int) line: 7966 PhoneWindow$DecorView(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 3077 PhoneWindow$DecorView(FrameLayout).onMeasure(int, int) line: 245 PhoneWindow$DecorView(View).measure(int, int) line: 7966 ViewRoot.performTraversals() line: 767 ViewRoot.handleMessage(Message) line: 1650 ViewRoot(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 4595 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 521 ZygoteInit$MethodAndArgsCaller.run() line: 860 ZygoteInit.main(String[]) line: 618 NativeStart.main(String[]) line: not available [native method]
DateTimeZone.class source is Here