[appengine-java] Re: Cache-Controle Expiration on static files

2009-09-06 Thread Yossi

I also have the same issue - the header is not impacted by the
expiration value.

Yossi

On Sep 4, 3:50 pm, Patou patou.de.saint.ste...@gmail.com wrote:
 hello,

 I test the new sdk, and I see that we now add a expiration attribut in
 the include tag in appengine-web.xml to set the expiration cache time.
 But it's not seems to work .
 My appengine-web.xml :
     static-files
         include path=/ressource/css/*.css expiration=10d/
 include
         include path=/ressource/css/img/*.* expiration=10d/
 include
         exclude path=**/*.gwt.rpc/
     /static-files

 When I deploy on internet, the header of all css and img file is :
 Cache-Control:  max-age=0

 Has anybody try to do works it ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: After upgrade to Java SDK 1.2.5 Key property saved but retrieved as null

2009-09-06 Thread bgood

OK, but why would this behavior be happening inconsistently across his
(and probably others) application?


On Sep 5, 7:06 pm, Max Ross maxr+appeng...@google.com wrote:
 Key is not in the default fetch group because it is an appengine-specific
 class.  The JDO spec doesn't know anything about app engine so there's no
 way that Key could be included in the list of types that are automatically
 included in the default fetch group.

 Max



 On Fri, Sep 4, 2009 at 1:32 PM, Yegor yegor.jba...@gmail.com wrote:

  Just so you know, I think I have solved the problem by setting
  defaultFetchGroup=true on the Key property:

  @Persistent(defaultFetchGroup=true)
  private Key text;

  Might have something to do with the recently closed issue #58 Queries
  don't respect fetch groups:
 http://code.google.com/p/datanucleus-appengine/issues/detail?id=58

  What's puzzling is that I have unowned relationships all over the
  application, however only one class - CMSPage - fails to retrieve the
  Key properties.

  I am not sure why Key is not automatically in the default fetch group.
  Key is not an entity class. It should be ok to fetch it non-lazily by
  default.

  Yegor

  On Sep 4, 1:21 pm, Yegor yegor.jba...@gmail.com wrote:
   Hi,

   I am experiencing a problem after upgrading to Java SDK 1.2.5. In a
   simple CMS application a page is stored as a CMSPage entity, which
   points to its text saved as a DetachedText entity using a Key property
   (i.e. an unowned relationship) as follows:

   @PersistenceCapable(identityType = IdentityType.APPLICATION)
   public class CMSPage {

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

     @Persistent
     private Key text;

     public Key getId() {
       return id;
     }

     public void setId(Key id) {
       this.id = id;
     }

     public Key getText() {
       return text;
     }

     public void setText(Key text) {
       this.text = text;
     }

   }

   The Key property text points to:

   @PersistenceCapable(identityType = IdentityType.APPLICATION)
   public class DetachedText {

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

     @Persistent
     private Text content;

     public DetachedText(Text content) {
       this.content = content;
     }

     public Key getId() {
       return id;
     }

     public Text getContent() {
       return content;
     }

   }

   NOTE: I have removed other properties and code that I found unrelated
   to the problem

   After saving the page I can see the text field populated in the
   development console. The value shows as DetachedText(5). I also
   verified that the DetachedText entity exists and its ID equals 5.

   However, after I retrieve CMSPage from the datastore using a
   javax.jdo.Query the text field in the retrieved object is null (both
   the Eclipse debugger and the application throwing NPE confirm it).

   What am I doing wrong?

   Any pointers will be appreciated.

   Thanks,

   Yegor
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Weird ArrayStoreException after new deployment to production

2009-09-06 Thread 1ka

Similar problem with SimpleDateFormat here -

http://groups.google.com/group/google-appengine-java/browse_thread/thread/a7ea6dd1e097d496?pli=1



On Aug 20, 10:46 am, James H james.hollier...@gmail.com wrote:
 Ah yes, I was looking for that very switch to disable Sessions and it
 did help isolate the problem towards a field within my class being
 pushed into the Session.  The field is java.text.SimpleDateFormat
 which does implement Serializable so don't know why the system would
 be able to serialize it, then NOT be able to deserialize it.  I think
 for now I will tag it as Transient and re-init it before use.

 On Aug 19, 10:17 am, Toby Reyelts to...@google.com wrote:

  Unfortunately, I don't understand exactly why the problem is still occurring
  for you. The stacktrace you shared points directly to failure of
  deserialization of a session attribute:

         
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
  *       at com.google.apphosting.runtime.**jetty.SessionManager.**
  deserialize(SessionManager.java:358)
  *       at
  com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManag­er.java:280)
         

  Are you absolutely sure you're not putting something into the HttpSession?
  The two steps I would take are to:

  1) disable http sessions in appengine-web.xml then
  2) delete all http sessions saved in the datastore

  On Wed, Aug 19, 2009 at 10:45 AM, James H james.hollier...@gmail.comwrote:

   Ok, I reviewed my use of Session attribute (I only use 1 called
   userSession) and cleaned up a few things such as the serial UID, etc.
   During production testing, I also Deleted the _ah_Session rows and I
   notice the problem still occurred on the home page as before.  So, I
   modified the app to NOT perform any session.put() calls.  And this
   same exception is still occurring.

   The behavior is as follows.  Launch a new browser and the home page
   comes up, try to Refresh the home page and the exception gets thrown.
   Is it possible the deploy is NOT refreshing ALL my code in
   production?  Is there a way to force the deploy to do a truncate/load
   rather than an incremental?  I hate to think there are some stale
   classes out there being loaded somehow...

   So, as before I do NOT see any relation at this point between this
   error and my coding.  From the trace, the error is NOT occurring
   within the scope of my code.  Any other ideas?

   On Aug 18, 6:42 pm, Toby Reyelts to...@google.com wrote:
You probably have something stored in your session that's not
   deserializing.
If you clear your sessions, this problem should go away. In the next
release, this problem should be fixed under most circumstances.

On Tue, Aug 18, 2009 at 6:05 PM, James H james.hollier...@gmail.com
   wrote:

 My app has been working well, but after this weekends changes my
 deployment does NOT come online clean...though I can't related the
 error to anything that has changed.  The stack trace is attempting to
 load the JSP, so it doesn't appear the problem is related to running
 the JSP.  Hence, execution has NOT reached my code!  Any ideas?

 Naturally, all works fine during local testing.  So, this is only
 failing in production.

 EXCEPTION
 javax.servlet.ServletException:java.lang.ArrayStoreException:
 [Ljava.lang.String;
        at
   com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
 (AppVersionHandlerMap.java:239)
        at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:313)
        at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 506)
        at
   org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
 (HttpConnection.java:830)
        at
 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
 (RpcRequestParser.java:76)
        at
   org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at

   com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceReques­­t
 (JettyServletEngineAdapter.java:139)
        at com.google.apphosting.runtime.JavaRuntime.handleRequest
 (JavaRuntime.java:235)
        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
 $6.handleBlockingRequest(RuntimePb.java:4823)
        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
 $6.handleBlockingRequest(RuntimePb.java:4821)
        at
   com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
 (BlockingApplicationHandler.java:24)
        at
   com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
 359)
        at com.google.net.rpc.impl.Server$2.run(Server.java:820)
        at com.google.tracing.LocalTraceSpanRunnable.run
 

[appengine-java] Query + Filter for Key as Encoded String

2009-09-06 Thread Kriván Bálint

Hi!

I've the following Entity:


@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Document implements Serializable {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName = datanucleus, key = gae.encoded-pk, value
= true)
private String encodedKey;

@Persistent
@Extension(vendorName = datanucleus, key = gae.pk-name, value =
true)
private String id;

[...]

}


I would like to create a query filtered by id, but it doesn't work.
How can I make this work? Thanks for your help!

My try was the following:


Query query = pm.newQuery(Document.class);
query.setFilter(id == param);
query.declareParameters(String param);

try {
ListDocument results = (ListDocument) query.execute(id);
if (results.iterator().hasNext()) {
for (Document d : results) {
// do something with the Document.
// throw new RuntimeException(d.getTitle());
}
} else {
// ... no results ...
}
} catch (Exception ex) {
ex.printStackTrace();
} finally {
query.closeAll();
}


I know I've could get the object by Key, but there's a hierarchy in
Documents, so I can't create the key by hand.

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: is not persistable

2009-09-06 Thread Bob L.

Oh mine! It occurred again. JDO looks quite fragile.
Is there any wrong with following code?

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Category {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private String name;

public Category() {
}

public Category(String name) {
this.name = name;
}

public Long getId() {
return id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

serverlet:
...
@SuppressWarnings(unchecked)
public ListCategory getCategories() {
String query = select from  + Category.class.getName();
PersistenceManager pm = PMF.get().getPersistenceManager();
try {
return (ListCategory) pm.newQuery(query).execute();
} catch (Exception ex) {
}

return null;
}

private void initializeCategories() {
ListCategory categories = this.getCategories();
if (categories == null || categories.isEmpty()) {
categories = new ArrayListCategory();
Category category = new Category(Boys);
categories.add(category);
category = new Category(Girls);
categories.add(category);
PersistenceManager pm = 
PMF.get().getPersistenceManager();
try {
pm.makePersistentAll(categories);
} finally {
pm.close();
}
}
}
...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: is not persistable

2009-09-06 Thread datanucleus

 Oh mine! It occurred again. JDO looks quite fragile.

Nothing fragile about the persistence process. You simply have to
define your classes as persistent and enhance them, and have the
enhanced ones in the CLASSPATH. Not hard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Upgrade issue with Google SDK 1.2.5

2009-09-06 Thread James H

I used the Eclipse Soft Updates menu on Sep 4th to apply SDK 1.2.5
after noticing Red errors in the local runtime log telling me to do
so.  Actually, first I noticed my production app was failing to
retrieve data so I figured I needed to first upgrade as instructed by
the log message and then see if there were still any data issues.

I had been running SDK 1.2.2 since July without problems locally or in
production.  The install of the upgrade ran without errors.  Here is
the Eclipse install history:

Jul 12, 2009 1:24:28 PM file:/C:/homeGoogle/programs/eclipse/ site-
install success

Jul 12, 2009 1:49:03 PM
Date / Time Target Action Status
Jul 12, 2009 1:48:12 PM
com.google.gdt.eclipse.suite.e33.feature_1.0.1.v200905131156 feature-
install success
Jul 12, 2009 1:48:26 PM
com.google.gdt.eclipse.suite.e33.feature_1.0.1.v200905131156 feature-
enable success
Jul 12, 2009 1:48:26 PM
com.google.gwt.eclipse.sdkbundle.e33.feature_1.6.4.v200904062254
feature-install success
Jul 12, 2009 1:49:03 PM
com.google.gwt.eclipse.sdkbundle.e33.feature_1.6.4.v200904062254
feature-enable success

Jul 12, 2009 1:50:20 PM
Date / Time Target Action Status
Jul 12, 2009 1:50:06 PM
com.google.appengine.eclipse.sdkbundle.e33.feature_1.2.1.v200905131156
feature-install success
Jul 12, 2009 1:50:20 PM
com.google.appengine.eclipse.sdkbundle.e33.feature_1.2.1.v200905131156
feature-enable success

Jul 24, 2009 10:01:27 PM
Date / Time Target Action Status
Jul 24, 2009 10:01:01 PM
com.google.appengine.eclipse.sdkbundle.e33.feature_1.2.2.v200907131018
feature-install success
Jul 24, 2009 10:01:27 PM
com.google.appengine.eclipse.sdkbundle.e33.feature_1.2.2.v200907131018
feature-enable success
Jul 24, 2009 10:01:27 PM
com.google.appengine.eclipse.sdkbundle.e33.feature_1.2.1.v200905131156
feature-disable success

Sep 4, 2009 6:27:25 AM
Date / Time Target Action Status
Sep 4, 2009 6:26:51 AM
com.google.gdt.eclipse.suite.e33.feature_1.1.0.v200907291650 feature-
install success
Sep 4, 2009 6:27:12 AM
com.google.gdt.eclipse.suite.e33.feature_1.1.0.v200907291650 feature-
enable success
Sep 4, 2009 6:27:12 AM
com.google.gdt.eclipse.suite.e33.feature_1.0.1.v200905131156 feature-
disable success
Sep 4, 2009 6:27:12 AM
com.google.appengine.eclipse.sdkbundle.e33.feature_1.2.5.v200909021033
feature-install success
Sep 4, 2009 6:27:25 AM
com.google.appengine.eclipse.sdkbundle.e33.feature_1.2.5.v200909021033
feature-enable success
Sep 4, 2009 6:27:25 AM
com.google.appengine.eclipse.sdkbundle.e33.feature_1.2.2.v200907131018
feature-disable success

Sep 5, 2009 11:13:51 AM
Date / Time Target Action Status
Sep 5, 2009 11:12:38 AM
com.google.gwt.eclipse.sdkbundle.e33.feature_1.7.0.v200907131018
feature-install success
Sep 5, 2009 11:13:48 AM
com.google.gwt.eclipse.sdkbundle.e33.feature_1.7.0.v200907131018
feature-enable success
Sep 5, 2009 11:13:48 AM
com.google.gwt.eclipse.sdkbundle.e33.feature_1.6.4.v200904062254
feature-disable success

At this point my Eclipse behaves as though the Google SDK is NOT
installed.  For example, the Google Icons are NOT displayed in the
Toolbar, etc.  From the above install history, it appears the
following are enabled and the older version have been disabled:

com.google.gwt.eclipse.sdkbundle.e33.feature_1.7.0.v200907131018
com.google.appengine.eclipse.sdkbundle.e33.feature_1.2.5.v200909021033
com.google.gdt.eclipse.suite.e33.feature_1.1.0.v200907291650

How do I get this SDK working again?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] confuse on Whitelist

2009-09-06 Thread asianCoolz

I saw white list http://code.google.com/appengine/docs/java/jrewhitelist.html
, java.lang.Thread is in it. Aren't Thread not supported?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] support for task queues in development environment?

2009-09-06 Thread Vince Bonfanti

Task queues are working properly when I deploy my app to Google's
servers, but never get executed in my development environment (Eclipse
Galileo). There are no errors, no logs, no indication of what's going
wrong. Queue.add() returns successfully, but my tasks never get
executed. I'm running the exact same code in development and in
production. Any clues, or any way for me to figure out what's going
wrong? Are task queues supported in the development environment?
Thanks.

Vince

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] 500 Internal Server Error when uploading to GAE

2009-09-06 Thread barak

Hi,

I'm using Eclipse plugin and sdk-1.2.2 to upload my app to GAE, its
size is 109MB. From time to time I'm facing upload problems with the
following error: java.io.IOException: Error posting to URL:
http://appengine.google.com/api/appversion/addblob?path=__.500
Internal Server Error

The stack trace is:

Unable to upload:
java.io.IOException: Error posting to URL:
http://appengine.google.com/api/appversion/addblob?path=__static_...
500 Internal Server Error

Server Error (500)
A server error has occurred.

at com.google.appengine.tools.admin.ServerConnection.send
(ServerConnection.java:143)
at com.google.appengine.tools.admin.ServerConnection.post
(ServerConnection.java:95)
at com.google.appengine.tools.admin.AppVersionUpload.send
(AppVersionUpload.java:420)
at com.google.appengine.tools.admin.AppVersionUpload.uploadFile
(AppVersionUpload.java:323)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
(AppVersionUpload.java:105)
at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:53)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
(AppEngineBridgeImpl.java:271)
at
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run
(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Is there something I should configured somewhere?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: After upgrade to Java SDK 1.2.5 Key property saved but retrieved as null

2009-09-06 Thread Yegor

I think it makes sense now. I did see more exceptions related to
incorrect transaction handling (e.g. updating multiple entities from
different entity groups) that didn't happen prior to 1.2.5. It seems
that it was the upgrade to datanucleus 1.1.5 that triggered these
exceptions. I am not suggesting that 1.1.5 introduced bugs (but
neither denying it). I think it was my code that relied on a previous
bug that got fixed in 1.1.5. Actually I do not require transactions at
this point at all and in the future expect them to be an exception
rather than the norm, so I disabled them and the application is now
running as expected.

Thanks,

Yegor

On Sep 6, 11:08 am, Max Ross maxr+appeng...@google.com wrote:
 It shouldn't be inconsistent.  The field will only be unavailable outside
 the transaction if it was not accessed inside the transaction, so that might
 explain why it only happens in certain places.



 On Sat, Sep 5, 2009 at 11:55 PM, bgood ben.mcgee.g...@gmail.com wrote:

  OK, but why would this behavior be happening inconsistently across his
  (and probably others) application?

  On Sep 5, 7:06 pm, Max Ross 
  maxr+appeng...@google.commaxr%2bappeng...@google.com
  wrote:
   Key is not in the default fetch group because it is an appengine-specific
   class.  The JDO spec doesn't know anything about app engine so there's no
   way that Key could be included in the list of types that are
  automatically
   included in the default fetch group.

   Max

   On Fri, Sep 4, 2009 at 1:32 PM, Yegor yegor.jba...@gmail.com wrote:

Just so you know, I think I have solved the problem by setting
defaultFetchGroup=true on the Key property:

@Persistent(defaultFetchGroup=true)
private Key text;

Might have something to do with the recently closed issue #58 Queries
don't respect fetch groups:
   http://code.google.com/p/datanucleus-appengine/issues/detail?id=58

What's puzzling is that I have unowned relationships all over the
application, however only one class - CMSPage - fails to retrieve the
Key properties.

I am not sure why Key is not automatically in the default fetch group.
Key is not an entity class. It should be ok to fetch it non-lazily by
default.

Yegor

On Sep 4, 1:21 pm, Yegor yegor.jba...@gmail.com wrote:
 Hi,

 I am experiencing a problem after upgrading to Java SDK 1.2.5. In a
 simple CMS application a page is stored as a CMSPage entity, which
 points to its text saved as a DetachedText entity using a Key
  property
 (i.e. an unowned relationship) as follows:

 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class CMSPage {

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

   @Persistent
   private Key text;

   public Key getId() {
     return id;
   }

   public void setId(Key id) {
     this.id = id;
   }

   public Key getText() {
     return text;
   }

   public void setText(Key text) {
     this.text = text;
   }

 }

 The Key property text points to:

 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class DetachedText {

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

   @Persistent
   private Text content;

   public DetachedText(Text content) {
     this.content = content;
   }

   public Key getId() {
     return id;
   }

   public Text getContent() {
     return content;
   }

 }

 NOTE: I have removed other properties and code that I found unrelated
 to the problem

 After saving the page I can see the text field populated in the
 development console. The value shows as DetachedText(5). I also
 verified that the DetachedText entity exists and its ID equals 5.

 However, after I retrieve CMSPage from the datastore using a
 javax.jdo.Query the text field in the retrieved object is null
  (both
 the Eclipse debugger and the application throwing NPE confirm it).

 What am I doing wrong?

 Any pointers will be appreciated.

 Thanks,

 Yegor
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: support for task queues in development environment?

2009-09-06 Thread Max Ross
Hi Vince,

In order to get the task queue into the 1.2.5 release we had to take a
shortcut with the local development environment.  Tasks execute
automatically in production but not locally.  However, in the local
environment you can kick off your tasks manually by visiting the task queue
admin console page, accessible via a link off of
http://localhost:8080/_ah/admin

We thought we had this properly documented but it appears we do not.  I've
filed a bug and we'll get this taken care of quickly.

Sorry for the trouble.

Thanks,
Max

On Sun, Sep 6, 2009 at 9:33 AM, Vince Bonfanti vbonfa...@gmail.com wrote:


 Task queues are working properly when I deploy my app to Google's
 servers, but never get executed in my development environment (Eclipse
 Galileo). There are no errors, no logs, no indication of what's going
 wrong. Queue.add() returns successfully, but my tasks never get
 executed. I'm running the exact same code in development and in
 production. Any clues, or any way for me to figure out what's going
 wrong? Are task queues supported in the development environment?
 Thanks.

 Vince

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Master/Detail relations and redundant data handling

2009-09-06 Thread James H

Based on the Max Ross I/O video on Persistence, I understand the best
practice regarding handling of Master/Detail relations is to place
redundant Master data in the Detail row.  Same would apply to any type
of relation (1-to-1, 1-to-many).

So for example if I have an entity Person relating as 1-to-many with
another entity Address, then instead of just a simple FK like
Address.personId I am supposed to also include redundant fields like
Address.lastName, Address.firstName and so on depending on how I
display/process on Address data in the app.  Therefore, when reading
Address data I would NOT necessarily have to perform another read to
the Master just to get LastName/FirstName, etc.

The problem is if I have 10 such relations with Person and JDO does
NOT allow me to declare an object we'll call PersonFK containing these
fields (personId, lastName, firstName, etc), then we quickly have a
code maintenance nightmare for our app since any significant app can
have 100's of FKs to manage and all these fields will NOT be coded in
an Object Oriented sense.

So in my example, if I have to add another redundant field for Person
FKs such as SSN or change behavior of any existing one of these
redundant fields for Person, then I have at least 10 touchpoints in
the app to deal with, where good OO design mandates I should only have
1 touchpoint.

Is this true or have I overlooked a feature in GAE JDO implementation
that is NOT mentioned in the GAE docs?

The closest concept indicated in the GAE docs are the Embedded Classes
which only apply to 1 Entity...so they are quite useless from an OO
perspective across many objects.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Query a collection of entities with their IDs

2009-09-06 Thread Zhi Le Zou
Hi,
I have a class Foo defined as below:

  public class Foo{

  @PrimaryKey
  @Persistent(valueStrategy=
IdGeneratorStrategy.IDENTITY)
  private String fooID;

   ...

  }

Now, I have a list of IDs of the Foo entities, is it possible to retrieve
the corresponding collection of Foo entities in a single query? I found the
in the documentation, it says logic or and IN are not supported in the
java version app engine sdk, although it is supported in the python version.

Thanks in advance :-)


-- 
Best Regards
Robin (邹志乐)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---