[appengine-java] Any best practice of bulk update in JPA ?

2010-01-19 Thread Alan She
Assume I have two class A and B, which is unidirection unowned many to one relationship. (A * > 1 B) I store the Key of class B inside class A. The code looks like this, (I am using JPA) @Entity public class A { @Enumerated private Key bKey; } @Entity public class B { } Both A and B

[appengine-java] Forwarding to Blobstore URL from existing servlet

2010-01-19 Thread akochnev
I'm trying to set up a file upload in my application based on SwfUploader (http://swfupload.org), and I'm coming to my wits end about how to proceed. I use Tapestry5 for my application (http:// tapestry.apache.org/tapestry5.1) but I think for the most part that's beside the point. First, I create

[appengine-java] Re: List of embedded class objects in default fetch group

2010-01-19 Thread aschearer
I believe you are missing the @Embedded annotation on your list in the parent class. That said, I'm finding that adding the @Embedded annotation to the list will lead data nucleus to throw an exception. At this point I'm not sure how to have a list of embedded objects. On Dec 27 2009, 4:16 pm, and

Re: [appengine-java] access denied

2010-01-19 Thread Don Schwarz
Please post the full stack trace. 2010/1/19 Andrés Cerezo > I'm deploying my application in appengine but I have a problem: > > 1. In host mode all is ok. > 2. However when I deploy my application a I get this error: > > java.security.AccessControlException: access denied > (java.lang.RuntimePer

Re: [appengine-java] Using Restlet to access datastore.

2010-01-19 Thread Jeff Schnitzer
Entities persisted with Objectify can be serialized in their entirety (including keys) through GWT-RPC, so I'd be surprised if you had any trouble using them with Restlet. I have a number of times rendered entity objects directly to JSON with JAX-RS, although there's no reason you couldn't do that

[appengine-java] access denied

2010-01-19 Thread Andrés Cerezo
I'm deploying my application in appengine but I have a problem: 1. In host mode all is ok. 2. However when I deploy my application a I get this error: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers) Anyone can help me? Thanks. -- You rec

Re: [appengine-java] Re: Deleting unused indices

2010-01-19 Thread seleronm
Hi, Incidentally, I isuue list http://code.google.com/p/googleappengine/issues/detail?id=1893 link that is also listed in the http://groups.google.com/group/google-appengine-java/browse_thread/thread/c8a7888438efeb9/cdbaeb27befcfd75 vacuum_indexes I think that the steps listed. Please try tha

Re: [appengine-java] Using a Key in a query filter

2010-01-19 Thread Ikai L (Google)
Max Ross just posted a blog post about this: http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html It sounds like you are enforcing the uniqueness constraint by encoding it as a Key -

Re: [appengine-java] junit test fails, then works with no code change.

2010-01-19 Thread Ikai L (Google)
Can you post some code? It'd be helpful to see what you're doing. On Fri, Jan 15, 2010 at 1:01 PM, Sector7B wrote: > Hi, > > I have some unit tests to test my dao. Just starting out. So I have > simple tests that do crud operations. findbyid, delete, update, etc. > > In testCreate i create an

Re: [appengine-java] Using Restlet to access datastore.

2010-01-19 Thread Ikai L (Google)
As far as I know, there isn't a native Restlet API for datastore access. One more way to access the datastore is using the low-level API: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary.html

Re: [appengine-java] Unable to open DataViewer

2010-01-19 Thread Ikai L (Google)
Hi there, 1. We've heard some reports related to browser cache. Try using shift-refresh on your browser or delete your cache. 2. You are not guaranteed that the ID will be sequential (1, 2, 3, 4, etc), just that it will be unique. A large reason of why this is has to do with the distributed nature

Re: [appengine-java] EntityProto and Property documentation

2010-01-19 Thread Ikai L (Google)
If you're looking to use hooks but don't want to fuss with the low-level API, Max Ross posted a great article about hooks at the JDO/JPA layer: http://gae-java-persistence.blogspot.com/2009/11/case-insensitive-queries.html

[appengine-java] One to many sample application needed on GWT

2010-01-19 Thread Dave
I have been working assiduously on a GWT project. I have implemented the stockwatcher app without problems. It's new to me to be working with JDO/JPA. I'm more in tuned to using relational DB. There are no concrete application example that deals with one to many DB. I have read some of the document

[appengine-java] Re: Memcache question

2010-01-19 Thread Andrei
Thanks Than i do not see reason why i have to code it instead of beeing able to set from admin web console which data to memcache and for how long On Jan 19, 3:24 pm, "Ikai L (Google)" wrote: > Andrei, > > No, this is fundamentally impossible with Memcache. Memcache values are > lazily expired at

Re: [appengine-java] Re: Serious datastore problem

2010-01-19 Thread John Patterson
You shouldn't need to do it again unless you change a property from unindexed to indexed. Doing so will not update the implicit index (i.e. single property index) and so any custom indexes you define will also not include it. But I remember one of the Google engineers looking into a possi

[appengine-java] Re: equal rights for Java URLFetch

2010-01-19 Thread Locke
Thanks, this is great. I would be happy to help beta-test this. I'll contact you via email. > each request is limited to 10 simultaneous API calls. I see no limit of "simultaneous [urlfetch] API calls" documented on the quotas page ( http://code.google.com/appengine/docs/quotas.html ). I only see

[appengine-java] Re: Serious datastore problem

2010-01-19 Thread Max
Thanks John. It worked. Is there other way to re-create index then re-insert 5 million entities each time we detect problem? We may add more indexes later. Should we re-insert everything again? Here is BeanShell script that re-inserts 500 record (5 second) per request import java.util.Itera

Re: [appengine-java] Re: Memcache question

2010-01-19 Thread Ikai L (Google)
Andrei, No, this is fundamentally impossible with Memcache. Memcache values are lazily expired at GET time. When you set an expiration on a Memcache item, all you are really doing is telling Memcache to look at that timestamp whenever a read operation takes place, throwing it away if it's past the

Re: [appengine-java] Re: Deleting unused indices

2010-01-19 Thread John Patterson
On 20 Jan 2010, at 03:14, George Moschovitis wrote: On Jan 19, 3:19 pm, John Patterson wrote: You need to download the python sdk and use appcfg.py on your Java app. I am on a mac and after downloading the sdk I ran the AppEngineLanucher and created a new app with my Java app's id then I

Re: [appengine-java] Re: Communication between multiple applications

2010-01-19 Thread Timothy Spear
I am using GraniteDS for communication from the GAE/J server to a Flex/ Flash front end. GraniteDS is opensource and supports push based messaging (I have not tested that aspect). Good luck. Tim Sent from my iPhone On Jan 19, 2010, at 2:48 PM, A1programmer wrote: Jason, Sorry for tak

[appengine-java] Re: Deleting unused indices

2010-01-19 Thread George Moschovitis
On Jan 19, 3:19 pm, John Patterson wrote: > You need to download the python sdk and use appcfg.py on your Java app. > > I am on a mac and after downloading the sdk I ran the   > AppEngineLanucher and created a new app with my Java app's id > > then I ran appcfg.py vacuum_indexes /path/to/dummy_p

[appengine-java] Re: Communication between multiple applications

2010-01-19 Thread A1programmer
Jason, Sorry for taking so long to get back to you. That is good to hear. B.t.w, I have noticed that only a few of the quota item prices are available, (i.e. not all are listed) such as the number of email attachments, etc. Does this mean that extra quota allotment for these items is not availab

[appengine-java] Re: JDO doesn't save every modification

2010-01-19 Thread Bert Peters
The type returned is "class java.util.ArrayList". Is there a possible way to fix this? On Jan 19, 8:30 pm, datanucleus wrote: > Look in the log (at DEBUG level) and see if the List field is replaced > by a wrapper type when you retrieve the overall object from the > datastore. Alternatively, prin

[appengine-java] Re: JDO doesn't save every modification

2010-01-19 Thread datanucleus
Look in the log (at DEBUG level) and see if the List field is replaced by a wrapper type when you retrieve the overall object from the datastore. Alternatively, print out the getClass() of the List object before your update. If it isn't of type "org.datanucleus.sco." then the error is in GAE/J

[appengine-java] Re: JDO doesn't save every modification

2010-01-19 Thread Bert Peters
Ok, here is the rest. Sorry about the bad problem definition: Basically, it's like this. (cp.base is an instance of the before mentioned Base class) Integer cb = this.base.getCurrentBuild(); cp.base.setBuildings(cb , this.base.getBuildings(cb) + 1);

Re: [appengine-java] equal rights for Java URLFetch

2010-01-19 Thread Don Schwarz
I just responded to the other thread you pinged, but I'll respond here too for completeness. I've now marked http://code.google.com/p/googleappengine/issues/detail?id=1899 as Acknowledged. It is currently on schedule to be included in the next release. If you want to help us test it out before t

[appengine-java] Re: GWT & Hibernate error

2010-01-19 Thread datanucleus
Please explain how Hibernate could possibly be used here ? That only supports persistence to RDBMS and you have no RDBMS in existence in GAE/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 goog

[appengine-java] Re: org.datanucleus.store.appengine.MetaDataValidator checkForIllegalChildField

2010-01-19 Thread datanucleus
> Bump. Could someone from Google/DataNucleus help please? Nothing to do with DataNucleus; the exception comes from Google code. Issue was raised on the GAE/J plugin to not use org.datanucleus package names. -- You received this message because you are subscribed to the Google Groups "Google App

[appengine-java] Re: JDO doesn't save every modification

2010-01-19 Thread datanucleus
Define "updates" with respect to that field. Saying you change something is one thing, but posting the code that changes that thing is a prerequisite to any comment. Obviously the log would also tell you plenty about that field, like is it replaced by a proxy/wrapper when it is read in ? -- You re

[appengine-java] Re: serious java loader problem: "Hello world" killed for latency

2010-01-19 Thread Locke
I sent you the details via email. Elsewhere, someone has said java load times average to 525ms. I don't know how many servers compose the appengine "cloud," but whatever server I'm on sure doesn't respond with that speed. I would be interested to know if there was a problem with the server I was o

[appengine-java] Re: JDO doesn't save every modification

2010-01-19 Thread Bert Peters
Then source code it is: Source for the involved class: package elemental.data; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.jdo.PersistenceManager; import javax.jdo.Query; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.Id

Re: [appengine-java] Re: Beginner question: one to many relationship

2010-01-19 Thread John Patterson
Also, be aware that if a book can have more than one author JDO-GAE has no support for either many-many or unowned relationships. In that caes you would need to use low-level Keys or a non-standard library like Twig http://code.google.com/p/twig-persist/ which does support those relations

[appengine-java] Re: org.datanucleus.store.appengine.MetaDataValidator checkForIllegalChildField

2010-01-19 Thread Sekhar
Bump. Could someone from Google/DataNucleus help please? On Jan 9, 7:31 pm, Sekhar wrote: > I'm getting a warning for an embedded child: > > org.datanucleus.store.appengine.MetaDataValidator > checkForIllegalChildField: Unable to validate relation > com.allurefx.herdspot.server.data.Person.im > >

Re: [appengine-java] Re: Error while deploying GWT application on google app engine.

2010-01-19 Thread John Patterson
I recall an error I got from cutting and pasting a config snippet from the web. There were some unusual white-space characters at the end of each line. After I deleted each new-line and hit Enter again file parsed OK. On 19 Jan 2010, at 23:06, Anton wrote: Hi there. Yeah thats a bit od

[appengine-java] GWT & Hibernate error

2010-01-19 Thread sachin
I am gettin this error when i try to run as GWT project Failed startup of context com.google.apphosting.utils.jetty.devappenginewebappcont...@102b2b6 {/,C:\code\workspaces\default\Gwtproject\war} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTempl

[appengine-java] Re: Beginner question: one to many relationship

2010-01-19 Thread Dave
I am having the same problems of how to do this. However, I do not like Jason's solution because it seems as if I would get the book data back even if I wanted the author data only. On Jan 12, 5:58 pm, "Jason (Google)" wrote: > If you're using JDO, then just as Juan said, you can fetch the author

[appengine-java] Re: Status Of Issue 1899 - Async Http Requests For Java

2010-01-19 Thread Prifl
I've actually written an asynchronous url fetcher for the java version of GAE using the proxy class. Api wise, GAE is fully ready to do asynchronous urlfetch requests, it just isn't yet exposed through an easy api. If I find the time tonight, I'll put something up on Google code. On Jan 19, 9:39 a

[appengine-java] the inappropriate encoding occured when store chinese characters to datastore

2010-01-19 Thread 凌志 许
In my project, I need to store chinese characters to datastore, but I tried using the following code to do it: PersistenceManager pm = PMF.get().getPersistenceManager(); Greeting e = new Greeting("许凌志","大家好",new Date (System.currentTimeMillis())); try { pm.makePersistent(e);

[appengine-java] Re: Error while deploying GWT application on google app engine.

2010-01-19 Thread Anton
Hi there. Yeah thats a bit odd as web.xml looks good. But there is a walk around - just make a right click on the gwt project and select "Run as -> Web Application". My gwt test app has been successfuly deployed to google app engine... On 7 янв, 12:49, reena wrote: > Hi all, > > I have simply c

Re: [appengine-java] Re: Status Of Issue 1899 - Async Http Requests For Java

2010-01-19 Thread Don Schwarz
This issue wasn't marked with the Language-Java label, so it didn't get accepted properly. I've accepted it now, and all indications are that asynchronous URLFetch support will be available in the next release. On Tue, Jan 19, 2010 at 7:35 AM, Locke wrote: > Using the TaskQueue for asynchronous

Re: [appengine-java] serious java loader problem: "Hello world" killed for latency

2010-01-19 Thread Don Schwarz
Can you respond privately with the app id you used to do this testing? Thanks, Don On Tue, Jan 19, 2010 at 8:25 AM, Locke wrote: > I was testing the load times in various languages last night, as shown > in another group: > > > http://groups.google.com/group/google-appengine/browse_thread/threa

Re: [appengine-java] Re: JDO doesn't save every modification

2010-01-19 Thread Raphael André Bauer
On Tue, Jan 19, 2010 at 4:55 PM, Bert Peters wrote: > Alright, here we go. > Somewhere in execution, 2 dates, 4 double fields and an integer list > are updated to new values. During checkup in the rest of the program, > everything seems OK. > Then, upon finish, at pm.close(), all updated variables

[appengine-java] Re: JDO doesn't save every modification

2010-01-19 Thread Bert Peters
Alright, here we go. Somewhere in execution, 2 dates, 4 double fields and an integer list are updated to new values. During checkup in the rest of the program, everything seems OK. Then, upon finish, at pm.close(), all updated variables are saved, except for the integer list. Enough information? O

Re: [appengine-java] Deploy from separated resources

2010-01-19 Thread Chau Huynh
I'm just curious how you share code among your team without using subversion? -Chau On Tue, Jan 19, 2010 at 10:38 PM, dominity wrote: > Hi, guys. > > I've got one simple question. > There is team of developers that creates any kind of web application. > Web application is hosted on GAE. Team's m

[appengine-java] Re: RESTfull - JAX-RS and GAE/J

2010-01-19 Thread Philippe Marschall
On Jan 19, 1:34 am, Jeff Schnitzer wrote: > Or you can just get rid of that trainwreck called Maven. Right. But you have the same problem if you use Ivy, Gradle, Buildr or whatever consumes POMs because it's at the metadata level. But then again avoid that too. Cheers Philippe -- You received

[appengine-java] Deploy from separated resources

2010-01-19 Thread dominity
Hi, guys. I've got one simple question. There is team of developers that creates any kind of web application. Web application is hosted on GAE. Team's members are from different locations. Any member of team can deploy new version of app. How should they behave in this situation to avoid version c

[appengine-java] Re: Serious datastore problem

2010-01-19 Thread Max
Thank you! I will try it. I how found something wrong I had ascending index and I changed it to descending index. I need both but I had only one in datastore-indexes.xml But "Datastore Indexes" is showing both as "Serving" May be I should delete index and create it again. How do I do it? Thanks,

[appengine-java] serious java loader problem: "Hello world" killed for latency

2010-01-19 Thread Locke
I was testing the load times in various languages last night, as shown in another group: http://groups.google.com/group/google-appengine/browse_thread/thread/11b2f2b425e10e38 But at one point, my Java "hello, world" servlet was killed for taking too long to respond (10 seconds seems to be the und

[appengine-java] Re: duplicated entitymanagerfactory?

2010-01-19 Thread asianCoolz
I already tried all posibilities, if i commented out from .xml i able to run without error in hosted mode and production Please comment here http://stackoverflow.com/questions/2093913/google-app-engine-compass-caused-entitymanagerfactory-error is compass bean caused the problem? -- You receive

[appengine-java] Re: Problems with sending Https request to other applications

2010-01-19 Thread Locke
AppEngine doesn't support nonstandard ports. Not even for paying customers. I understand why they limit free customers, but they went too far with limiting paying customers in this respect. On Jan 19, 1:29 am, Featheast Lee wrote: > Now I am running two applications, one is on the GAE platform an

[appengine-java] Re: Status Of Issue 1899 - Async Http Requests For Java

2010-01-19 Thread Locke
Using the TaskQueue for asynchronous URLFetch is not a good solution. It has severe limitations. It can have a maximum of 20 simultaneous calls (no matter how many users you have). And each of those calls eats into your "simultaneous dynamic request limit" of 30. On Jan 19, 3:39 am, John Patter

Re: [appengine-java] Re: Serious datastore problem

2010-01-19 Thread John Patterson
Is it possible that some of your entities in Table1 were stored when cid was declared unindexed? If so you will need to re-store them so they get indexed in the implicit cid index and also in the custom index on cid-ctime. Whether or not this was the cause of some entities not being includ

Re: [appengine-java] JDO doesn't save every modification

2010-01-19 Thread John Patterson
On 19 Jan 2010, at 19:43, Bert Peters wrote: A class, handled by some other class, saves only partial updates. I think you'll need to give a bit more context. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this gro

Re: [appengine-java] Re: Deleting unused indices

2010-01-19 Thread John Patterson
You need to download the python sdk and use appcfg.py on your Java app. I am on a mac and after downloading the sdk I ran the AppEngineLanucher and created a new app with my Java app's id then I ran appcfg.py vacuum_indexes /path/to/dummy_python_app/ ...and voila - the indexes start deleting

Re: [appengine-java] Can't have more than one @Embedded of same type JPA

2010-01-19 Thread John Patterson
The example in the docs uses the EmbeddedOnly annotation on the component class so perhaps give that a try. You should be able to embed more than one instance of the same class so this sounds like a bug. From the docs "If you have more than one field on the object whose type is an embedde

[appengine-java] Re: Serious datastore problem

2010-01-19 Thread Max
How do we to contact support? If we pay money then there must be at least email address where I can send email? Basic query does not return every second line that it should return. May be something wrong with index. Please, help On Jan 17, 3:59 pm, Max wrote: > I can't find way to report serio

[appengine-java] JDO doesn't save every modification

2010-01-19 Thread Bert Peters
I have a problem with testing my app. A class, handled by some other class, saves only partial updates. Why is this, and what could I do to prevent it? The object that is not converted is a serialized List. -- You received this message because you are subscribed to the Google Groups "Google App

[appengine-java] Re: Deleting unused indices

2010-01-19 Thread m seleron
Hi, I do not think the Java SDK version to be being offered at present. star the issue here http://code.google.com/p/googleappengine/issues/detail?id=1893 Certainly, I think that Web admin interface is also useful. thanks. On 1月19日, 午後7:36, George Moschovitis wrote: > The Python SDK provide

[appengine-java] Deleting unused indices

2010-01-19 Thread George Moschovitis
The Python SDK provides a method to delete unused indices: http://code.google.com/appengine/docs/python/tools/uploadinganapp.html#Deleting_Unused_Indexes I cannot find the equivalent in the Java SDK. Is there a way to delete unused indices? It would be great if the web admin interface provided a

Re: [appengine-java] Status Of Issue 1899 - Async Http Requests For Java

2010-01-19 Thread John Patterson
The task queue can allow you to run synchronous operations in parallel. Perhaps you could solve your problem by firing off many tasks each which fetches a url stores the result in memcache and increments a counter. From your original request keep polling the value of that counter until al

[appengine-java] Questions about JDO/JPA versioning

2010-01-19 Thread Brandon
Hi, Consider an example where class A has a "child" property of class B, and B has a property "title", as follows: @PersistenceCapable @Version(... field-name="version") Class A { protected long version; @Persistent protected B child; } @PersistenceCapable Class B { @P