[appengine-java] Re: about gzip issue

2009-09-19 Thread Philippe Marschall



On Sep 19, 7:54 am, "congli...@gmail.com"  wrote:
> 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 ?

It's supposed to happen magically:
http://code.google.com/appengine/kb/general.html#compression

Like all magic it will ultimately fail:
http://code.google.com/p/googleappengine/issues/detail?id=2036

Cheers
Philippe
--~--~-~--~~~---~--~~
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-19 Thread Gaurav

I am facing the same Issue.

Code:
p = new Person(fullName);
Key k = KeyFactory.createKey(Person.class.getSimpleName(),
fullName.hashCode());
p.setKey(k);

Error:
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.

On Sep 18, 1:10 pm, Morgoth  wrote:
> 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 
> tutorialhttp://code.google.com/appengine/docs/java/datastore/creatinggettinga...
> 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: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-19 Thread Gaurav

Opps! got it.

Key k = KeyFactory.createKey(Person.class.getSimpleName(),
String.valueOf(fullName.hashCode()));

instead of

Key k = KeyFactory.createKey(Person.class.getSimpleName(),
fullName.hashCode());


On Sep 19, 2:07 pm, Gaurav  wrote:
> I am facing the same Issue.
>
> Code:
> p = new Person(fullName);
> Key k = KeyFactory.createKey(Person.class.getSimpleName(),
> fullName.hashCode());
> p.setKey(k);
>
> Error:
> 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.
>
> On Sep 18, 1:10 pm, Morgoth  wrote:
>
>
>
> > 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 
> > tutorialhttp://code.google.com/appengine/docs/java/datastore/creatinggettinga...
> > 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] Problem with indexes that stay in "Building" status for a long time (forever?)

2009-09-19 Thread Juan Pablo Picasso
Hi,
recently we've added an attribute to one of our persistent entities,
resulting in the following error when performing a query that involves the
new attribute:

com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching
index found.

We have an index for that entity, but it shows as "Building" in the
administrator page, and it has been like this for about an hour or so.

I've googled for this and it seems that the only way out is asking for the
indexes to be manually set to "error" state, and then perform a Vacuum using
the Python SDK (although we are using Google App Engine for Java?). Is this
correct?

For now the deployed version of our application has become unusable, plese
help!

Furthermore, is there any good practices documentation regarding this type
of issues? (ie. What to avoid or how to modify already persisted entities in
a live environment without taking down the application).

thanks, regards,
Juan

--~--~-~--~~~---~--~~
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] REAL girls video chat

2009-09-19 Thread Maria Mersi

Seeking a girl for chatting, flirting or something more? Maybe a
boy? :) Millions participants waiting for you in the sex chat. Find a
friend in Your city!

http://childrensbikesonline.co.uk/users
--~--~-~--~~~---~--~~
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 indexes that stay in "Building" status for a long time (forever?)

2009-09-19 Thread dflorey

It can take up to 24 hours. I've experienced slow index creation as
well in the last days or so.

On 19 Sep., 15:02, Juan Pablo Picasso 
wrote:
> Hi,
> recently we've added an attribute to one of our persistent entities,
> resulting in the following error when performing a query that involves the
> new attribute:
>
> com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching
> index found.
>
> We have an index for that entity, but it shows as "Building" in the
> administrator page, and it has been like this for about an hour or so.
>
> I've googled for this and it seems that the only way out is asking for the
> indexes to be manually set to "error" state, and then perform a Vacuum using
> the Python SDK (although we are using Google App Engine for Java?). Is this
> correct?
>
> For now the deployed version of our application has become unusable, plese
> help!
>
> Furthermore, is there any good practices documentation regarding this type
> of issues? (ie. What to avoid or how to modify already persisted entities in
> a live environment without taking down the application).
>
> thanks, regards,
> Juan
--~--~-~--~~~---~--~~
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] JDO : How to make an unowned reference to an entity if we don't know its key yet ?

2009-09-19 Thread mlenormand

Hi Everybody,

Here's my problem with JDO and unowned relationships :

I have several entities of the same kind that are organized in a
hierarchical way, maintained with unowned relationships.
JDO can generate keys for my entities when they are written to the
datastore, but with this option, I can't know my entity's keys until
they are saved to the datastore. If I want to make a reference to an
entity A from an entity B, it seems to be impossible because at this
time I don't know A's key, that will be generated when transaction is
committed.

One solution would be to use several transactions, each one would
persist an entity, but it's not good because I want to persist all the
entities in the same transaction.

I know that defining keys myself could solve the problem, but maybe
there is an other solution that would be better ?

Thank you for your help. And thank you to the GAE team for the
fantastic work you did !
--~--~-~--~~~---~--~~
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-19 Thread Ian Marshall

I refer to the section "Java | Storing Data | Creating, Getting and
Deleting Data | Keys" in the GAE documentation. What it says is that
for any key type that your persistent entity class uses, keys (or key
elements) of type String can be set by the app, but that for type Long
the datastore sets this and the app cannot:

"The app can provide the ID portion of the key as a string when the
object is created, or it can allow the datastore to generate a numeric
ID automatically."

This should explain your exceptions:

"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."

You are now using a String, which is allowed for your key.
--~--~-~--~~~---~--~~
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] Basic auth with GAE

2009-09-19 Thread Vik
Hie
I have requirement to post a request with BASIC AUTH but today when i tried
to use BASE64Decoder it said GAE does not support this.
So, how can i do a form post with basic auth in GAE?


Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com

--~--~-~--~~~---~--~~
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] How-to view stack dumps in GAE

2009-09-19 Thread Diana Cruise

What does GAE do with standard dumps such as e.printStackTrace()?
Here is the Admin Console Log output in DEBUG mode for my test:

I 09-19 08:14AM 54.605 [app1-widget/1.336449820535414591].:
hello, testMode=false
I 09-19 08:14AM 54.605 org.apache.jsp.test_jsp _jspService: hello2
I 09-19 08:14AM 54.606 [app1-widget/1.336449820535414591].:
hello3

The output above comes from the code snippet below which tests Stdout,
Logger, and then a forced stack dump.  As you can see the stack dump
identified with the message "hello4" is NOT in the log output above.
How do I view this stack dump in GAE?

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.*,
widget.presentation.common.*"
%>
<%
try {
  UserSession userSess = UserSession.get(session, request, response);
  System.out.println("hello, testMode=" + userSess.isTestMode());
  java.util.logging.Logger logger = java.util.logging.Logger.getLogger
("widget");
  logger.log(java.util.logging.Level.INFO, "hello2");
  userSess.logInfo("hello3");
  if (true) throw new Exception("hello4");
%>





...

<%
} catch (Exception e) { e.printStackTrace(); }
%>

--~--~-~--~~~---~--~~
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: JDO : How to make an unowned reference to an entity if we don't know its key yet ?

2009-09-19 Thread objectuser

Because your relationships are unowned (so the objects are in
different entity groups, right?), you wouldn't be able to save them
all in the same transaction anyway.

So you're right: you'll have to save them, which means multiple
transactions, and if one of them fails you'll have inconsistent data.

On Sep 19, 8:47 am, mlenormand  wrote:
> Hi Everybody,
>
> Here's my problem with JDO and unowned relationships :
>
> I have several entities of the same kind that are organized in a
> hierarchical way, maintained with unowned relationships.
> JDO can generate keys for my entities when they are written to the
> datastore, but with this option, I can't know my entity's keys until
> they are saved to the datastore. If I want to make a reference to an
> entity A from an entity B, it seems to be impossible because at this
> time I don't know A's key, that will be generated when transaction is
> committed.
>
> One solution would be to use several transactions, each one would
> persist an entity, but it's not good because I want to persist all the
> entities in the same transaction.
>
> I know that defining keys myself could solve the problem, but maybe
> there is an other solution that would be better ?
>
> Thank you for your help. And thank you to the GAE team for the
> fantastic work you did !
--~--~-~--~~~---~--~~
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: JDO : How to make an unowned reference to an entity if we don't know its key yet ?

2009-09-19 Thread mlenormand

All the entities we are talking about are in the SAME entity group in
order to create/update them in the same transaction. In addition to
that, we declare an unowned relationship, using "Key" for example. I
want to save all my entities in the same transaction.

On Sep 19, 5:52 pm, objectuser  wrote:
> Because your relationships are unowned (so the objects are in
> different entity groups, right?), you wouldn't be able to save them
> all in the same transaction anyway.
>
> So you're right: you'll have to save them, which means multiple
> transactions, and if one of them fails you'll have inconsistent data.
>
> On Sep 19, 8:47 am, mlenormand  wrote:
>
>
>
> > Hi Everybody,
>
> > Here's my problem with JDO and unowned relationships :
>
> > I have several entities of the same kind that are organized in a
> > hierarchical way, maintained with unowned relationships.
> > JDO can generate keys for my entities when they are written to the
> > datastore, but with this option, I can't know my entity's keys until
> > they are saved to the datastore. If I want to make a reference to an
> > entity A from an entity B, it seems to be impossible because at this
> > time I don't know A's key, that will be generated when transaction is
> > committed.
>
> > One solution would be to use several transactions, each one would
> > persist an entity, but it's not good because I want to persist all the
> > entities in the same transaction.
>
> > I know that defining keys myself could solve the problem, but maybe
> > there is an other solution that would be better ?
>
> > Thank you for your help. And thank you to the GAE team for the
> > fantastic work you did !
--~--~-~--~~~---~--~~
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: when will BigDecimal be supported in datastore?

2009-09-19 Thread Clay Lenhart

One option is to store the values as a Long in the datastore and have
the value represent cents not dollars (or pence not pounds)

-Clay

On Sep 19, 3:16 am, king  wrote:
> 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: JDO : How to make an unowned reference to an entity if we don't know its key yet ?

2009-09-19 Thread Diana Cruise

Now I'm confused...I thought an "unowned" relation was defined as
being outside the Entity Group?

If I have entity A and entity B who are both related to each other via
entity C, I was under the impression that we had to decide whether C
would be part of A's group or B's group, but NOT could not all be in 1
group.  Perhaps that is a JDO limitation and you are using the lower
level API?

For the sake of my discussion I'll assume A "owns" C and B has
"unowned" relation with C.  According to Max Ross from the Google GAE
Persistence Video, I am under the impression that we should
denormalize data in order that the application get around the absence
of Join capability.  So the many-to-many entity C would contain extra
data for each FK to A and B such that, for example, if the application
is querying C based a particular A.key...then each record found will
already contain fields from B instead of just having the key only (ie
C.keyB).  Otherwise, for each row the app would have to turn around
and query B by primaryKey...hence encurring much overhead.

Have I interpreted this fashion of persistence handling correctly as
you understand it?  Are you using this same denormalization in your
designs?

On Sep 19, 11:08 am, mlenormand  wrote:
> All the entities we are talking about are in the SAME entity group in
> order to create/update them in the same transaction. In addition to
> that, we declare an unowned relationship, using "Key" for example. I
> want to save all my entities in the same transaction.
>
> On Sep 19, 5:52 pm, objectuser  wrote:
>
>
>
> > Because your relationships are unowned (so the objects are in
> > different entity groups, right?), you wouldn't be able to save them
> > all in the same transaction anyway.
>
> > So you're right: you'll have to save them, which means multiple
> > transactions, and if one of them fails you'll have inconsistent data.
>
> > On Sep 19, 8:47 am, mlenormand  wrote:
>
> > > Hi Everybody,
>
> > > Here's my problem with JDO and unowned relationships :
>
> > > I have several entities of the same kind that are organized in a
> > > hierarchical way, maintained with unowned relationships.
> > > JDO can generate keys for my entities when they are written to the
> > > datastore, but with this option, I can't know my entity's keys until
> > > they are saved to the datastore. If I want to make a reference to an
> > > entity A from an entity B, it seems to be impossible because at this
> > > time I don't know A's key, that will be generated when transaction is
> > > committed.
>
> > > One solution would be to use several transactions, each one would
> > > persist an entity, but it's not good because I want to persist all the
> > > entities in the same transaction.
>
> > > I know that defining keys myself could solve the problem, but maybe
> > > there is an other solution that would be better ?
>
> > > Thank you for your help. And thank you to the GAE team for the
> > > fantastic work you did !- 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: JDO : How to make an unowned reference to an entity if we don't know its key yet ?

2009-09-19 Thread objectuser

Interesting.  If they're all in the same entity group, how about you
save the group without the keys set, then set the keys and save again,
all in the same transaction?

On Sep 19, 11:08 am, mlenormand  wrote:
> All the entities we are talking about are in the SAME entity group in
> order to create/update them in the same transaction. In addition to
> that, we declare an unowned relationship, using "Key" for example. I
> want to save all my entities in the same transaction.
>
> On Sep 19, 5:52 pm, objectuser  wrote:
>
> > Because your relationships are unowned (so the objects are in
> > different entity groups, right?), you wouldn't be able to save them
> > all in the same transaction anyway.
>
> > So you're right: you'll have to save them, which means multiple
> > transactions, and if one of them fails you'll have inconsistent data.
>
> > On Sep 19, 8:47 am, mlenormand  wrote:
>
> > > Hi Everybody,
>
> > > Here's my problem with JDO and unowned relationships :
>
> > > I have several entities of the same kind that are organized in a
> > > hierarchical way, maintained with unowned relationships.
> > > JDO can generate keys for my entities when they are written to the
> > > datastore, but with this option, I can't know my entity's keys until
> > > they are saved to the datastore. If I want to make a reference to an
> > > entity A from an entity B, it seems to be impossible because at this
> > > time I don't know A's key, that will be generated when transaction is
> > > committed.
>
> > > One solution would be to use several transactions, each one would
> > > persist an entity, but it's not good because I want to persist all the
> > > entities in the same transaction.
>
> > > I know that defining keys myself could solve the problem, but maybe
> > > there is an other solution that would be better ?
>
> > > Thank you for your help. And thank you to the GAE team for the
> > > fantastic work you did !
--~--~-~--~~~---~--~~
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: Owned One-to-One Relationship and Owned One-to-Many Relationship aren't compatible

2009-09-19 Thread objectuser

Jason, is it also true that you can't have two one-to-one
relationships of the same kind?  I'm able to save such a relationship,
but when I fetch it, I get the same child in both values.  I need to
debug further (would not be surprised if it's just something I'm doing
wrong), but wondering if it's just a known issue.

On Sep 17, 4:12 pm, "Jason (Google)"  wrote:
> This is a known issue. At present, you can't have both a one-to-one and
> one-to-many relationship of the same kind.
> - Jason
>
> On Tue, Sep 15, 2009 at 2:57 PM, Tim  wrote:
>
> > It appears that these two statements work individually but not
> > together.
>
> >   �...@persistent
> >    private ContactInfo        manager;
> >   �...@persistent
> >    private List  staff = new ArrayList();
>
> > Change either @Persistent to @NotPersistent and the unit test
> > succeeds.
>
> > SDK: appengine-java-sdk-1.2.5
>
> > ** Stack Trace
> > ***
>
> > java.lang.ClassCastException: oid is not instanceof
> > javax.jdo.identity.ObjectIdentity
> >        at roster.ContactInfo.jdoCopyKeyFieldsFromObjectId(ContactInfo.java)
> >        at
>
> > org.datanucleus.store.mapped.mapping.PersistenceCapableMapping.setObjectAsValue
> > (PersistenceCapableMapping.java:657)
> >        at
> > org.datanucleus.store.mapped.mapping.PersistenceCapableMapping.setObject
> > (PersistenceCapableMapping.java:364)
> >        at org.datanucleus.store.appengine.DatastoreRelationFieldManager
> > $1.setObjectViaMapping(DatastoreRelationFieldManager.java:132)
> >        at org.datanucleus.store.appengine.DatastoreRelationFieldManager
> > $1.apply(DatastoreRelationFieldManager.java:108)
> >        at
>
> > org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations
> > (DatastoreRelationFieldManager.java:80)
> >        at
> > org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations
> > (DatastoreFieldManager.java:795)
> >        at
>
> > org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPostProcess
> > (DatastorePersistenceHandler.java:288)
> >        at
> > org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects
> > (DatastorePersistenceHandler.java:241)
> >        at
> > org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject
> > (DatastorePersistenceHandler.java:225)
> >        at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent
> > (JDOStateManagerImpl.java:3185)
> >        at org.datanucleus.state.JDOStateManagerImpl.makePersistent
> > (JDOStateManagerImpl.java:3161)
> >        at org.datanucleus.ObjectManagerImpl.persistObjectInternal
> > (ObjectManagerImpl.java:1298)
> >        at org.datanucleus.ObjectManagerImpl.persistObject
> > (ObjectManagerImpl.java:1175)
> >        at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent
> > (JDOPersistenceManager.java:669)
> >        at org.datanucleus.jdo.JDOPersistenceManager.makePersistent
> > (JDOPersistenceManager.java:694)
> >        at
> > testing.TestContactInfo.testTwoRelationShips(TestContactInfo.java:
> > 75)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at junit.framework.TestCase.runTest(TestCase.java:164)
> >        at junit.framework.TestCase.runBare(TestCase.java:130)
> >        at junit.framework.TestResult$1.protect(TestResult.java:106)
> >        at junit.framework.TestResult.runProtected(TestResult.java:124)
> >        at junit.framework.TestResult.run(TestResult.java:109)
> >        at junit.framework.TestCase.run(TestCase.java:120)
> >        at
> > org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run
> > (JUnit3TestReference.java:130)
> >        at org.eclipse.jdt.internal.junit.runner.TestExecution.run
> > (TestExecution.java:38)
> >        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
> > (RemoteTestRunner.java:467)
> >        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
> > (RemoteTestRunner.java:683)
> >        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
> > (RemoteTestRunner.java:390)
> >        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
> > (RemoteTestRunner.java:197)
> > *ContactInfo.java *
> > import javax.jdo.annotations.IdGeneratorStrategy;
> > import javax.jdo.annotations.IdentityType;
> > import javax.jdo.annotations.PersistenceCapable;
> > import javax.jdo.annotations.Persistent;
> > import javax.jdo.annotations.PrimaryKey;
>
> > import com.google.appengine.api.datastore.Key;
>
> > @PersistenceCapable(identityType = IdentityType.APPLICATION)
> > public class ContactInfo {
>
> >   �...@primarykey
> >   �.

[appengine-java] Re: JDO : How to make an unowned reference to an entity if we don't know its key yet ?

2009-09-19 Thread Diana Cruise

Seems I read you can only perform a Save on a particular Entity once
during a transaction...the 2nd would fail.  In my scenario above, A
and B are in different Entity Groups.  So, are your designs in
agreement with the Max Ross principle as I have described above?
Obviously, this A, B, C relation would be common to most any app.

On Sep 19, 12:29 pm, objectuser  wrote:
> Interesting.  If they're all in the same entity group, how about you
> save the group without the keys set, then set the keys and save again,
> all in the same transaction?
>
> On Sep 19, 11:08 am, mlenormand  wrote:
>
>
>
> > All the entities we are talking about are in the SAME entity group in
> > order to create/update them in the same transaction. In addition to
> > that, we declare an unowned relationship, using "Key" for example. I
> > want to save all my entities in the same transaction.
>
> > On Sep 19, 5:52 pm, objectuser  wrote:
>
> > > Because your relationships are unowned (so the objects are in
> > > different entity groups, right?), you wouldn't be able to save them
> > > all in the same transaction anyway.
>
> > > So you're right: you'll have to save them, which means multiple
> > > transactions, and if one of them fails you'll have inconsistent data.
>
> > > On Sep 19, 8:47 am, mlenormand  wrote:
>
> > > > Hi Everybody,
>
> > > > Here's my problem with JDO and unowned relationships :
>
> > > > I have several entities of the same kind that are organized in a
> > > > hierarchical way, maintained with unowned relationships.
> > > > JDO can generate keys for my entities when they are written to the
> > > > datastore, but with this option, I can't know my entity's keys until
> > > > they are saved to the datastore. If I want to make a reference to an
> > > > entity A from an entity B, it seems to be impossible because at this
> > > > time I don't know A's key, that will be generated when transaction is
> > > > committed.
>
> > > > One solution would be to use several transactions, each one would
> > > > persist an entity, but it's not good because I want to persist all the
> > > > entities in the same transaction.
>
> > > > I know that defining keys myself could solve the problem, but maybe
> > > > there is an other solution that would be better ?
>
> > > > Thank you for your help. And thank you to the GAE team for the
> > > > fantastic work you did !- 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: Problem with indexes that stay in "Building" status for a long time (forever?)

2009-09-19 Thread Juan Pablo Picasso
Hi, thanks for your reply,
do you know if there's any way to speed that up? because our application
will be unusable until that index is ready
Did you perform the "vacuum" or anything like that?

On Sat, Sep 19, 2009 at 10:28 AM, dflorey  wrote:

>
> It can take up to 24 hours. I've experienced slow index creation as
> well in the last days or so.
>
> On 19 Sep., 15:02, Juan Pablo Picasso 
> wrote:
> > Hi,
> > recently we've added an attribute to one of our persistent entities,
> > resulting in the following error when performing a query that involves
> the
> > new attribute:
> >
> > com.google.appengine.api.datastore.DatastoreNeedIndexException: no
> matching
> > index found.
> >
> > We have an index for that entity, but it shows as "Building" in the
> > administrator page, and it has been like this for about an hour or so.
> >
> > I've googled for this and it seems that the only way out is asking for
> the
> > indexes to be manually set to "error" state, and then perform a Vacuum
> using
> > the Python SDK (although we are using Google App Engine for Java?). Is
> this
> > correct?
> >
> > For now the deployed version of our application has become unusable,
> plese
> > help!
> >
> > Furthermore, is there any good practices documentation regarding this
> type
> > of issues? (ie. What to avoid or how to modify already persisted entities
> in
> > a live environment without taking down the application).
> >
> > thanks, regards,
> > Juan
> >
>

--~--~-~--~~~---~--~~
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] OSWorkflow: does it play?

2009-09-19 Thread Dipu

Has anyone tried OSWorkflow?

Thanks.

Iqbal Yusuf Dipu
--~--~-~--~~~---~--~~
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] Error 500 uploading index definitions

2009-09-19 Thread WSouza

Hello,

I am trying to update my application and it shows the following error:
Uploading index definitions.
java.io.IOException: Error posting to URL:
http://appengine.google.com/api/datastore/index/add?app_id=footbattle&version=1&;
500 Internal Server Error


It was working until now, and the datastore-indexes.xml wasn't
modified since last update that worked. From what I read on previous
posts, it seems it is related to a problem with GAE reporting that my
indexes quota is over limit, what is not true (it seems ok on Quota
Details too, everything is at 0%, except CPU Time and deployments that
are at 6%). How can I fix that?


And, is there a way to do a vacuum indexes in a java application? Or
just for python?

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: when will BigDecimal be supported in datastore?

2009-09-19 Thread king

thanks Clay, that's exactly what I am doing now, but that approach
takes extra processing cycle, it would be great if GAE can support
bigdecimal intrinsically.

On Sep 19, 9:20 am, Clay Lenhart  wrote:
> One option is to store the values as a Long in the datastore and have
> the value represent cents not dollars (or pence not pounds)
>
> -Clay
>
> On Sep 19, 3:16 am, king  wrote:
>
>
>
> > I want to manipulate currency in GAE.  The datastore data type spec
> > doesn't haveBigDecimal.  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: when will BigDecimal be supported in datastore?

2009-09-19 Thread Max Ross
The datastore supports a Double type and we have no plans to support
anything more precise.  If you need more precision then I'm afraid you'll
need to manage it yourself.

Max

On Sat, Sep 19, 2009 at 1:59 PM, king  wrote:

>
> thanks Clay, that's exactly what I am doing now, but that approach
> takes extra processing cycle, it would be great if GAE can support
> bigdecimal intrinsically.
>
> On Sep 19, 9:20 am, Clay Lenhart  wrote:
> > One option is to store the values as a Long in the datastore and have
> > the value represent cents not dollars (or pence not pounds)
> >
> > -Clay
> >
> > On Sep 19, 3:16 am, king  wrote:
> >
> >
> >
> > > I want to manipulate currency in GAE.  The datastore data type spec
> > > doesn't haveBigDecimal.  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] Error 500 deployment

2009-09-19 Thread sproooooz

I can not deploy my app anymoreusually when it happens I reboot my
computer and it s okbut today it does not work..

Here is the message I got:

Unable to upload:
java.io.IOException: Error posting to URL:
http://appengine.google.com/api/datastore/index/add?app_id=MYAPP&version=1&;
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:81)
at com.google.appengine.tools.admin.AppVersionUpload.send
(AppVersionUpload.java:429)
at com.google.appengine.tools.admin.AppVersionUpload.updateIndexes
(AppVersionUpload.java:144)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
(AppVersionUpload.java:120)
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)


thaks for any 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: Error 500 deployment

2009-09-19 Thread Max Ross
We've been troubleshooting some index issues.  Can you try one more time?

Thanks,
Max

On Sat, Sep 19, 2009 at 3:14 PM, sproz wrote:

>
> I can not deploy my app anymoreusually when it happens I reboot my
> computer and it s okbut today it does not work..
>
> Here is the message I got:
>
> Unable to upload:
> java.io.IOException: Error posting to URL:
> http://appengine.google.com/api/datastore/index/add?app_id=MYAPP&version=1&;
> 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:81)
>at com.google.appengine.tools.admin.AppVersionUpload.send
> (AppVersionUpload.java:429)
>at com.google.appengine.tools.admin.AppVersionUpload.updateIndexes
> (AppVersionUpload.java:144)
>at com.google.appengine.tools.admin.AppVersionUpload.doUpload
> (AppVersionUpload.java:120)
>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)
>
>
> thaks for any 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: date between jdo query

2009-09-19 Thread bcottam

Steve,

yes, that makes a little sense.
is this in production that you are seeing this error?  'cause on your
local machine it should just suggest an appropriate index for such a
query.
just to make sure, the second parameter is a strictly equals
predicate, as you have it in your previous message, not an in-equality
predicate, right?

I don't know if you've seen it before, but this video from the Google
IO conference that talks about the inner storage of BigTable is very
helpful in understanding what is going on under the hood.  It's really
effected how i've designed my data model:
http://www.youtube.com/watch?v=tx5gdoNpcZM

I believe what is happening is that BigTable is sorting your data on
your date (or at least using an index that is sorting on your date)
and once it narrows down the entities that match your date predicate,
it doesn't know where to find the "field1" parameter ('cause it needs
to have that indexed along with your date field).

Of course, I don't have any of the code for your model or queries so I
may be way off base  :)  but that's what it sounds like to me.

so, I'd try first making sure you can do the query you are trying to
do on your local system, then if that succeeds, I'd make sure that
your datastore-indexs.xml is consistent between your local and
production environments.

hope that helps!
-bryce



On Sep 18, 12:47 pm, sprz  wrote:
> 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] How to delete data?

2009-09-19 Thread ??

How to delete data from GAE for Java?

I have tried:

1) logging into the app engine admin, going to do some GQL
--> fail, don't know the syntax
2) searching for information on GQL regarding DELETE
--> fail, can't find any syntax for delete, don't know if it can even
do it
3) writing Query query = pm.newQuery(MyTerriblyUnscalableThing.class);
query.deletePersistentAll();
--> fail, some error about timing out (are you kidding me? yes this is
real scale.)
4) writing Query query = pm.newQuery(Person.class);
query.setFilter("Id > 0");
query.deletePersistentAll();
--> fail, cannot be zero or something
5) writing Query query = pm.newQuery(Person.class);
query.setFilter("timestamp == 0");
--> fail, String cast to Long or something (guess I am too dumb)
6) search Google internet
--> fail, signal noise ratio is asymzero
7) search Google forums
--> fail, huh?

Can anyone explain to me how to do the equivalent of a DROP TABLE in
GAE for Java?
Yes I know it is not a table, I am just trying to remove all the
entities of a specific class.
Am I missing something?
--~--~-~--~~~---~--~~
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] How to location my service in Unit testing?

2009-09-19 Thread Donny

Hi,  I have a problem on locating my service in unit testing.

I tried to follow the guide 
http://code.google.com/appengine/docs/java/howto/unittesting.html
the sample code in guide to locate mail service is ok, but I cann't
configure out how to location my own service.
As I am using eclipse, the created project has a greeting service, how
can I locate it? Neither using url, like "/myproject/greet" or class
name works.

Can anybody help? TIA.


--~--~-~--~~~---~--~~
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-19 Thread Tristan

I agree with this! Additionally, it'd be great to be able turn
manualtaskexecution on/off from the admin console.

-Tristan

On Sep 8, 4:07 pm, Vince Bonfanti  wrote:
> Being able to examine thetaskqueue, and release tasks manually--and
> in different order than they were queued--is proving quite valuable.
> It would be nice to keep this as an option when you add automatic
> execution.
>
> Vince
>
> On Tue, Sep 8, 2009 at 2:42 PM, Max Ross wrote:
> > Interesting.  We were planning on getting rid of manualtaskexecution so
> > that dev would completely match prod, but if your experience is shared by
> > others it sounds like we should consider leaving the door open for manual
> >taskexecution as well.
>
> > Thanks,
> > Max
>
> > On Mon, Sep 7, 2009 at 8:52 AM, Vince Bonfanti  wrote:
>
> >> Perfect! At least for initial debugging, that's actually better than
> >> having the tasks execute automatically--it makes it easier to see
> >> what's going on with multiple tasks being queued.
>
> >> Thanks.
>
> >> On Sun, Sep 6, 2009 at 7:05 PM, Max Ross wrote:
> >> > Hi Vince,
>
> >> > In order to get thetaskqueue 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 thetask
> >> > 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
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---