[appengine-java] Re: what's the bigger/complex application Java/Python running on GAE

2009-09-18 Thread Clay Lenhart

A Google guy responded to a similar question:

"We have no limits :)
Are they talking about 1TB, 10TB, 100s TB?

We would want to work with them to ensure their data moves on smoothly
and that their app has enough storage allocated, but there are no
practical limits."

Based on the documentation, you'll want to pay attention to how you
set your "ancestors" when you have a large amount of data.
--~--~-~--~~~---~--~~
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: what's the bigger/complex application Java/Python running on GAE

2009-09-18 Thread Patrizio Munzi




But at the moment is there any application which is consuming a lot of
storage???

Do you know guys how to see how much data storage I'm going to use??
Is that related to the local datastore usage??

Thanks

Clay Lenhart wrote:

  A Google guy responded to a similar question:

"We have no limits :)
Are they talking about 1TB, 10TB, 100s TB?

We would want to work with them to ensure their data moves on smoothly
and that their app has enough storage allocated, but there are no
practical limits."

Based on the documentation, you'll want to pay attention to how you
set your "ancestors" when you have a large amount of data.


  


-- 

Patrizio Munzi
Product Specialist
Viale Bruno Buozzi, 19 - 00197 Roma (Italy)
tel: +39 06 4543 3540
fax: +39 06 4543 3587
mobile: +39 393 7195 164
mail: patrizio.mu...@eris4.com
web: http://www.eris4.com
skype: eris4_munzi



--~--~-~--~~~---~--~~
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: Unicode problems

2009-09-18 Thread George Moschovitis

> OK, I will try to set the HTTP header, but I don't think this is the
> problem.

I have set the header but the problem is *not* fixed!
Any other ideas?

This is a show-stopper bug :( :(

-g.
--~--~-~--~~~---~--~~
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] Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-18 Thread Morgoth

Hi,

I'm trying to set the primary key in order to be able to read from DB
the exact object faster. Looking at that tutorial
http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html
this should be possible. Nevertheless all my attempts using
Key k = KeyFactory.createKey(Unit.class.getSimpleName(), 1);
or guessing with any other variations I always receive:

javax.jdo.JDOFatalUserException: Attempt was made to manually set the
id component of a Key primary key.  If you want to control the value
of the primary key, set the name component instead.

What I'm doing wrong? Is it possible at all to set my own part of the
primary key? What "set the name component" means? AFAIK the key
contains appID, object kind and ID, there is no name as part of the
key.

Sorry if my question is stupid, but I'm just starting with GWT.
--~--~-~--~~~---~--~~
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: Unicode problems

2009-09-18 Thread George Moschovitis

> But if the file with local characters is inside "src\..." dir, there
> is everythign fine. This is sufficient for me.

saddly, this is not sufficient for me :(
I am still looking for a way to fix the encoding problem in files that
reside in war/

quite interestingly in my HTML files I have some friend-connect code
for signin etc. While the FC code renders correct Greek chars on the
development server,
again it renders garbage ('??' strings) on AppEngine.

-g.
--~--~-~--~~~---~--~~
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: Accessing Memcache in more than one servlet

2009-09-18 Thread patrizio.munzi

Hi,
again about sharing a cache among different servlets.

I wanted to know if a modification to an object retrieved from the
cache in a servlet we'll be immediately visible from the other
servlets rertieving the same object or will not as long as it won't be
put into the cache again.

In another way is in the cache the same transactional problem as in
the datastore or not??

Thanks


On Sep 14, 7:38 pm, Larry Cable  wrote:
> just save an instance in the ServletContext attributes ... you should
> avoid storing it in a Servlet instance field, in fact you should avoid
> instance fields in Servlets entirely since they are typically supposed
> to be reentrant ...
>
> On Sep 14, 8:03 am, Don Schwarz  wrote:
>
> > No, that sounds like a fine approach.  You could even create multipleCache
> > instances and they would still be backed by the same underlying store
> > (assuming they have the same namespace).
>
> > On Mon, Sep 14, 2009 at 9:18 AM, Jeff  wrote:
>
> > > For above Memcache question, I simply implemented a javax.cache.Cache
> > > singleton pattern. I now have access to thecachefrom more than one
> > > servlet. Is anyone aware that this implementation might problematic in
> > > the Google App Engine distributed(cloud) runtime?
>
> > > Thanks,
>
> > > Jeff
>
> > > On Sep 11, 2:45 pm, Jeff  wrote:
> > > > Hello,
>
> > > > I plan on using Google App Engine'sMemcacheservice. I've read the
> > > > online documentation and looked at a demo example. With both,
> > > theMemcache"Cacheinstance" is an instance variable within a servlet. If
> > > > I use more than one servlet, but want to access the samecache, how is
> > > > that done? Am I to use GCacheFactory.NAMESPACE property when I
> > > > createCache(property)? Will this namespace allow me to access the same
> > > >cacheacross servlets?
>
> > > > Thanks,
>
> > > > Jeff- Hide quoted text -
>
> > - Show quoted text -
>
>
--~--~-~--~~~---~--~~
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] Sort items in the Data Viewer

2009-09-18 Thread mar_novice

Is there a way to sort items in the Data Viewer?
--~--~-~--~~~---~--~~
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: Sort items in the Data Viewer

2009-09-18 Thread mar_novice

OOOpppsss.. Sorry.. I forgot that there is an option to query.. my
mistake. PLEASE IGNORE THIS POST.

On Sep 18, 4:22 pm, mar_novice  wrote:
> Is there a way to sort items in the Data Viewer?
--~--~-~--~~~---~--~~
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: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-18 Thread leszek

Could you provide more details, how your entity class looks like and
how it is persisted ?
--~--~-~--~~~---~--~~
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: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-18 Thread Morgoth

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

...

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

...

public Unit( long id ) {
  this.id = KeyFactory.createKey(Unit.class.getSimpleName(), id);
}


I also tried to use Long as ID and to set it directly, but with the
same result.
--~--~-~--~~~---~--~~
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: date between jdo query

2009-09-18 Thread leszek

Could you provide more details how your failing query looks like ?
--~--~-~--~~~---~--~~
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: Error 400 while trying to upload my application for the first time

2009-09-18 Thread 6real

Hello guys,

I feel sorry to up this post but I really need help. Can anyone just
guide me to a solution ? I try to change the version number to 0 but
with exactly the same result.

Thanks a lot.

On 16 sep, 23:13, 6real  wrote:
> Hi,
>
> my application runs fine locally. I'd like to upload it for the fist
> time and I get the following error :
>
> java.io.IOException: Error posting to 
> URL:http://appengine.google.com/api/appversion/create?app_id=ID&version=1&;
> 400 Bad Request
> Error when loading application configuration:
> while scanning a simple key
>   in "", line 23, column 1:
>     \
>     ^
> could not found expected ':'
>   in "", line 25, column 9:
>       script: unused
>             ^
>
> II try to upload from the Eclipse plugin.
>
> Can someone help me in debugging this ?
>
> Thx !
>
> 
> Note: I posted this message inthe general group and Nick from Google
> advices me to post in the java group with some files.
> Here they are :
>
> web.xml
> 
> 
>      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>     "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> 
>   
>     greetServlet
>     com.me.myapp.is.server.GreetingServiceImpl class>
>   
>   
>     greetServlet
>     /myapp/greet
>   
>
>   
>     stationListUpdater
>     com.me.myapp.is.servlet.StationListUpdater class>
>   
>   
>     stationListUpdater
>     /update
>   
>
>   
>     StationAvailabilitiesUpdater
>      class>com.me.myapp.is.servlet.StationAvailabilitiesUpdater class>
>   
>   
>     StationAvailabilitiesUpdater
>     /
>
> 
>   
>
>   
>   
>     myapp.html
>   
>
>   
>         
>             /*
>         
>         
>             admin
>         
>     
>
> 
>
> -
>
> logging.properties :
> # A default java.util.logging configuration.
> # (All App Engine logging is through java.util.logging by default).
> #
> # To use this configuration, copy it into your application's WEB-INF
> # folder and add the following to your appengine-web.xml:
> #
> # 
> #   
> # 
> #
>
> # Set the default logging level for all loggers to INFO
> .level = INFO
>
> # Set the default logging level for ORM, specifically, to WARNING
> DataNucleus.JDO.level=WARNING
> DataNucleus.Persistence.level=WARNING
> DataNucleus.Cache.level=WARNING
> DataNucleus.MetaData.level=WARNING
> DataNucleus.General.level=WARNING
> DataNucleus.Utility.level=WARNING
> DataNucleus.Transaction.level=WARNING
> DataNucleus.Datastore.level=WARNING
> DataNucleus.ClassLoading.level=WARNING
> DataNucleus.Plugin.level=WARNING
> DataNucleus.ValueGeneration.level=WARNING
> DataNucleus.Enhancer.level=WARNING
> DataNucleus.SchemaTool.level=WARNING
>
> ---
> cron.xml:
>
> 
> 
>   
>     /update_availabilities
>     Rempli les dispo des groupes - Group Reseau 1 description>
>     every 3 minutes
>   
>
> 
> 
> 
> 
> 
> 
> 
>
> ---
> 
> http://appengine.google.com/ns/1.0";>
>         myappid
>         1
>
>         
>         
>                 
>         
>
> 
>
> 
>
> I  use eclipse and the plugin Google App Engine Java SDK 1.2.5
> 1.2.5.v200909021031
> com.google.appengine.eclipse.sdkbundle.e35.feature.feature.group
>
> If i try to update with appcfg I get the additionnal log lines :
>
>  at com.google.appengine.tools.admin.ServerConnection.send
> (ServerConnection.java:143)
>         at com.google.appengine.tools.admin.ServerConnection.post
> (ServerConnection.java:81)
>         at com.google.appengine.tools.admin.AppVersionUpload.send
> (AppVersionUpload.java:429)
>         at
> com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
> (AppVersionUpload.java:243)
>         at com.google.appengine.tools.admin.AppVersionUpload.doUpload
> (AppVersionUpload.java:98)
>         at com.google.appengine.tools.admin.AppAdminImpl.update
> (AppAdminImpl.java:53)
>         ... 4 more
>
> -
> and finally I use as applicationid the id given in the field
> "Application Identifier" under application settings section.
>
> I do not expect a patch but just a workaround :-) or an
> explanation :-)
>
> Thks to everybody for your help.
--~--~-~--~~~---~--~~
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] My nude webcam clip

2009-09-18 Thread Anna SCat

Hi to group, Im first time here.
I just cast short home-made video:
http://pcharry.com/user1729981/viewprofile.php
Thank you. Kiss.
--~--~-~--~~~---~--~~
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: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-18 Thread leszek

There is nothing wrong with that, it should work. Could you past also
a persiting sequence, where this exception is thrown.
--~--~-~--~~~---~--~~
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: Do app engine support "OR" operator??

2009-09-18 Thread leszek

http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Queries


An entity must match all filters to be a result. In the JDOQL string
syntax, multiple filters are specified separated by && (logical
"and"). Other logical combinations of filters (logical "or", "not")
are 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] Re: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-18 Thread Morgoth

Here is the code:

PersistenceManager pm = PMF.getInstance().getPersistenceManager();
  try {
Unit u = new Unit( id );
pm.makePersistent( u );   --->>> this is
test.server.DBTestServiceImpl.addUnit(DBTestServiceImpl.java:26)
  } catch ( Exception e ) {
e.printStackTrace();
return "ERROR";
  } finally {
pm.close();
  }
  return "OK";

And here is the stacktrace:

javax.jdo.JDOFatalUserException: Attempt was made to manually set the
id component of a Key primary key.  If you want to control the value
of the primary key, set the name component instead.
at
org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException
(NucleusJDOHelper.java:354)
at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent
(JDOPersistenceManager.java:674)
at org.datanucleus.jdo.JDOPersistenceManager.makePersistent
(JDOPersistenceManager.java:694)
at test.server.DBTestServiceImpl.addUnit(DBTestServiceImpl.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
(RPC.java:527)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:166)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:124)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
(DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:313)
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.content
(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
(BoundedThreadPool.java:442)
NestedThrowablesStackTrace:
Attempt was made to manually set the id component of a Key primary
key.  If you want to control the value of the primary key, set the
name component instead.
org.datanucleus.exceptions.NucleusUserException: Attempt was made to
manually set the id component of a Key primary key.  If you want to
control the value of the primary key, set the name component instead.
at org.datanucleus.store.appengine.DatastoreFieldManager.storeKeyPK
(DatastoreFieldManager.java:650)
at
org.datanucleus.store.appengine.DatastoreFieldManager.storePrimaryKey
(DatastoreFieldManager.java:740)
at
org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField
(DatastoreFieldManager.java:756)
at org.datanucleus.state.AbstractStateManager.providedObjectField
(AbstractStateManager.java:1037)
at test.server.data.Unit.jdoProvideField(Unit.java)
at test.server.data.Unit.jdoProvideFields(Unit.java)
at org.datanucleus.state.JDOStateManagerImpl.provideFields
(JDOStateManagerImpl.java:2715)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject
(Datastore

[appengine-java] Re: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-18 Thread Morgoth

Besides, it seems to be working using String parameter

KeyFactory.createKey(Unit.class.getSimpleName(), "X1")
--~--~-~--~~~---~--~~
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: Accessing Memcache in more than one servlet

2009-09-18 Thread leszek

The second. If you get an object from the cache you have the
serialized copy of the object. So to make your changes "persistent"
and visible by the other requests you have to put it into the cache
again. Also to have a "fresh" object you have to get it again. What
you have is a reference to the serialized copy of the object inside
the cache, not the reference to the object itself.
--~--~-~--~~~---~--~~
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] Java Low Level commit timeout

2009-09-18 Thread Clay Lenhart

I received an error that the commit timed out using the Java low-level
API. The transaction actually succeeded, which was unexpected.

The operation deleted around 1000 to 2000 entities (in batches of
500).

The biggest issue is when the timeout occurs, we are not sure whether
the transaction will succeed or not. This uncertainty goes against one
of the reasons we'd want to use transactions (think: transfer money
from one bank account to another where one bank account is in GAE).

Can you give us the opportunity to specify our own timeout as we'll
know what is best for our apps?  Or set a larger default timeout?

Also, can you rollback on timeout?

Cheers,
Clay
--~--~-~--~~~---~--~~
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: Java Low Level commit timeout

2009-09-18 Thread Clay Lenhart

For the curious, below is the stacktrace:

It only takes about 3 seconds to report failure (but succeed):

Uncaught exception from servlet
com.google.appengine.api.datastore.DatastoreTimeoutException: Unknown
at
com.google.appengine.api.datastore.DatastoreApiHelper.translateError
(DatastoreApiHelper.java:38)
at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall
(DatastoreApiHelper.java:56)
at com.google.appengine.api.datastore.TransactionImpl.makeSyncCall
(TransactionImpl.java:39)
at com.google.appengine.api.datastore.TransactionImpl.makeSyncCall
(TransactionImpl.java:51)
at com.google.appengine.api.datastore.TransactionImpl.commit
(TransactionImpl.java:61)
at mynamespace.MyClass.doPost(MyClass.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
(SaveSessionFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
(AppVersionHandlerMap.java:237)
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.serviceRequest
(JettyServletEngineAdapter.java:139)
at com.google.apphosting.runtime.JavaRuntime.handleRequest
(JavaRuntime.java:235)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:4950)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:4948)
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:823)
at com.google.tracing.LocalTraceSpanRunnable.run
(LocalTraceSpanRunnable.java:56)
at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
(LocalTraceSpanBuilder.java:516)
at com.google.net.rpc.impl.Server.startRpc(Server.java:778)
at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
at com.google.net.rpc.impl.ServerConnection.messageReceived
(ServerConnection.java:437)
at com.google.net.rpc.impl.RpcConnection.parseMessages
(RpcConnection.java:319)
at com.google.net.rpc.impl.RpcConnection.dataReceived
(RpcConnection.java:290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
428)
at com.google.net.async.EventDispatcher.processNetworkEvents
(EventDispatcher.java:762)
at com.google.net.async.EventDispatcher.internalLoop
(EventDispatcher.java:207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
101)
at com.google.net.rpc.RpcService.runUntilServerShutdown
(RpcService.java:251)
at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
(JavaRuntime.java:392)
at java.lang.Thread.run(Unknown Source)
Unexpected exception from servlet:
com.google.appengine.api.datastore.DatastoreTimeoutException: Unknown

--~--~-~--~~~---~--~~
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: appengine with gwt and gwt-ext

2009-09-18 Thread GregGG

I put the single gwtext.jar in war/WEB-INF/lib and added it to my
library build list in eclipse.  I'm not sure if this is relevant but I
haven't updated to the most recent version of the eclipse plugin yet.
I plan on doing that this weekend to see if it resolves my problem.


On Sep 17, 7:38 pm, "Jason (Google)"  wrote:
> Were your gwt-ext JARs in war/WEB-INF/lib when you deployed your app or did
> you reference them from another location in your Eclipse build path?
>
> - Jason
>
> On Tue, Sep 15, 2009 at 8:30 PM, GregGG  wrote:
>
> > Just in case others are interested, after getting my app working with
> > gwt, I decided to see if I could use gwt-ext as well.   I seem to have
> > gotten my app working with gwt-ext fine in my eclipse developer
> > environment by following the helpful instructions at
>
> >http://paulgrenyer.blogspot.com/2009/04/setting-up-gwt-ext-for-gwt-16...
> > (note, I only had to unzip the following to my js directory; adapter/,
> > resources/, ext-all-debug.js, ext-all.js, ext-core-debug.js, ext-
> > core.js) .  But I get the following errors when I upload to appspot:
>
> > Removing units with errors
> >     [ERROR] Errors in 'file:/C:/unscanned/workspaces/project/src/com/
> > project/web/client/WebPage.java'
> >     [ERROR] Line 418: No source code is available for type
> > com.gwtext.client.widgets.CycleButton; did you forget to inherit a
> > required module?
> >     [ERROR] Line 422: No source code is available for type
> > com.gwtext.client.widgets.menu.CheckItem; did you forget to inherit a
> > required module?
> >     [ERROR] Line 425: No source code is available for type
> > com.gwtext.client.widgets.event.CycleButtonListenerAdapter; did you
> > forget to inherit a required module?
>
> > Regardless of these errors, the app seems to be running fine on
> > appspot.  If anyone has any ideas how I can prevent these errors,
> > please let me know.
>
> > thx.
--~--~-~--~~~---~--~~
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: date between jdo query

2009-09-18 Thread bcottam

I do this quite a bit in my app.
Basically I make a query like this:
Query q = pm.newQuery(MyClass.class, "myDate >= :firstDateParam &&
myDate <= :secondDateParam");
Map params = new HashMap();
params.put("firstDateParam", startDate);
params.put("secondDateParam", endDate);
q.executeWithMap(params);

I typed this on my phone, so I may have bitchered some meathod
signatures, but this is about what I am doing. Hope it helps.

On Sep 18, 12:44 am, sproz  wrote:
> I am trying to write a JDO query where an entity field java.util.Date
> "DATEFIELD" is between 2 others java.util.Date parameters...but can
> not succeed
> Has anybody tried this before?
>
> that would be a big help
>
> Steve
--~--~-~--~~~---~--~~
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] Colabolo is now running on GAE/J

2009-09-18 Thread kaz

Hi,

I'd like to thank you all for the supports I got here for the last
several month. We finally were able to migrate the production server
of Colabolo from existing Rails server to the App Engine.

http://www.colabolo.com/
http://www.techcrunch.com/2009/06/21/colabolo-takes-another-stab-at-team-task-management/

It was a challenge for us to migrate the existing DB schema and >3M
records into the Datastore. We were able to design a modified DB
schema successfully, that is suitable for the Datastore
characteristics and the entity group transaction, with many helps and
advices I got here.

And also it was so lucky and exciting for us to utilize the latest
Task Queue feature (although we understand it is still an experimental
API, it was really a silver bullet for us). We were able to spray a
big load into many small Tasks that are processed in paralell.
Eventually we achieved 10 times faster performance than old sequential
solution.

Thanks again to you and Google for this great technologies!

Thanks,

Kaz

--~--~-~--~~~---~--~~
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: ClassCastException blues

2009-09-18 Thread Jayson Falkner

You could catch this exception to find out more about it; however, I
think you just  need to use the normal Servlet RequestDispatcher
instead of Apache's specific implementation. e.g.

request.getRequestDispatcher().include(request, response);

Note that the JSP/Servlet spec doesn't require Apache. Meaning you
should stick to the spec's classes and interfaces if you expect your
code to work between possibly different containers.

Hope it helps,

Jayson

On Thu, Sep 17, 2009 at 10:09 PM, James H  wrote:
>
> This cast exception is NOT obvious.  Here's the production stack
> snippet:
>
> /homeIndex.jsp
> java.lang.ClassCastException: java.lang.ClassCastException cannot be
> cast to javax.servlet.ServletException
>        at org.apache.jasper.runtime.PageContextImpl.handlePageException
> (PageContextImpl.java:754)
>        at org.apache.jsp.homeIndex_jsp._jspService(homeIndex_jsp.java:67)
>        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 487)
>        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> ...
>
> And here's the homeIndex_jsp.java (from my local runtime test
> environment).  Line 67 is the last one listed here:
>
> ...
>      out.write("\t\t\t\t\n");
>      out.write("\t\t\t\t\t\n");
>      org.apache.jasper.runtime.JspRuntimeLibrary.include(request,
> response, "homeLeft.jsp", out, true);
>      out.write("\n");
> ...
>
> Any ideas on how a class cast exception could occur above?  Naturally,
> this runs fine in my test environment but NOT in production!
>
> Thanks, J
> >
>

--~--~-~--~~~---~--~~
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: Core Value Types a benefit?

2009-09-18 Thread Jason (Google)
For any other serializable class that isn't annotated with
PersistenceCapable:
- You have to explicitly declare it as serializable:

@Persistent(serializable = "true")
private HashMap items;

- This gets stored as a BLOB in the datastore, meaning you can't query on it
but you should be able to retrieve it.

- Jason

On Wed, Sep 16, 2009 at 3:19 PM, Dan Billings  wrote:

>
> I'm noticing a list of "Core Value Types" listed in the Datastore
> Guide.
>
> Are there any benefits of using these (besides being supported) vs.
> any other Serializable class?
>
>
> >
>

--~--~-~--~~~---~--~~
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: Problem to send HTTP POST request

2009-09-18 Thread Jason (Google)
Which URL are you trying to POST to?
- Jason

On Thu, Sep 17, 2009 at 1:02 AM, Chi  wrote:

>
> Hello, I've tried to implement a HTTP POST request via URLConnection
> similar to the URL Fetch example, and it works properly in the hosted
> mode, but it shows error message 500 in the GAE. Does anyone know how
> to solve the problem?
> >
>

--~--~-~--~~~---~--~~
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: Upload failed. Help me, please

2009-09-18 Thread Jason (Google)
Are you still seeing this error? Do you see a different result if you change
the version number or if you set it to deploy to an existing version?
- Jason

On Thu, Sep 17, 2009 at 4:38 AM, opok  wrote:

>
> I don't know what error exactly is
>
> 
> Creating staging directory
> Scanning for jsp files.
> Compiling jsp files.
> Compiling java files.
> Scanning files on local disk.
> Initiating update.
> java.io.IOException: Error posting to URL:
> http://appengine.google.com/api/appversion/create?version=16&app_id=xing&;
> 301 Moved Permanently
> 
> 301 Moved Permanently
> 
> 301 Moved Permanently
> nginx/0.5.23
> 
> 
> >
>

--~--~-~--~~~---~--~~
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: How login to google account programmatically?

2009-09-18 Thread Jason (Google)
Hi Pavel. The general process is explained here, even though the
instructions are for the Python runtime:
http://stackoverflow.com/questions/101742/how-do-you-access-an-authenticated-google-app-engine-service-from-a-non-web-pyt

In short, you can use Google's ClientLogin library for Java to retrieve a
token, use that token to get a cookie, and then set the cookie on all
subsequent requests. More info. in the Google I/O presentation linked below:

http://blog.jeffscudder.com/2009/08/test-client-for-app-engine.html

On Thu, Sep 17, 2009 at 4:43 AM, kor  wrote:

>
> Hi,
>
> I am writing a composite application which contains both desktop and
> web client. I am planning to use UserService for user
> authentification. So I am stunned with the following question:
> Is it possible to login to UserService from desktop app(using
> HTTPClient or something else). And if it is possible how this may be
> done?
>
> Thanks in advance,
> Pavel
> >
>

--~--~-~--~~~---~--~~
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: Using detachable property

2009-09-18 Thread Jason (Google)
I'm not sure off-hand why you're able to detach entities without setting the
detachable property, but you'll probably save yourself some trouble down the
road if you leave it set.
I answered many of your other questions in a previous thread -- please try
not to double post.

http://groups.google.com/group/google-appengine-java/browse_thread/thread/9c4f810f8c4a8ad4

In short, you will have to detach your objects before caching them if you
don't want to have to re-fetch the entity at update time. And yes, anything
you store in memcache should extend Serializable.

- Jason

On Thu, Sep 17, 2009 at 4:52 AM, Prashant  wrote:

> hi,
>
>
> I tried the "Updating an Object" (using detachable property) example given
> here.
> While experimenting with it I found that even if I do not add 
> *detachable="true"
> *property to my JDO class it works without any problem. Is it ok to work
> without detachable property or it just worked with my case? Following is the
> code I tried :
>
>
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class Data{
> @SuppressWarnings("unused")
> @PrimaryKey
> *...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)*
> private Long id;
>
> @Persistent
> private String value;
>
> public Data(String value){
> this.value = value;
> }
>
> public void setValue(String value){
> this.value = value;
> }
>
> public String getValue(){
> return this.value;
> }
> }
>
>
>
>
> public class Main extends HttpServlet {
>
> public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> doReq(req, resp);
> }
>
> public void doPost(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> doReq(req, resp);
> }
>
> private void doReq(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> Data data = new Data("some value");
>
> *PersistenceManager pm = PMF.get().**getPersistenceManager();
> pm.makePersistent(data); // NOTE: i am not detaching the object
> pm.close();*
>
>* chageValue(data);*
> }
>
> @SuppressWarnings("unchecked")
> private void chageValue(Data data){
> *PersistenceManager pm = PMF.get().**getPersistenceManager();
> data.setValue("some other value.");
> pm.makePersistent(data);
> pm.close();*
> }
> }
>
>
> i want to fetch object(s) from datastore, cache it to Memcache and use the
> same (cached object) for further uses (over requests). and if any change
> happens to the object(s) i want to update the object(s) to datastore
> straight away using cashed instance of object instead of fetching it (again)
> form datastore and then updating it. following is a code snippet:
>
> ...
> ...
> Data data = *cache*.get("key");
> data.setValue("new updated value");
> pm.makePersistent(data);
> *cache*.put("key", data);
> ...
> ...
> ...
>
> is it necessary to add *detachable="true"* to my JDO class (Data) ? is it
> necessary to detach object before caching to Memcache? is it required for my
> JDO class (Data) to extend Serialzable Class?
>
>
> 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: Using detachable property

2009-09-18 Thread datanucleus

> I'm not sure off-hand why you're able to detach entities without setting the
> detachable property

Calling detach on a non-detachable object results in a transient
object as per the JDO spec, hence unusable thereafter for the
persistence process.
--~--~-~--~~~---~--~~
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: ClassCastException blues

2009-09-18 Thread James H

Jayson, the include in my JSP looks like this:

jsp:include page="homeLeft.jsp" flush="true"

I assume the Google plugin for Eclipse is handling this in a
compatible manner between the test environment provided by the plugin
versus production.  So, I'm not sure what to change by your comment on
"include".  I did miss the try/catch there...I'll try that next.
Thanks, J

On Sep 18, 12:41 pm, Jayson Falkner  wrote:
> You could catch this exception to find out more about it; however, I
> think you just  need to use the normal Servlet RequestDispatcher
> instead of Apache's specific implementation. e.g.
>
> request.getRequestDispatcher().include(request, response);
>
> Note that the JSP/Servlet spec doesn't require Apache. Meaning you
> should stick to the spec's classes and interfaces if you expect your
> code to work between possibly different containers.
>
> Hope it helps,
>
> Jayson
>
>
>
> On Thu, Sep 17, 2009 at 10:09 PM, James H  wrote:
>
> > This cast exception is NOT obvious.  Here's the production stack
> > snippet:
>
> > /homeIndex.jsp
> > java.lang.ClassCastException: java.lang.ClassCastException cannot be
> > cast to javax.servlet.ServletException
> >        at org.apache.jasper.runtime.PageContextImpl.handlePageException
> > (PageContextImpl.java:754)
> >        at org.apache.jsp.homeIndex_jsp._jspService(homeIndex_jsp.java:67)
> >        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> >        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> > 487)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > ...
>
> > And here's the homeIndex_jsp.java (from my local runtime test
> > environment).  Line 67 is the last one listed here:
>
> > ...
> >      out.write("\t\t\t\t\n");
> >      out.write("\t\t\t\t\t\n");
> >      org.apache.jasper.runtime.JspRuntimeLibrary.include(request,
> > response, "homeLeft.jsp", out, true);
> >      out.write("\n");
> > ...
>
> > Any ideas on how a class cast exception could occur above?  Naturally,
> > this runs fine in my test environment but NOT in production!
>
> > Thanks, J- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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: How to make parent optional

2009-09-18 Thread Jason (Google)
You're using an owned relationship, which means the parent's key is embedded
in the keys of all the children. Thus, all children must have a parent in
order to be persisted.
You can either make a dummy group as Ian suggested, or use an unowned
relationship and just store the key of the group with each child --
depending on the queries you need to make, this should be adequate. This
will also be necessary if students are able to switch groups eventually
since entity keys cannot be changed after they're persisted.

- Jason

On Wed, Sep 16, 2009 at 6:42 AM, Arash  wrote:

>
> I have a one-to-many relationship, mapped as:
>
> @PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>@Extension(vendorName="datanucleus", key="gae.encoded-pk",
> value="true")
>private String key;
>
>@Persistent
>private String name;
>
>@Persistent(nullValue= NullValue.NONE)
>private Group parent;
>
> And in many side:
>  @Persistent(mappedBy= "parent")
>private List children;
>
> I want to make the group property optional, but GAE refuses to save
> any student entity which does not have group assigned to them. Do you
> have any idea how I can fix 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: Using detachable property

2009-09-18 Thread Jason (Google)
Thank you for the clarification, Andy.
Prashant, please continue to use detachable = "true" for the classes whose
entities you actually want to detach.

- Jason

On Fri, Sep 18, 2009 at 11:28 AM, datanucleus wrote:

>
> > I'm not sure off-hand why you're able to detach entities without setting
> the
> > detachable property
>
> Calling detach on a non-detachable object results in a transient
> object as per the JDO spec, hence unusable thereafter for the
> persistence process.
> >
>

--~--~-~--~~~---~--~~
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: Doubt with detachable property of JDO (Experts please reply)

2009-09-18 Thread Jason (Google)
Prashant, please don't post multiple times for the same topic. Your answers
are in this thread:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/2cd38dda7467d6fa

- Jason

On Thu, Sep 17, 2009 at 8:32 AM, Prashant  wrote:

> hi,
>
>
> I tried the "Updating an Object" (using detachable property) example given
> here.
> While experimenting with it I found that even if I do not add 
> *detachable="true"
> *property to my JDO class it works without any problem. Is it ok to work
> without detachable property or it just worked with my case? Following is the
> code I tried :
>
>
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class Data{
> @SuppressWarnings("unused")
> @PrimaryKey
> *...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)*
> private Long id;
>
> @Persistent
> private String value;
>
> public Data(String value){
> this.value = value;
> }
>
> public void setValue(String value){
> this.value = value;
> }
>
> public String getValue(){
> return this.value;
> }
> }
>
>
>
>
> public class Main extends HttpServlet {
>
> public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> doReq(req, resp);
> }
>
> public void doPost(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> doReq(req, resp);
> }
>
> private void doReq(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> Data data = new Data("some value");
>
> *PersistenceManager pm = PMF.get().**getPersistenceManager();
> pm.makePersistent(data); // NOTE: i am not detaching the object
> pm.close();*
>
>* chageValue(data);*
> }
>
> @SuppressWarnings("unchecked")
> private void chageValue(Data data){
> *PersistenceManager pm = PMF.get().**getPersistenceManager();
> data.setValue("some other value.");
> pm.makePersistent(data);
> pm.close();*
> }
> }
>
>
> i want to fetch object(s) from datastore, cache it to Memcache and use the
> same (cached object) for further uses (over requests). and if any change
> happens to the object(s) i want to update the object(s) to datastore
> straight away using cashed instance of object instead of fetching it (again)
> form datastore and then updating it. following is a code snippet:
>
> ...
> ...
> Data data = *cache*.get("key");
> data.setValue("new updated value");
> pm.makePersistent(data);
> *cache*.put("key", data);
> ...
> ...
> ...
>
> is it necessary to add *detachable="true"* to my JDO class (Data) ? is it
> necessary to detach object before caching to Memcache? is it required for my
> JDO class (Data) to extend Serialzable Class?
>
>
> 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: noob in GWT and GAE

2009-09-18 Thread Jason (Google)
I recommend you read the Getting Started Guides for both products as well as
the Eclipse plugin:
http://code.google.com/webtoolkit/gettingstarted.html
http://code.google.com/appengine/docs/java/gettingstarted/
http://code.google.com/eclipse/docs/getting_started.html

There are a few GWT/GAE samples you can use to help get started. Namely,
take a look at gwtguestbook, sticky, and taskengine in the demos directory:

http://code.google.com/p/googleappengine/source/browse/#svn/trunk/java/demos

- Jason

On Thu, Sep 17, 2009 at 12:30 PM, Wladiston Paiva  wrote:

> Friends,
>
> I am wanting to learn more about GAE and GWT, but I'm no have project to do
> and get experience.
> anyone know any open source project that I can attend to learn more?
>
> ---
> Wladiston Maurício de Paiva
> http://wladistonpaiva.com.br
> desenvolvedo...@gmail.com
> e...@wladistonpaiva.com.br
> +55 (31) 8435 - 5380
>
> >
>

--~--~-~--~~~---~--~~
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: date between jdo query

2009-09-18 Thread sprooooz

Thanks for your answers guys,

actually I ran the exact same query as you bcottam, but as soon as I
add other parameters in the query(like "&& field1==param1"), a
DatastoreNeedIndexException is thrown every time.
any idea why?

On 18 sep, 16:56, bcottam  wrote:
> I do this quite a bit in my app.
> Basically I make a query like this:
> Query q = pm.newQuery(MyClass.class, "myDate >= :firstDateParam &&
> myDate <= :secondDateParam");
> Map params = new HashMap();
> params.put("firstDateParam", startDate);
> params.put("secondDateParam", endDate);
> q.executeWithMap(params);
>
> I typed this on my phone, so I may have bitchered some meathod
> signatures, but this is about what I am doing. Hope it helps.
>
> On Sep 18, 12:44 am, sproz  wrote:
>
>
>
> > I am trying to write a JDO query where an entity field java.util.Date
> > "DATEFIELD" is between 2 others java.util.Date parameters...but can
> > not succeed
> > Has anybody tried this before?
>
> > that would be a big help
>
> > Steve
--~--~-~--~~~---~--~~
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: RPC call and variables

2009-09-18 Thread Jason (Google)
Hi Sahil. It sounds like you can get rid of this particular log message by
performing all your writes inside of a transaction. If you don't need or
want to use transactions, then you can safely ignore this particular info
log message.
- Jason

On Thu, Sep 17, 2009 at 9:06 PM, Sahil Mahajan  wrote:

>
> Hello
> Thanks leszek
>
> I tried datastore, it has solved many of my problems. Though I am not
> getting exact results, but I feel if I spend more time, I may improve
> the problems.
>
> I receive following message in my info log after certain intervals.
> org.datanucleus.ObjectManagerImpl close: Outstanding nontx update
> being committed to datastore
>
> I found
> http://groups.google.com/group/google-appengine-java/browse_thread/thread/8c8d3191d287553f
> information on this topic. I would like to know more about this.
>
> I have started looking into XMPP API which is specified in the link
> given by you.
> I would also like to know about any other alternative?
>
> Regards
> Sahil Mahajan
>
> On Sep 16, 2:37 pm, leszek  wrote:
> > Follow this thread - could be helpful
> >
> > http://groups.google.co.uk/group/google-appengine-java/browse_frm/thr...
> >
>

--~--~-~--~~~---~--~~
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: GAE UserService and other google Api (Contact, Analytics) ???

2009-09-18 Thread Jason (Google)
It's not currently bundled with the SDK, but you can use a Subversion client
to create a local repository on your machine and access it that way.
Just follow the instructions under "command line access":
http://code.google.com/p/googleappengine/source/checkout

- Jason

On Thu, Sep 17, 2009 at 10:35 PM, NMAGOCIO  wrote:

>
>
> Could you point me to an AppEngine Java example of how OAuth is
> accomplished?
>
> I found an example at:
> http://code.google.com/p/googleappengine/source/browse/#svn/trunk/java/demos/oauth
> Is there some way I can download this sample?
> I looked in appengine-java-sdk-1.2.5.zip Demos but no OAuth
>
> Thank you,
> >
>

--~--~-~--~~~---~--~~
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] Please help with Java Authsub in Eclipse

2009-09-18 Thread NMAGOCIO

I am using Eclipse to create an AppEngine app that displays a contacts
list on a web page but can't get Authsub working.

Basically I started with the Google web application button and added
the code to generate the get request.

Problem is when I run the program the page tells me:

HTTP ERROR: 500
com/google/gdata/client/http/AuthSubUtil
RequestURI=/list_contacts_authsub
Caused by:
java.lang.NoClassDefFoundError: com/google/gdata/client/http/
AuthSubUtil

There are no errors showing in the code view, I imported gdata-
client-1.0.jar as a referenced library and the same bit of code
produces a url if run as a non web app.

Please I am trying to learn all this and frustrated after hours of
searching for the answer or a tutorial on doing Java Authsub in
Eclipse.

Thank you for any help!!!
--~--~-~--~~~---~--~~
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: Please help with Java Authsub in Eclipse

2009-09-18 Thread Rajeev Dayal
I'm guessing that you added "gdata-client-1.0.jar" to your build path. Is it
in your war/WEB-INF/lib directory? Look at your list of warnings in the
"Problems" view. You should see a warning indicating that this jar is not in
your war/WEB-INF/lib directory. Select the warning and hit CTRL-1 to fix the
problem.

On Fri, Sep 18, 2009 at 4:20 PM, NMAGOCIO  wrote:

>
> I am using Eclipse to create an AppEngine app that displays a contacts
> list on a web page but can't get Authsub working.
>
> Basically I started with the Google web application button and added
> the code to generate the get request.
>
> Problem is when I run the program the page tells me:
>
> HTTP ERROR: 500
> com/google/gdata/client/http/AuthSubUtil
> RequestURI=/list_contacts_authsub
> Caused by:
> java.lang.NoClassDefFoundError: com/google/gdata/client/http/
> AuthSubUtil
>
> There are no errors showing in the code view, I imported gdata-
> client-1.0.jar as a referenced library and the same bit of code
> produces a url if run as a non web app.
>
> Please I am trying to learn all this and frustrated after hours of
> searching for the answer or a tutorial on doing Java Authsub in
> Eclipse.
>
> Thank you for any help!!!
> >
>

--~--~-~--~~~---~--~~
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: Please help with Java Authsub in Eclipse

2009-09-18 Thread NMAGOCIO


Thank you!!!

That did the trick
--~--~-~--~~~---~--~~
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: ClassCastException blues

2009-09-18 Thread Jayson Falkner

Ah. Yep that is weird.

If I understand correctly, GAE is compiling the JSP before it uploads
it to the cloud. That'd mean it could be making incompatible code (the
reason I mentioned before), but it definitely wouldn't be your fault.
Good luck debugging. Two other things to try:

- The page you include might be throwing the exception. The
jsp:include should be OK.

- Try fiddling with different ways to do the include. That'd expose
this as a GAE bug. For instance, try a <% %> block with the normal use
of RequestDispatcher. That should literally include the Java code
versus using whatever GAE converts the jsp:include to.

Cheers,
Jayson

On Fri, Sep 18, 2009 at 11:26 AM, James H  wrote:
>
> Jayson, the include in my JSP looks like this:
>
> jsp:include page="homeLeft.jsp" flush="true"
>
> I assume the Google plugin for Eclipse is handling this in a
> compatible manner between the test environment provided by the plugin
> versus production.  So, I'm not sure what to change by your comment on
> "include".  I did miss the try/catch there...I'll try that next.
> Thanks, J
>
> On Sep 18, 12:41 pm, Jayson Falkner  wrote:
>> You could catch this exception to find out more about it; however, I
>> think you just  need to use the normal Servlet RequestDispatcher
>> instead of Apache's specific implementation. e.g.
>>
>> request.getRequestDispatcher().include(request, response);
>>
>> Note that the JSP/Servlet spec doesn't require Apache. Meaning you
>> should stick to the spec's classes and interfaces if you expect your
>> code to work between possibly different containers.
>>
>> Hope it helps,
>>
>> Jayson
>>
>>
>>
>> On Thu, Sep 17, 2009 at 10:09 PM, James H  wrote:
>>
>> > This cast exception is NOT obvious.  Here's the production stack
>> > snippet:
>>
>> > /homeIndex.jsp
>> > java.lang.ClassCastException: java.lang.ClassCastException cannot be
>> > cast to javax.servlet.ServletException
>> >        at org.apache.jasper.runtime.PageContextImpl.handlePageException
>> > (PageContextImpl.java:754)
>> >        at org.apache.jsp.homeIndex_jsp._jspService(homeIndex_jsp.java:67)
>> >        at 
>> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>> >        at 
>> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
>> > 487)
>> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
>> > ...
>>
>> > And here's the homeIndex_jsp.java (from my local runtime test
>> > environment).  Line 67 is the last one listed here:
>>
>> > ...
>> >      out.write("\t\t\t\t\n");
>> >      out.write("\t\t\t\t\t\n");
>> >      org.apache.jasper.runtime.JspRuntimeLibrary.include(request,
>> > response, "homeLeft.jsp", out, true);
>> >      out.write("\n");
>> > ...
>>
>> > Any ideas on how a class cast exception could occur above?  Naturally,
>> > this runs fine in my test environment but NOT in production!
>>
>> > Thanks, J- Hide quoted text -
>>
>> - Show quoted text -
> >
>

--~--~-~--~~~---~--~~
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] Chat Time transcript for September 16, 2009

2009-09-18 Thread Jason (Google)

This past Wednesday, the App Engine team hosted the latest session of
its bimonthly IRC office hours. A transcript of the session and a
summary of the topics covered is provided below. The next session will
take place on Wednesday, October 7th from 7:00-8:00 p.m. PDT in the
#appengine channel on irc.freenode.net.


--SUMMARY---
- Tip for handling schema upgrades: keep a version associated with
each entity and update this version number whenever a property is
added or removed. Then you can easily query for the entities that
still need to be updated via this version number. [8:59-9:00]

- Built-in cursors for paging and datastore statistics are on track
for the next release (1.2.6). [9:03-9:04, 9:08]

- To avoid timeouts when importing large modules (or a high number of
smaller modules), consider importing these only when needed (e.g.
inside of a functions/methods) or using ZipImport. [9:10]

- Discussion on using datastore dump and restore to download all data
for a given application and re-import to the same app, a different
app, or even the local datastore. [9:08-9:13]

- Discussion on ways of profiling applications to measure and optimize
performance. [9:12, 9:14, 9:16]

- Discussion on task queue throttling. Q: What does 150/h
actually mean? A: It churns through the first 150 tasks in that queue
on the hour, then waits for the next hour to chrun through the next
150. It does not necessarily evenly distribute the 150 tasks over the
hour, but you can use something like 3/m if you want
this. [9:24-9:27, 9:30-9:32]

- Request for extensions to billing system to allow users to help
cover the costs of running an application. [9:35-9:40]

- Request for enhancing the Users API to support authentication via
the other systems GFC supports (OpenID, et. al.) in order to make
Friend Connect integration easier. [9:37-9:42]

- Q: Is it possible to get billing details on per request basis? A:
Yes, this is currently possible for CPU time, but not for the other
billable quotas. [9:55-9:56]


--FULL TRANSCRIPT---
[8:59am]  how can i query with GQL for a  property.
I enhanced my Data Objects with properties later and now i can not
query for the old ones (Java)
[8:59am]  You can't; they're not indexed.
[9:00am]  schtief: I add a version property to all of my model
objects
[9:00am]  cgeorg: thats clever thanks
[9:00am]  Any time I add a property, the version gets updated,
and I run an update on all objects whose version is less than the
current to update them
[9:00am]  Hi
[9:00am]  cgeorg: +1
[9:00am]  Hi all, I'd like to kick off another
installment of our official twice-a-month hour long chat sessions. Let
the questions and comments flow.
[9:00am]  Hi google team! Thanks for the good post in the
blog. As i understand, the megastore is "a transactional indexed
record manager built on top of BigTable" - from SIGMOD 2008. Also i
see that AppEngine use a onestore now (in java OneStore.class etc).
What is the onestore? More simple manager or something else? Will be
the onestore used in the future in parallel, or it will be completely
replaced by megastrore?
[9:01am]  it'd be great to see a general-purpose open
source library like that for handling schema upgrades
[9:01am]  cgeorg: thats how i did it to solve my problems :-)
this sounds so ruby like
[9:01am]  hi, i'm getting random runtime.deadlineexceedederror
from my app
[9:01am]  i'm using appengine-patch to use django
[9:02am]  why isnt there any OR shortcut in GQL all i do is
making to queries for one OR and combining the results. this shortcut
could also be done by the engine
[9:02am]  maxoizo: onestore is just our internal name for
the metaschema, ie the way we represent our schemaless entities and
properties in megastore
[9:02am]  You know, the only difference between MSIE and a
dinosaur is that no one pretends the dinosaur is still alive.
[9:02am]  it's not code
[9:02am]  I have a question on TaskQueue .. my worker url
points to subdomain in my app which is not permitted as only relative
urls are allowed
[9:02am]  ryan: can you take a look at
http://code.google.com/p/googleappengine/issues/detail?id=1695
(deadline issues on import)
[9:02am]  Since I started this before background tasks and
unlimited request time, I had a url I could hit that would do a
reasonable batch (20-40) entities, then output an html page that had a
link back to itself and JS to click it after a second or so
[9:02am]  Might be better to do with a background task now
[9:02am]  schtief: the IN operator is a kind of OR
[9:02am]  Java question: is there a chance to get JAXB support
in the near future?
[9:02am]  hmmm. someone please turn off c-r-i-n-g-e-r.
[9:03am]  What are another differences between the current
datastore and megastore in implementation for the AppEngine, apart the
mechanism of replication?
[9:03am]  but unfortunately we can't support general-
purpose OR as efficiently as we'd nee

[appengine-java] when will BigDecimal be supported in datastore?

2009-09-18 Thread king

I want to manipulate currency in GAE.  The datastore data type spec
doesn't have BigDecimal.  When will it be 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] Re: To specify Key or use auto generation

2009-09-18 Thread Sam Walker
I thought it will help getting all the memberships (without doing an extra
query). With each group, I always want the memberships with it as well.

In my case, I will get the complete group information (including all
memberships) with just one query :
memberships = Membership.all().filter(person = me)
// for each m in memberships, m.group.memberships is pre filled.

In your case, I will have to do the following
memberships = Membership.all().filter(person = me)
for each m in memberships:
  Membership.all().filter(group = m.group) // this will return
m.group.memberships

Am I missing something with my approach? Maybe the query is done on the back
end anyway? Please advise.

On Tue, Sep 8, 2009 at 1:49 PM, Jason (Google)  wrote:

> Since you've created a new kind (Membership) to model the relationship
> between Person and Group, I'm a bit confused on why you're using a
> relationship between Group and Membership. Shouldn't Group and Membership be
> independent?
>
> class Person {
>   ...
> }
>
> class Group {
>   ...
> }
>
> class Membership {
>   Key key;  // key name is concatenated IDs of Person and Group
>   ...
> }
>
> Solution 1 is less work and less code but my feeling is that, as your code
> gets older, it could become more of a problem, especially if other
> programmers start committing and don't understand how or why you're
> concatenating the IDs to store membership information. If this is likely, I
> would opt for solution 2.
>
> If you go ahead with solution 1, you can take advantage of one of the more
> recent 1.2.5 features, allocateIds(), which allows you to set aside one or
> more IDs for entities yet to be created. It's only exposed in the low-level
> API at this point:
>
>
> http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/DatastoreService.html
>
> - Jason
>
>
> On Sun, Sep 6, 2009 at 11:18 PM, Sam Walker wrote:
>
>> In 1, another problem is that I may not know the Keys of A and B at the
>> point of creation. For example, lets say I am doing something like this:
>>
>> class Person {
>> }
>>
>> class Group {
>>   @Persistent(mappedBy = "group")
>>   ArrayList memberships;
>> }
>>
>> class Membership {
>>   Key person;
>>   Group group;
>> }
>>
>>
>> Now I would do:
>> Group g = new Group();
>> while(...) {
>>   Membership m = new Membership();
>>   g.memberships.add(m);
>> }
>> pm.makePersistent(g);
>>
>> Now, when I create membership, I dont have the Group key (I do have the
>> person key), I can't really use it to create a new derived key for
>> membership. Or am I missing something?
>>
>>
>> On Sun, Sep 6, 2009 at 11:04 PM, Sam Walker wrote:
>>
>>> Lets say there is a relationship between Entities A and B, and I want to
>>> model it with Entity C.
>>>
>>> Two ways:
>>> 1. Use concatenated Key of A and B for Key of C. Data model will ensure
>>> there are no duplicates.
>>> 2. Use autogenerated Key and make sure you do not duplicate A B
>>> relationship in code.
>>>
>>> Which one would you choose? In 1, is a simple concatenation the best way
>>> to go about 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] Java + Python run-time on GAE

2009-09-18 Thread YONG

Can java and python run-time coexist in one single application?

I had tried that, in one single version could not, but in different
version then it is OK. Can have a way to make both run-time coexists
in one single version?


--~--~-~--~~~---~--~~
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] System.out.println behavior in production

2009-09-18 Thread Diana Cruise

I'm having difficulty debugging my application in production.
According to the GAE docs, System.out.println output is directed as
log level INFO.  My home page generates such output when debugging in
my test local environment.  But, my deployment to production generates
NO output.  Using the Admin Console->Log I can see my Requests but NOT
my standard output from println().  How can I see this output?  Is it
just NOT being flushed or is there a config for this?

Thanks, Diana
--~--~-~--~~~---~--~~
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: System.out.println behavior in production

2009-09-18 Thread Don Schwarz
Are you switch the logging level in the Admin Console to Info?  By default
it only shows errors.

Do you have a logging.properties file?  If so, what is your default .level
set to?  System.out would be logged at INFO, so if you are specifying this
make sure it is INFO or lower.
Finally, I would recommend using java.util.logging instead of System.out.
 It's a lot more flexible and is very easy to use.

On Fri, Sep 18, 2009 at 10:09 PM, Diana Cruise wrote:

>
> I'm having difficulty debugging my application in production.
> According to the GAE docs, System.out.println output is directed as
> log level INFO.  My home page generates such output when debugging in
> my test local environment.  But, my deployment to production generates
> NO output.  Using the Admin Console->Log I can see my Requests but NOT
> my standard output from println().  How can I see this output?  Is it
> just NOT being flushed or is there a config for this?
>
> Thanks, Diana
> >
>

--~--~-~--~~~---~--~~
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: System.out.println behavior in production

2009-09-18 Thread Diana Cruise

Yes, I tried all the levels in the Console.  It must be the properties
file.  I noticed the plugin created the log4j.properties in the src
folder and the contents are below.  How do I set the default level in
this file?  Thanks.

# A default log4j configuration for log4j users.
#
# To use this configuration, deploy it into your application's WEB-INF/
classes
# directory.  You are also encouraged to edit it as you like.

# Configure the console as our one appender
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c]
- %m%n

# tighten logging on the DataNucleus Categories
log4j.category.DataNucleus.JDO=WARN, A1
log4j.category.DataNucleus.Persistence=WARN, A1
log4j.category.DataNucleus.Cache=WARN, A1
log4j.category.DataNucleus.MetaData=WARN, A1
log4j.category.DataNucleus.General=WARN, A1
log4j.category.DataNucleus.Utility=WARN, A1
log4j.category.DataNucleus.Transaction=WARN, A1
log4j.category.DataNucleus.Datastore=WARN, A1
log4j.category.DataNucleus.ClassLoading=WARN, A1
log4j.category.DataNucleus.Plugin=WARN, A1
log4j.category.DataNucleus.ValueGeneration=WARN, A1
log4j.category.DataNucleus.Enhancer=WARN, A1
log4j.category.DataNucleus.SchemaTool=WARN, A1


On Sep 18, 10:13 pm, Don Schwarz  wrote:
> Are you switch the logging level in the Admin Console to Info?  By default
> it only shows errors.
>
> Do you have a logging.properties file?  If so, what is your default .level
> set to?  System.out would be logged at INFO, so if you are specifying this
> make sure it is INFO or lower.
> Finally, I would recommend using java.util.logging instead of System.out.
>  It's a lot more flexible and is very easy to use.
>
> On Fri, Sep 18, 2009 at 10:09 PM, Diana Cruise 
> wrote:
>
>
>
>
>
> > I'm having difficulty debugging my application in production.
> > According to the GAE docs, System.out.println output is directed as
> > log level INFO.  My home page generates such output when debugging in
> > my test local environment.  But, my deployment to production generates
> > NO output.  Using the Admin Console->Log I can see my Requests but NOT
> > my standard output from println().  How can I see this output?  Is it
> > just NOT being flushed or is there a config for this?
>
> > Thanks, Diana- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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] UTF-8 in the URL resource

2009-09-18 Thread YONG

if I have some resources is in UTF-8 filename or folder, when I upload
those file, error is giving like this...

 [java] Sep 19, 2009 10:52:43 AM
com.google.appengine.tools.admin.AppVersionUpload addFile
 [java] SEVERE: Invalid character in filename: Hokkaido/???/
IMG_0993.JPG
 [java] 25% Scanned 250 files.
 [java] Sep 19, 2009 10:52:45 AM
com.google.appengine.tools.admin.AppVersionUpload addFile
 [java] SEVERE: Invalid character in filename: __static__/
Hokkaido/???/IMG_0993.JPG
 [java] 28% Initiating update.
 [java] 31% Cloning 144 static files.
 [java] 33% Cloned 100 files.

how to resolve this? GAE does not support UTF-8 resource ?


--~--~-~--~~~---~--~~
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: System.out.println behavior in production

2009-09-18 Thread Diana Cruise

I found the Logger docs for GAE at:

http://code.google.com/appengine/docs/java/runtime.html#Logging

I'm definitely getting output now from Stdout but I can't seem to get
logger.log() to work.  I'll fiddle with it and log a separate issue if
I can't get it to work.  Thanks for the help Don!

On Sep 18, 10:27 pm, Diana Cruise  wrote:
> Yes, I tried all the levels in the Console.  It must be the properties
> file.  I noticed the plugin created the log4j.properties in the src
> folder and the contents are below.  How do I set the default level in
> this file?  Thanks.
>
> # A default log4j configuration for log4j users.
> #
> # To use this configuration, deploy it into your application's WEB-INF/
> classes
> # directory.  You are also encouraged to edit it as you like.
>
> # Configure the console as our one appender
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c]
> - %m%n
>
> # tighten logging on the DataNucleus Categories
> log4j.category.DataNucleus.JDO=WARN, A1
> log4j.category.DataNucleus.Persistence=WARN, A1
> log4j.category.DataNucleus.Cache=WARN, A1
> log4j.category.DataNucleus.MetaData=WARN, A1
> log4j.category.DataNucleus.General=WARN, A1
> log4j.category.DataNucleus.Utility=WARN, A1
> log4j.category.DataNucleus.Transaction=WARN, A1
> log4j.category.DataNucleus.Datastore=WARN, A1
> log4j.category.DataNucleus.ClassLoading=WARN, A1
> log4j.category.DataNucleus.Plugin=WARN, A1
> log4j.category.DataNucleus.ValueGeneration=WARN, A1
> log4j.category.DataNucleus.Enhancer=WARN, A1
> log4j.category.DataNucleus.SchemaTool=WARN, A1
>
> On Sep 18, 10:13 pm, Don Schwarz  wrote:
>
>
>
> > Are you switch the logging level in the Admin Console to Info?  By default
> > it only shows errors.
>
> > Do you have a logging.properties file?  If so, what is your default .level
> > set to?  System.out would be logged at INFO, so if you are specifying this
> > make sure it is INFO or lower.
> > Finally, I would recommend using java.util.logging instead of System.out.
> >  It's a lot more flexible and is very easy to use.
>
> > On Fri, Sep 18, 2009 at 10:09 PM, Diana Cruise 
> > wrote:
>
> > > I'm having difficulty debugging my application in production.
> > > According to the GAE docs, System.out.println output is directed as
> > > log level INFO.  My home page generates such output when debugging in
> > > my test local environment.  But, my deployment to production generates
> > > NO output.  Using the Admin Console->Log I can see my Requests but NOT
> > > my standard output from println().  How can I see this output?  Is it
> > > just NOT being flushed or is there a config for this?
>
> > > Thanks, Diana- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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] about gzip issue

2009-09-18 Thread congli...@gmail.com

Hi,
   I found that the google app engine can't gzip my web response even
if Accept-Encoding has been set by client.
   Is there anything we need to do for this gzip protocol ?

  thx a lot


Regards,
Cong Ling
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---