这是我第一次使用jodatime和我有一个stackoverflow错误,我不知道如何解决。我正在创建一个android应用程序,它需要能够显示sqlite记录创建和今天之间的时间。至于我可以告诉一切正常工作,除了乔达泰。重新编译jodatime?
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)
环视了一下后,我想我只需要重新编译的二进制jodatime我自己:建设项目
[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...
时,这是logcat的我得到这个错误。 我一直在使用eclipse,我创建了一个新项目,并导入了jodatime源代码。当我尝试编译我得到这个在控制台:
Usage: java org.joda.time.tz.ZoneInfoCompiler <options> <source files>
在可能的选项包括: -src指定要读取源文件 -dst指定在哪里写入生成的文件
不是真的知道在哪里从这里出发。任何帮助将不胜感激。谢谢你的时间。从溢流
堆栈跟踪:
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源是Here
您确定stacktrace不再更长? StackOverflow通常是一个递归错误 – TheLQ 2010-08-14 03:49:28
我已添加跟踪,我有 – Brian 2010-08-14 04:34:44
@ Lord。Quackstar - 递归在'DateTimeZone.getDefault'和'DateTimeZone.forID'之间。 – 2010-08-14 04:46:25