I was able to get this to work by moving my pojo to the client folder and adding detachable = "false" to the PersistenceCapable annontation. @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "false")
This is a simple app and provides what I need. On Aug 4, 1:01 pm, Albert Attard <albertatt...@gmail.com> wrote: > Hi: > You cannot access server classes from your client. You can access client > classes from your server. > > What you have to do is start using transfer objects. Here's an > article:http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObje... > > Let me know if you need more help. > Albert Attard > > Joan Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html> > - "I, Joan Crawford, I believe in the dollar. Everything I earn, I > spend." > > 2009/8/4 thepopeofantelope <markp...@gmail.com> > > > > > > > I created the following class and want to use it between the client > > and server. I get this GWT compile error on the Service class: > > > Compiling module com.test.GWTTEst > > Refreshing module from source > > Validating newly compiled units > > Removing units with errors > > [ERROR] Errors in 'file:/C:/GWTTEst/src/com/test/client/ > > RecipeServiceAsync.java' > > [ERROR] Line 7: No source code is available for type > > com.test.server.Recipe; did you forget to inherit a required module? > > [ERROR] Errors in 'file:/C:/GWTTEst/src/com/test/client/ > > RecipeService.java' > > [ERROR] Line 9: No source code is available for type > > com.test.server.Recipe; did you forget to inherit a required module? > > > =========== > > > package com.test.client; > > > import com.google.gwt.user.client.rpc.RemoteService; > > import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; > > import com.test.server.Recipe; > > > @RemoteServiceRelativePath("recipe") > > public interface RecipeService extends RemoteService { > > public void addStock(Recipe symbol) throws NotLoggedInException; > > public void removeStock(String symbol) throws NotLoggedInException; > > public String[] getStocks() throws NotLoggedInException; > > } > > > ============== > > > package com.test.server; > > > import java.io.Serializable; > > import java.util.Date; > > > 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 com.google.appengine.api.users.User; > > import com.google.gwt.user.client.rpc.IsSerializable; > > > @PersistenceCapable(identityType = IdentityType.APPLICATION) > > public class Recipe implements IsSerializable { > > > �...@primarykey > > �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > > private Long id; > > �...@persistent > > private User user; > > �...@persistent > > private String name; > > �...@persistent > > private String category; > > �...@persistent > > private String cuisine; > > �...@persistent > > private String occasion; > > �...@persistent > > private String ingredients; > > �...@persistent > > private String directions; > > �...@persistent > > private Date created; > > > public Recipe() { > > > } > > > public Recipe(User user, String symbol) { > > this(); > > this.user = user; > > } > > > public User getUser() { > > return user; > > } > > > public void setUser(User user) { > > this.user = user; > > } > > > public String getName() { > > return name; > > } > > > public void setName(String name) { > > this.name = name; > > } > > > public String getCuisine() { > > return cuisine; > > } > > > public void setCuisine(String cuisine) { > > this.cuisine = cuisine; > > } > > > public String getIngredients() { > > return ingredients; > > } > > > public void setIngredients(String ingredients) { > > this.ingredients = ingredients; > > } > > > public String getDirections() { > > return directions; > > } > > > public void setDirections(String directions) { > > this.directions = directions; > > } > > > public String getOccasion() { > > return occasion; > > } > > > public void setOccasion(String occasion) { > > this.occasion = occasion; > > } > > > public String getCategory() { > > return category; > > } > > > public void setCategory(String category) { > > this.category = category; > > } > > > public Date getCreated() { > > return created; > > } > > > } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---