Re: [appengine-java] Quiz

2011-09-29 Thread Stephen Johnson
That's easy. You are not supposed to return a value in the finally block since it overwrites any previous return values and also any exceptions that are thrown. Return statements in a finally block are a big NO-NO. Stephen CortexConnect.com On Thu, Sep 29, 2011 at 3:36 PM, gk

Re: [appengine-java] Quiz

2011-09-29 Thread Stephen Johnson
So the answer is false. Forgot to actually state that. On Thu, Sep 29, 2011 at 3:44 PM, Stephen Johnson onepagewo...@gmail.comwrote: That's easy. You are not supposed to return a value in the finally block since it overwrites any previous return values and also any exceptions that are thrown

Re: [appengine-java] Cronjob every 1 minutes executes every 2 minutes

2011-09-28 Thread Stephen Johnson
Sounds like you need to add synchronized to the schedule, thus every 1 minutes synchronized, to get it what you want to do if I'm understanding you correctly. Stephen CortexConnect.com On Wed, Sep 28, 2011 at 8:38 AM, dimi dimitri.beck...@gmail.com wrote: Hi guys, I define my cron job with

Re: [appengine-java] Cronjob every 1 minutes executes every 2 minutes

2011-09-28 Thread Stephen Johnson
Great! Glad it worked for you. On Wed, Sep 28, 2011 at 10:38 AM, dimi dimitri.beck...@gmail.com wrote: Thanks Stephen, works like a charm! I don't really understand the explanation about synchronized in the manual, so I didn't try it out. But it works,... as long as the request doesn't

Re: [appengine-java] Servlet Mapping not working as expected

2011-09-26 Thread Stephen Johnson
My guess is that Google is interpreting them as static files and Google's infrastructure is handling them before it reaches your app. So, read up on excluding static files so they aren't served up by Google's infrastructure at http://code.google.com/appengine/docs/java/config/appconfig.html Also,

Re: [appengine-java] how to set text to the com.google.appengine.api.datastore.Text in app engine

2011-08-29 Thread Stephen Johnson
Uh...perhaps you might want to say what the error is or per chance even a stack trace or should we get out the crystal ball. Stephen www.cortexconnect.com On Fri, Aug 26, 2011 at 7:27 AM, Sundi sundi...@gmail.com wrote: i am trying to append charcters to the

Re: [appengine-java] Upload attachments Google Sites

2011-08-23 Thread Stephen Johnson
A File object isn't really the file, it's a reference to the file and you can use it to get its associated metadata (permissions,size,etc.) The example Ikai is referring to creates a new file on disk which isn't allowed on AppEngine so this isn't going to work. Nicolo, perhaps you can create your

Re: [appengine-java] Re: GWT will serialize java.util.Hashet and won't serialize org.datanucleus.sco.backed.HashSet from JDO. Why?

2011-08-23 Thread Stephen Johnson
Brandon, did you try making your object transient by using the makeTransient call? Not sure if that would do the trick for you or not. Just curious. Stephen www.cortexconnect.com On Tue, Aug 23, 2011 at 2:43 PM, Brandon Donnelson branflake2...@gmail.comwrote: The workaround for GWT HashSet

Re: [appengine-java] Upload attachments Google Sites

2011-08-23 Thread Stephen Johnson
On Tue, Aug 23, 2011 at 2:42 PM, Stephen Johnson onepagewo...@gmail.comwrote: A File object isn't really the file, it's a reference to the file and you can use it to get its associated metadata (permissions,size,etc.) The example Ikai is referring to creates a new file on disk which isn't

Re: [appengine-java] Re: GWT will serialize java.util.Hashet and won't serialize org.datanucleus.sco.backed.HashSet from JDO. Why?

2011-08-23 Thread Stephen Johnson
I wasn't sure detachCopy would work but I figured makeTransient should. Glad to see detachCopy does the trick for you! On Tue, Aug 23, 2011 at 3:08 PM, Brandon Donnelson branflake2...@gmail.comwrote: Wow, that worked, your my best friend :) How I got it to work: if (j != null) {

Re: [appengine-java] Re: GWT will serialize java.util.Hashet and won't serialize org.datanucleus.sco.backed.HashSet from JDO. Why?

2011-08-23 Thread Stephen Johnson
Good to know. Not sure what all the low-level difference between the two is either but glad one of them worked. On Tue, Aug 23, 2011 at 3:19 PM, Brandon Donnelson branflake2...@gmail.comwrote: Ah, I thought they were both the same at first, so after you said that I tried pm.makeTransient(j);

Re: [appengine-java] appengine complained can't seriialize javax.faces.component.UIParameter object???

2011-08-22 Thread Stephen Johnson
Hi, The local dev stores session information in memory so you won't get the NotSerializableException on local dev because the local dev doesn't need to serialize the objects that are in the session. I think that may also be the case with glassfish and tomcat if you haven't set up a database to

Re: [appengine-java] Re: Blobstore and upload question

2011-07-28 Thread Stephen Johnson
There is a 1MB limit for entities in the datastore so if your data fits within that limit than the datastore is a good option. My app stores all its data in the datastore including videos, audio files, images, pdf's, etc. I started it before the blobstore existed. So, if your data is greater than

Re: [appengine-java] Re: Blobstore and upload question

2011-07-28 Thread Stephen Johnson
If your data is never more than 32K in size then the datastore is definitely the way to go. Way easier and simpler IMHO. On Thu, Jul 28, 2011 at 10:30 AM, GeorgeS sxoutt...@gmail.com wrote: Stephen, thanks for the information! I had started to put the text into a Datastore but somehow the

Re: [appengine-java] Server error while doing a large loop

2011-07-28 Thread Stephen Johnson
bump once it has run several times. On Thu, Jul 28, 2011 at 4:30 PM, Stephen Johnson onepagewo...@gmail.comwrote: You'll probably want to look at and test backends where you can pick your processor speed to see what kind of performance you can get. I think the front-end instances are configured

Re: [appengine-java] Why use servlets?

2011-07-11 Thread Stephen Johnson
JSP's get converted to servlets before execution, so when your using JSP's you're using servlets. Many people, myself included, use servlets for the business logic and use JSP's for the presentation (generating the html). So, in my servlets and filters I'll determine if the user is logged in, has

Re: [appengine-java] Big Entities vs Small Entities

2011-06-28 Thread Stephen Johnson
Why not use a single int or long value (depending on the number of String values) where each bit position determines if that value was modified? Bit 0 for value1, bit 1 for value2, etc. Then if you want to know if any of the values have been modified, for example, in a query then just query to see

Re: [appengine-java] Problem with using OpenSSL-generated RSA key on App Engine Java

2011-06-27 Thread Stephen Johnson
Glad you were able to solve it. On Sun, Jun 26, 2011 at 2:16 PM, Dado Colussi dado.colu...@gmail.com wrote: On 26 June 2011 11:36, Stephen Johnson onepagewo...@gmail.com wrote: If private.der is in binary format then why are you reading it in as a String using Scanner??? Because I'm

Re: [appengine-java] Problem with using OpenSSL-generated RSA key on App Engine Java

2011-06-26 Thread Stephen Johnson
If private.der is in binary format then why are you reading it in as a String using Scanner??? On Sun, Jun 26, 2011 at 8:02 AM, Dado Colussi dado.colu...@gmail.com wrote: On 25 June 2011 14:51, Stephen Johnson onepagewo...@gmail.com wrote: I'm no expert on this sort of thing, but I think you

Re: [appengine-java] Problem with using OpenSSL-generated RSA key on App Engine Java

2011-06-25 Thread Stephen Johnson
I'm no expert on this sort of thing, but I think you need to base-64 decode your string. Stephen On Fri, Jun 24, 2011 at 5:27 PM, Dado Colussi dado.colu...@gmail.com wrote: I have generated an RSA key pair with OpenSSL, and I am successfully using it in App Engine Java SDK 1.5 on Mac OS X

Re: [appengine-java] can i load web form and then submit it, after showing only form's captcha on screen?

2011-06-18 Thread Stephen Johnson
You can do it several ways. The best way IMHO is to show the form and the captcha together and they fill in the form fields and the captcha and submit both together. Or as your question implies, you want a two-step process for some reason where they fill in the form and then you show a different

Re: [appengine-java] two accounts

2011-06-18 Thread Stephen Johnson
If you set up your domain through Google Apps then remove Google Sites from the account where you set up your domain name and add App Engine to that account specifying your appengine id. I think that if you used Google Apps to add your domain then your DNS settings should be fine, but I can't

Re: [appengine-java] two accounts

2011-06-18 Thread Stephen Johnson
Log into your apps account: www.google.com/a/YOURDOMAIN.com On your dashboard remove Google Sites, then click Add More Services to add your App Engine account On Sat, Jun 18, 2011 at 2:30 PM, Steve steve.flenni...@gmail.com wrote: I like the idea of switching some settings so I can use my

Re: [appengine-java] two accounts

2011-06-18 Thread Stephen Johnson
Cool. Your welcome. On Sat, Jun 18, 2011 at 4:45 PM, Steve steve.flenni...@gmail.com wrote: Thank you.  I was able to remove the default site and add my app engine id to my new domain. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-20 Thread Stephen Johnson
, Stephen Johnson onepagewo...@gmail.com wrote: Vik, Post your code where you're creating the ByteArrayOutputStream and creating the PDF with it. It'll be more helpful then what you've posted. I'm a little concerned you still don't have this part correct since you're still using out

Re: [appengine-java] Simple Google App Engine Datastore operation taking too long: causing DeadlineExceededException/DatastoreTimeoutException

2011-05-17 Thread Stephen Johnson
I use JDO but I don't use the built in relationship handling. I manage my own relationships and use JDO just for the property/entity mapping part of it. It seems to make life a lot simpler when trying to get around these types of situations. If you can make the Orders not be children of the

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-17 Thread Stephen Johnson
);          System.out.println(Sucessfully Sent mail to All Users); Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, May 17, 2011 at 9:30 PM, Stephen Johnson onepagewo...@gmail.com wrote: Vik, Post your code where you're creating the ByteArrayOutputStream

[appengine-java] Map Reduce

2011-05-16 Thread Stephen Johnson
I have two questions on the Java version of mapreduce since the docs seem pretty sparse. 1.) Is it possible to use mapreduce over a namespace and if so, how do you configure it? 2.) Is only inputing entity keys and not the entire values supported on the Java version and if so, how do I configure

Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Stephen Johnson
Thinking out loud...What's strange about that issue (not this current one but the one from the past) and the supposed solution is that until just recently with the introduction of the threadsafe property supposedly only one request could executing at a time and you can't create your own additional

Re: [appengine-java] Simple Google App Engine Datastore operation taking too long: causing DeadlineExceededException/DatastoreTimeoutException

2011-05-16 Thread Stephen Johnson
Hi Ashley, This isn't the way I would go about structuring this if I'm understanding the way you've set up your classes. There are a few issues right away that I see. For one, if you have a couple thousand Order children under the Account parent and you call getOrders() in your addOrder() method

Re: Vs: Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Stephen Johnson
Ah, I missed the point about it being tasks and didn't realize the threadsafe only applied to user requests and not tasks. If indeed that was the case. On Mon, May 16, 2011 at 10:44 PM, Juha K juha.kosk...@gmail.com wrote: The datanucleus issue has a comment Then, when my tasks run in

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done

Re: [appengine-java] Re: how to transfer request to a different servlet ?

2011-05-15 Thread Stephen Johnson
You should be able to use the RequestDispatcher object to do what you want but you'll have to have mappings in web.xml for each of the servlets your forwarding to for instance MyGalleryApp would have mappings that all start with /MyGalleryApp/ (or something similar) so GalleryServlet would map to

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 9:56 PM, Stephen Johnson onepagewo...@gmail.comwrote: You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 10:16 PM, Stephen Johnson onepagewo...@gmail.comwrote: Hi Vik, Call toByteArray() method on ByteArrayOutputStream when finished with creating PDF and then MimeBodyPart attachment = new MimeBodyPart

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 11:15 PM, Stephen Johnson onepagewo...@gmail.comwrote: The code snippet is from the link I provided. Replace the attachmentData in the code snippet with the byte[] array returned from toByteArray(). You do not convert

Re: [appengine-java] This application does not exist (app_id=u'application-id').

2011-05-13 Thread Stephen Johnson
Uh...check your spelling. You've got vph-epr and vph-erp On Fri, May 13, 2011 at 1:23 AM, horid121 horid...@netkiller.com wrote: Hello~ When I deploy to Google App Engine, I received a error message. Error message: java.io.IOException: Error posting to URL:

Re: [appengine-java] Vs: This application does not exist (app_id=u'application-id').

2011-05-13 Thread Stephen Johnson
Uh...check your spelling. You've got vph-epr and vph-erp On Fri, May 13, 2011 at 1:55 AM, Juha K juha.kosk...@gmail.com wrote: java.io.IOException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=vph-epr version=6 *But*, it's exist now.

Re: [appengine-java] Object visibility between threads (running requests)

2011-05-13 Thread Stephen Johnson
There's no guarantee that both those threads are running on the same instance. They can be on two different machines in two different data centers. On Fri, May 13, 2011 at 5:22 AM, Samuel Erdtman sam...@erdtman.se wrote: Hi I have created an application that works fin in the eclipse app engine

Re: [appengine-java] Use Array as a query filter - possible?

2011-05-08 Thread Stephen Johnson
Yes it's possible. Make sure the property is indexed. From the data viewer you can perform the following query for example: select * from KIND where PROPERTY = NUMBER How you do it in code depends on if you're using JDO, Objectify, JPA, low-level API, etc. On Sun, May 8, 2011 at 5:14 PM,

Re: [appengine-java] Use Array as a query filter - possible?

2011-05-08 Thread Stephen Johnson
BTW, I'm assuming by Int Array you actually meant ArrayList or multi-valued equivalent. Perhaps more info is needed for your particular situation and why it seems you think it can't be done. On Sun, May 8, 2011 at 5:41 PM, Stephen Johnson onepagewo...@gmail.comwrote: Yes it's possible. Make

Re: [appengine-java] xml parsing on GAE servers acts weird

2011-05-06 Thread Stephen Johnson
You don't show what stream you're passing in so I can't comment on if that might be an issue but you should try setting namespaceAware to true like this to see if it will cause the DeferredDocumentImpl to not be used. I use code like this and works fine for me. DocumentBuilderFactory dbf =

Re: [appengine-java] Re: pdfJet issue

2011-04-29 Thread Stephen Johnson
Maybe he used a ByteArrayOutputStream instead of FileOutputStream. The getInstance method doesn't required a FileOutputStream just an OutputStream. On Thu, Apr 28, 2011 at 11:05 PM, omer yaari omerya...@gmail.com wrote: It does not work, GAE does not allow file stream to include the project

[appengine-java] Re: Datastore Stats for High Replication

2011-04-13 Thread Stephen Johnson
Hi Simon, Do your All Entities statistics actually resemble what's in your datastore. For example, about 6 days ago I deleted all entities from my HR datastore (everything). After 24 hours the datastore usage went to zero as it should since there's a typical lag of about 24 hours from what I've

Re: [appengine-java] Re: Datastore Stats for High Replication

2011-04-13 Thread Stephen Johnson
Hi Simon, Thanks for checking. I think they've been stuck for a while now. I don't know if you've noticed this either (and I'm curious to see if anyone else has or if it's just me) but I think this illustrates the difference with how Master/Slave works and HR because on never saw it on

Re: [appengine-java] Re: Sort function now throws an exception

2011-03-28 Thread Stephen Johnson
Awesome! Glad it worked! On Mon, Mar 28, 2011 at 3:14 AM, ZeroCool zero...@gmail.com wrote: Hi Stephen, Thank you very much. I modified the code according to your suggestion and it worked. On Mar 28, 8:13 am, Stephen Johnson onepagewo...@gmail.com wrote: Hi ZeroCool, I'm not sure

Re: [appengine-java] Sort function now throws an exception

2011-03-27 Thread Stephen Johnson
There have been some people that have been reporting code that was working for weeks, etc. not working in the last week or so. I'm beginning to wonder if maybe behind the scenes a switch to Java 7 or some other Java switch is occurring. In relation to your error, it looks like what I've found so

Re: [appengine-java] Sort function now throws an exception

2011-03-27 Thread Stephen Johnson
Hi ZeroCool, I'm not sure if this will help, and I don't know how the TimSort works but looking at your compare method I'm curious about this particular situation. If you have two users UserA and UserB and UserA has groupRank of 5 and Rep of 3 and UserB has groupRank of 5 and Rep of 3 Then,

Re: [appengine-java] Re: uploading 100k lines into the datastore is enough to max out the CPU time?

2011-03-08 Thread Stephen Johnson
Hi Claudio, You have 12 total fields all of which you have indexed which is the default. You have 1 key field and 11 non-key fields. This will result in 23 index entries being written for each entity. You get 1 ascending index on the key field and by default you get both an ascending and

Re: [appengine-java] Using 2 datastores in same App?

2011-02-11 Thread Stephen Johnson
You can't use two different datastores, but you can use multitenancy: http://code.google.com/appengine/docs/java/multitenancy/overview.html On Fri, Feb 11, 2011 at 9:02 AM, dudu eduardopich...@gmail.com wrote: Is it possible? If i configure two persistence providers in persistence.xml? I need

[appengine-java] Is descending index still necessary with mapreduce.

2011-02-11 Thread Stephen Johnson
Hi all, I'm wondering if the descending indexes on keys for Java is still required since the introduction of the __scatter__ property. The documentation still has: - The entity to be mapped must have a descending index on key. There is support for guessing the key range in the Python

Re: [appengine-java] Is descending index still necessary with mapreduce.

2011-02-11 Thread Stephen Johnson
Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Fri, Feb 11, 2011 at 9:12 AM, Stephen Johnson onepagewo...@gmail.com wrote: Hi all, I'm wondering if the descending indexes on keys for Java is still required since

Re: [appengine-java] when to use memcache vs static variable

2011-02-10 Thread Stephen Johnson
No, that isn't how it works. Your app executes on a number of server instances. There could be 1 instance or a 1000 instances of your application serving your users. That's why you use memcache to share that type of information. On Thu, Feb 10, 2011 at 11:35 AM, repairman alau2...@gmail.com

Re: [appengine-java] NPE at jsp:useBean with scope session

2011-02-08 Thread Stephen Johnson
Glad to help! On Tue, Feb 8, 2011 at 3:16 AM, Louis H. cute...@gmail.com wrote: Indeed, I had sessions disabled. (I missed they are disabled by default). Thanks for reply. Problem solved. -- You received this message because you are subscribed to the Google Groups Google App Engine for

Re: [appengine-java] embedded unindexed fields

2011-02-08 Thread Stephen Johnson
Yes, it seems this is a bug. I'm sure (ok 95% sure) it was working at one point because I did this exact thing in one of my kinds and I'm sure I tested to make sure the fields weren't indexed because it has a lot of properties and I don't want them indexed. I just looked and yes the fields are

Re: [appengine-java] NPE at jsp:useBean with scope session

2011-02-07 Thread Stephen Johnson
Do you have sessions enabled for your application? On Mon, Feb 7, 2011 at 5:39 AM, Louis H. cute...@gmail.com wrote: Hi, I am trying jsp form handling via bean and I am wondering why this jsp page gives me an NPE after submitting. This happening with scope session (when I change scope to

Re: [appengine-java] NPE at jsp:useBean with scope session

2011-02-07 Thread Stephen Johnson
Also, beans should implement the java.io.Serializable interface if you are going to store them in the Session object. On Mon, Feb 7, 2011 at 10:12 PM, Stephen Johnson onepagewo...@gmail.comwrote: Do you have sessions enabled for your application? On Mon, Feb 7, 2011 at 5:39 AM, Louis H. cute

Re: [appengine-java] Re: Just getting started with Datastore

2011-02-02 Thread Stephen Johnson
http://online.wsj.com/article/SB10001424052748704124504576118510340787364.html On Wed, Feb 2, 2011 at 10:34 PM, WillSpecht willspe...@gmail.com wrote: Can you elaborate on pulling a Bing. On Feb 2, 4:01 pm, Ikai Lan (Google) ikai.l+gro...@google.comikai.l%2bgro...@google.com wrote:

Re: [appengine-java] Re: Semaphores/ LinkedBlockingQueue on GAE for java

2011-01-30 Thread Stephen Johnson
says how many milliseconds you want to wait b) why don't you do something like this do { read new data from ds; } On Jan 29, 10:38 pm, Stephen Johnson onepagewo...@gmail.com wrote: At the moment the Channel API is javascript only. There are a lot

Re: [appengine-java] Re: Semaphores/ LinkedBlockingQueue on GAE for java

2011-01-29 Thread Stephen Johnson
Sounds like you need more of a Push style. Checkout the Channel API or the XMPP api. On Sat, Jan 29, 2011 at 1:47 PM, Artur Downar artur.dow...@googlemail.comwrote: The external device polls for data from GAE. It is not specified when the data arrives. To describe it more clearly. The device

Re: [appengine-java] Re: Semaphores/ LinkedBlockingQueue on GAE for java

2011-01-29 Thread Stephen Johnson
with it ? On Sat, Jan 29, 2011 at 9:49 PM, Stephen Johnson onepagewo...@gmail.com wrote: Sounds like you need more of a Push style. Checkout the Channel API or the XMPP api. On Sat, Jan 29, 2011 at 1:47 PM, Artur Downar artur.dow...@googlemail.com wrote: The external device

Re: [appengine-java] Just getting started with Datastore

2011-01-28 Thread Stephen Johnson
Hi Matt, There are several different ways to save/query objects from the datastore not just JDO or JPA. They are: 1. Low level api - work directly with the datastore's native (for lack of a better term) representation of an object. 2. JDO or JPA - work with these standards to abstract away the

Re: [appengine-java] Unindexed properties with JDO ?

2011-01-27 Thread Stephen Johnson
Add this annotation to properties you want unindexed. @Extension(vendorName = datanucleus, key = gae.unindexed, value=true) On Thu, Jan 27, 2011 at 4:00 AM, Fabrizio Accatino fht...@gmail.com wrote: Using the datastore low-level API I can set a property to no indexed.

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
Well, you shouldn't be getting a NullPointerException if the entity is not found so something else is wrong. The correct exception would be JDOObjectNotFoundException. Are you sure the PageParameters parameters is not null or something else isn't null?? You don't use the 'a' variable in anyway in

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
Also, check that the PMF.getPersistenceManager() returns a non-null value. Perhaps with the changes you've been trying you don't have the transactions-optional name in the config file matching the code. On Wed, Jan 26, 2011 at 11:00 AM, Stephen Johnson onepagewo...@gmail.comwrote: Well, you

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
in JDO uses JDOQL. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Wed, Jan 26, 2011 at 10:07 AM, Stephen Johnson onepagewo...@gmail.comwrote: Also

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
Did quick check, Yes, KEY(' ') can be used if what's inside is an encoded key, but I assumed that by a plain 1 it was an unencoded ID value. On Wed, Jan 26, 2011 at 12:00 PM, Stephen Johnson onepagewo...@gmail.comwrote: Minor minor point :) I believe Ikai if you look at your posted code you

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
Yes, to use JDO your going to have to annotate the class and have the DataNucleus enhancer run over the classes. If you use the low-level API then you can just query for the Entity object itself. On Wed, Jan 26, 2011 at 3:09 PM, Marc Herber herber.m...@googlemail.comwrote: Thanks for your hint.

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-25 Thread Stephen Johnson
Good to hear! On Tue, Jan 25, 2011 at 5:24 AM, hrbaer herber.m...@googlemail.com wrote: Both the database query and the PMF singleton are working - thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group,

Re: [appengine-java] Can't fetch a dataset using primary key

2011-01-24 Thread Stephen Johnson
Try changing Ikai's code to include the entity name like: SELECT * from DB WHERE __key__ = KEY('DB','1') if your key is a number then SELECT * from DB WHERE __key__ = KEY('DB',1) Documentation: an entity key literal, with either a string-encoded

Re: [appengine-java] Can't fetch a dataset using primary key

2011-01-24 Thread Stephen Johnson
Hi Marc, As the error message says, you should use a singleton to share your persistence manager. Your code must be allocating it more than once. Here ya go: import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; import javax.jdo.PersistenceManager; final public class PMF {

Re: [appengine-java] Key only query

2011-01-20 Thread Stephen Johnson
Yes, it works. I use key only queries a lot. I could help more if you posted the code with the query. On Wed, Jan 19, 2011 at 6:52 AM, Kenny yuyeung...@gmail.com wrote: According to: http://code.google.com/appengine/docs/java/datastore/jdo/queries.html#Queries_on_Keys We are suppose to be

Re: [appengine-java] can't retreive one-to-may objetcs, JPA

2011-01-18 Thread Stephen Johnson
to retreive the books completly with their subjetcs also, I might be doing something wrong in the Entities. Please soome help. On 18 January 2011 00:30, Stephen Johnson onepagewo...@gmail.com wrote: I don't do JPA, but If it's like JDO and you have lazy loading then don't you need to access

Re: [appengine-java] Mutation pool bug?

2011-01-18 Thread Stephen Johnson
...@yahoo.comwrote: Thank you, Stephen. This works. I could not locate this earlier in the mapreduce documentation. Regards, Arun -- *From:* Stephen Johnson onepagewo...@gmail.com *To:* google-appengine-java@googlegroups.com *Sent:* Sun, 16 January, 2011 1:33:31 AM

Re: [appengine-java] can't retreive one-to-may objetcs, JPA

2011-01-17 Thread Stephen Johnson
I don't do JPA, but If it's like JDO and you have lazy loading then don't you need to access the subjects field before you close your entity manager to get the subjects loaded? Just a thought. On Mon, Jan 17, 2011 at 3:51 PM, kidowell crui...@gmail.com wrote: I cannot retreive the Listsubjects

Re: [appengine-java] Filtering more than 3 parameters in JDOQL

2011-01-15 Thread Stephen Johnson
There's another function executeWithArray on the query object that you can use. Sent from my iPhone On Jan 15, 2011, at 5:08 AM, Vik vik@gmail.com wrote: Hie I am not able to pass more than 3 parameters using below code. So, how to pass more than 3 parameters? Query

Re: [appengine-java] Mutation pool bug?

2011-01-15 Thread Stephen Johnson
Do you have this defined in your mapper class? @Override public void taskCleanup(Context context) { try { // make sure to call super classes taskCleanup so that the DatastoreMutationPool // gets flushed properly otherwise puts/deletes can be lost; super.taskCleanup(context); } catch

Re: [appengine-java] Re: JDO - Set property question

2011-01-11 Thread Stephen Johnson
I never stated whether it was valid per JDO spec. I just stated that Matthew was incorrect and his explanation of why the syntax was incorrect was also incorrect. This is an app engine forum so it was implied that the incorrectness pertained to app engine. If you wish to point out differences

Re: [appengine-java] Re: JDO - Set property question

2011-01-07 Thread Stephen Johnson
That is incorrect. You can specify a filter using the == with a single value and a list or set such as query.setFilter(keywords == keywordParam); query.declareParameters(String keywordParam); This works just fine in JDO on AppEngine. On Fri, Jan 7, 2011 at 8:06 AM,

Re: [appengine-java] Re: JDO - I can't update an object with One-to-One Relationships

2011-01-04 Thread Stephen Johnson
Why do you have to delete the location entity? Why not just update the current location entity with the new coordinates? That would be much more efficient. On Tue, Jan 4, 2011 at 10:20 AM, yoyo yoyomo...@gmail.com wrote: The update still don't works. I give up. I use the

Re: [appengine-java] passing multiple parameters to JDOQL

2010-12-29 Thread Stephen Johnson
You need to do it like this: query.declareParameters(Long bind_pocId, Date bind_startDate, Date bind_endDate); However, unless you've normalized your dates on midnight or something I don't think this will work they way you want since date objects have millisecond precision. On Wed, Dec 29,

Re: [appengine-java] Re: Customizing warmup with a Servlet mapped to _ah_warmup

2010-12-21 Thread Stephen Johnson
Just map a servlet to /_ah/warmuphttps://appengine.google.com/logs?version_id=4.347075438648158995app_id=my-lms-testfilter_type=labelsfilter=path%3A%22%2F_ah%2Fwarmup%22severity_level_override=1view=Searchin your web.xml. This will override the default one provided by app engine. On Tue, Dec 21,

Re: [appengine-java] Re: Customizing warmup with a Servlet mapped to _ah_warmup

2010-12-21 Thread Stephen Johnson
I should add that there is no need to invoke GAE's default warming. I'm sure it's basically a no-op and just gets the basic servlet classes loaded that your own servlet will do by being invoked. On Tue, Dec 21, 2010 at 1:10 PM, Stephen Johnson onepagewo...@gmail.comwrote: Just map a servlet

Re: [appengine-java] Re: Customizing warmup with a Servlet mapped to _ah_warmup

2010-12-21 Thread Stephen Johnson
My bad, it should be: servlet servlet-name_ah_warmup/servlet-name servlet-classcom.your.servlet.Here/servlet-class /servlet On Tue, Dec 21, 2010 at 1:21 PM, Stephen Johnson onepagewo...@gmail.comwrote: I should add that there is no need to invoke GAE's default warming. I'm sure it's

Re: [appengine-java] CPU time obtained via QuotaService much lower than CPU time reported in request logs

2010-12-14 Thread Stephen Johnson
You need to add the CPU and API times together from the QuotaService to get the CPU time in the log. The QuotaService keeps them separate while the log adds them together. So in the log the API time reported is the API time but the CPU time in the log is actually CPU + API time which is

Re: [appengine-java] Re: Massive delete (mapreduce based) Datastore viewer Datastore statistics unavailable

2010-12-13 Thread Stephen Johnson
. Best regards, cyrille On 10 déc, 16:15, Stephen Johnson onepagewo...@gmail.com wrote: Are you still having this issue? I'm curious to learn if this has cleared up because here's a random guess. When entities are deleted they are just marked as deleted and then later garbage collected, so

Re: [appengine-java] Can you add Handlers to the root logger?

2010-12-12 Thread Stephen Johnson
Hi Andrew, Perhaps my write up on my XMPP Log Hander might help. It adds a log handler to GAE which sends log messages via XMPP. You can check it out at http://www.professionalintellectualdevelopment.com Hope it helps, Stephen On Sun, Dec 12, 2010 at 6:05 PM, Andrew andrew.w.d...@gmail.com

Re: [appengine-java] Massive delete (mapreduce based) Datastore viewer Datastore statistics unavailable

2010-12-10 Thread Stephen Johnson
Are you still having this issue? I'm curious to learn if this has cleared up because here's a random guess. When entities are deleted they are just marked as deleted and then later garbage collected, so perhaps the datastore viewer has a very low timeout set and it is starting with the beginning

Re: [appengine-java] JSF: sudden ViewExpiredException on GAE

2010-12-07 Thread Stephen Johnson
Well, I'll take a wild stab at it since I don't know Java Server Faces, but since you say it was working and now has stopped. Do you have sessions-enabledtrue/sessions-enabled in your appengine-web.xml? If not, add it. As of 1.4 this is now being adhered to whereas prior to this sessions were

Re: [appengine-java] jsessionid not present anymore

2010-12-03 Thread Stephen Johnson
Well, they just pushed version 1.4 and it may be that the sessions-enabled flag wasn't enforced and now with version 1.4 perhaps it is. Sounds like you may have to set the cookie yourself if you don't want to enable sessions for some reason. On Fri, Dec 3, 2010 at 12:13 AM, Ioan

Re: [appengine-java] jsessionid not present anymore

2010-12-02 Thread Stephen Johnson
My session cookies are working. Have you verified you still have: sessions-enabledtrue/sessions-enabled in your appengine-web.xml file. Steve On Thu, Dec 2, 2010 at 3:00 PM, Ioan trivia4...@yahoo.com wrote: Hello to all, I develop my application since about 5 months and everything looked

Re: [appengine-java] Re: data in xml format from data store

2010-12-01 Thread Stephen Johnson
://www.reddit.com/r/appengine Twitter:http://twitter.com/app_engine On Mon, Nov 29, 2010 at 10:13 AM, Stephen Johnson onepagewo...@gmail.comwrote: I believe the 30 second limit is imposed on the time it takes for your servlet to finish. Thus, if your servlet finished generating

Re: [appengine-java] Re: data in xml format from data store

2010-11-29 Thread Stephen Johnson
It sounds like you want to send a xml file to the client not upload an xml file. If so, you can use the standard XML document classes (see the org.w3c.dom package). Build up your document then you can convert it to a String using an empty Transform (see the javax.xml.transform and javax.xml

Re: [appengine-java] Re: data in xml format from data store

2010-11-29 Thread Stephen Johnson
I believe the 30 second limit is imposed on the time it takes for your servlet to finish. Thus, if your servlet finished generating and returning the file to the AppEngine infrastructure in 29 seconds, then I think you will be safe even though it might take another minute or two for Google's

Re: [appengine-java] Direct access to JSF source

2010-11-24 Thread Stephen Johnson
I wouldn't do all *.xhtml unless that is what you need. I'd just map index.xhtml and create a servlet or jsp that dummy's a 404 response. Again, don't know about the architecture of JSF so perhaps you need all xhtml files hidden. Not sure about that. On Wed, Nov 24, 2010 at 8:33 AM, Matthew

Re: [appengine-java] Session Management on GAE

2010-11-22 Thread Stephen Johnson
From what I know you don't get sessionDestroyed. I believe there's a couple of issues with notification of a destroyed session and the most significant one would be that there's no guarantee that an instance of your application will even be running (1.4.0 will allow reserved instances but that

[appengine-java] Re: Does that datastore mains sort order for list properties?

2010-11-16 Thread Stephen Johnson
I've read that too, but I've been using JDO on AppEngine for a year now and my properties that are Lists have maintained their order and I have not seem them deviate, but I have read that warning in the docs so I don't know if this can be guaranteed. Sets however by their very nature have no

[appengine-java] Re: Can't update int[] array in a class?

2010-11-14 Thread Stephen Johnson
Try creating a setter function inside the Foo class itself and set the array through that function. I'm guessing that the Datanucleus enhancer isn't finding the update to vals that your using outside the class. Also, I'd change from using arrays to using a List or Set. On Nov 12, 11:57 pm, Mark

[appengine-java] Re: DataNucleus error on Eclipse plugin windows filename too long

2010-09-23 Thread Stephen Johnson
I've posted this solution somewhere else but can't remember where. Anyway, if you're using eclipse plugin go to Project | Properties, choose Google \ App Engine \ ORM and only include directories that you have classes that you want enhanced. By default it does the entire project so that includes a

[appengine-java] Re: Policy prevented put operation

2010-08-05 Thread Stephen Johnson
Glad you were able to get it resolved. On Aug 5, 6:24 am, sree sraj...@gmail.com wrote: sorry it was exceeding the 1mb limit. -- 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

  1   2   >