views:

774

answers:

2

I'm trying to make following JDO entity in GAE/J (I'm using Gilead).

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
}

And encountering following problem:

[ERROR] Line 40: No source code is available for type com.google.appengine.api.datastore.Blob; did you forget to inherit a required module?

What can cause this problem? The code compiles fine without Blob object. By the way I tried to follow this example.

+2  A: 

As far as i can tell, it is Gilead that does not have support for com.google.appengine.api.datastore.Blob.

The adapter4appengine-1.0M2.jar on contains an emulator class for 'com.google.appengine.api.datastore.Key'

Fedearne
A: 

Are you keeping that file in the client side? That's the only reason I can think GWT is not finding the Blob .class file.

Give it a shot.

Jaime E