質問

GAE/Jで次のJDOエンティティを作成しようとしています(使用しています) ギリアド).

package test.domains;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import net.sf.gilead.pojo.java5.LightEntity;

import com.google.appengine.api.datastore.Blob;
import com.google.appengine.api.datastore.Key;


@PersistenceCapable(identityType=IdentityType.APPLICATION, detachable="true")
public class Banner extends LightEntity implements Serializable
{
 private static final long serialVersionUID = 1058354709157710766L;

 // Fields
 @PrimaryKey
 @Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
 private Key id;

 @Persistent
 private String name;

 @Persistent
 private String sizeX;

 @Persistent
 private String sizeY;

 @Persistent
 private String description;

 @Persistent
 private Blob img;

 // Getters and Setters
}

そして、次の問題が発生します。

[エラー] 40 行目:タイプcom.google.appengine.api.datastore.blobでソースコードを使用できません。必要なモジュールを継承するのを忘れましたか?

この問題の原因は何でしょうか?コードは Blob オブジェクトなしでも正常にコンパイルされます。ちなみにフォローしてみました これ 例。

役に立ちましたか?

解決

私の知る限り、サポートを提供していないのはギリアドです。 com.google.appengine.api.datastore.Blob.

adapter4appengine-1.0M2.jar 「com.google.appengine.api.datastore.Key」のエミュレータ クラスが含まれています

他のヒント

そのファイルはクライアント側に保存していますか?GWT が Blob .class ファイルを見つけられないと考えられる唯一の理由はこれです。

試してみます。

ジェイミー・E

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top