GAE-JAVA-SDK-1.5.5から1.6.0および1.6.1に更新した後、アプリが正しく機能しなくなります。RPCサービスでエラーが発生し始めました。
Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract void com.skip.school.client.service.AdminService.addStudent(com.skip.school.shared.Student)' threw an unexpected exception: java.lang.NoClassDefFoundError: Could not initialize class com.skip.school.server.PmfSingleton
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.skip.school.server.PmfSingleton
ログ全体はここpastebinにあります。
ユーザーが最初のrpc呼び出しを開始したときに初期化する必要があるシングルトンがあります。私が使用するシングルトンは正しいはずです。スタッカーオーバーフローやWeb上のあらゆる場所に多くの例があります。
public final class PmfSingleton {
private final static PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory("transactions-optional");
private PmfSingleton() { }
public static PersistenceManagerFactory get() {
return pmfInstance;
}
}
私はすべてのサーバー実装でそのクラスをそのように呼んでいます。
PersistenceManager pm = PmfSingleton.get().getPersistenceManager();
これはsdk1.5.5以下では機能しますが、sdk 1.6.0以降では機能しません。sdk1.6.0以降を使用する場合、何を変更すればよいか、誰かが間違っていることを知っていますか?