1

我将 AE 升级到 1.7.2,现在第一次尝试访问页面时出现以下错误:

我该怎么做才能让 1.7.2 正常工作???

  Could not initialize class com.google.appengine.tools.appstats.RecordingData

Caused by:

java.lang.NoClassDefFoundError: Could not initialize class   
com.google.appengine.tools.appstats.RecordingData
at com.google.appengine.tools.appstats.Recorder.makeAsyncCall(Recorder.java:300)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:115)
at com.google.appengine.tools.appstats.AppstatsFilter.call(AppstatsFilter.java:231)

注意:无法初始化的“RecordingData”类位于appengine-api-labs.jar中,只是现在它无法正常工作。我想虽然无法初始化类错误意味着它被找到但无法正常工作。我怀疑NoClassDefFoundError具有误导性。

4

1 回答 1

1

I had the same issue recently, I started working on an existing AppEngine project which had been using the 1.7.1 API. I had a new eclipse setup using the newest plugin (1.7.2.1 at the time of writing).

In my case there was an older copy of the labs jar (appengine-api-labs.jar) in the build path. Deleting this and replacing it with the version from the AppEngine SDK in current use resolved the issue.

You'll find the labs jar in your eclipse plugins directory under: appengine-java-sdk-[X.X.X.X]\lib\impl).

Once you have replaced the jar do a clean build and you should be laughing.

于 2012-10-17T22:04:06.523 回答