0

我正在尝试实现一个基于 Android 应用程序的应用程序,该应用程序运行得非常愉快

它从 blob 商店下载一个 blob

该应用程序有大约 20 个非持久类,它们与 servlet .java 代码一起出现在 .src(未编译的 .java 文件)文件夹中。这 20 个类用于构造从下载的 blob 填充的数据类。我希望所有用户都能够访问这些数据(至少在第一种情况下)

但是,当调试 blob 时下载正常,但在类初始化期间我得到以下堆栈跟踪。

几个星期以来,我一直在寻找答案,希望能得到一些帮助。

我确信这是我想念的简单的东西。

我正在使用 Eclipse、App Engine SDK 1.7.7 和 JDK1,7.0_17

很明显与(PropertyPermission 和 SecurityManager.checkPropertyAccess

与大多数事情一样,如果您提出一个难题 - 您不一定会理解答案 - 所以请保持简单!

堆栈跟踪:-

INFO: Local Datastore initialized: 
    Type: High Replication
    Storage: C:\Users\Steve\workspace2\Blobstoredemo\war\WEB-INF\appengine-generated\local_db.bin
Jun 09, 2013 2:58:53 PM com.google.appengine.api.datastore.dev.LocalDatastoreService load
INFO: Time to load datastore: 522 ms
Jun 09, 2013 2:59:23 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$PersistDatastore persist
INFO: Time to persist datastore: 190 ms
Jun 09, 2013 3:00:07 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error for /view
java.lang.StackOverflowError
    at java.util.PropertyPermission.<init>(PropertyPermission.java:167)
    at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302)
    at java.lang.System.getProperty(System.java:706)
    at com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:63)
    at blobstoredemo.Weekfile.<init>(Weekfile.java:13)
    at blobstoredemo.t_round.<init>(t_round.java:26)
    at blobstoredemo.Weekfile.<init>(Weekfile.java:9)
    at blobstoredemo.t_round.<init>(t_round.java:26)
    at blobstoredemo.Weekfile.<init>(Weekfile.java:9)
    at blobstoredemo.t_round.<init>(t_round.java:26)
    at blobstoredemo.Weekfile.<init>(Weekfile.java:9)
    at blobstoredemo.t_round.<init>(t_round.java:26)

还有很多相同的......

4

1 回答 1

1

The stack trace is pretty clear. You call class Weeekfile from class t_round at line 26. The class Weekfile calls t_round back at its line 9. This means that you implemented infinite recursion: there is not exit condition or it does not work.

Check your code again at mentioned lines. I am sure you will find the problem quickly. If not, come here again but please send your code. It is hard to find bug in your code without seeing it. :) Good luck.

于 2013-06-09T17:08:11.837 回答