[appengine-java] Re: Persisting java.util.TimeZone

2009-11-25 Thread aldrinm
Thanks Jason,

Marking it as serialized works!
...
@Persistent(serialized = true)
TimeZone timeZone


Cheers,
Aldrin


On Oct 20, 11:11 pm, Jason (Google) apija...@google.com wrote:
 Have you tried storing it as a serialized 
 property?http://gae-java-persistence.blogspot.com/2009/10/serialized-fields.html

 If so, then please post your implementation that doesn't work and any log
 details re: the failure.

 - Jason



 On Fri, Oct 16, 2009 at 7:07 AM, aldrinm aldr...@gmail.com wrote:

  Hi,

  Can I persist an instance of java.util.TimeZone in the datastore? From
  this thread,
 http://groups.google.com/group/google-appengine-java/browse_thread/th...
  and the whitelist
 http://code.google.com/appengine/docs/java/jrewhitelist.html
  , it appears that it can be done. Unable to get it to work. Any
  pointers?

  Thanks
  Aldrin

--

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-j...@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] (JDOQL) Is this a bug? (repost)

2009-11-25 Thread Prashant
following is my JDO class:

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

@Persistent(primaryKey = true)
private String EmailID;

@Persistent
private String Name;

@Persistent
private ListString Groups;
}



following is my test case:


PersistenceManager pm = pmf.getPersistenceManager();

Query query = pm.newQuery(_Contact.class);

query.setOrdering(EmailID);
query.setFilter(Groups.contains(\mygroup\));

int i = 1;
for(_Contact cont : (List_Contact) query.execute()){
resp.getWriter().print(i++ +   + cont.getID() + br);
}

pm.close();


above code printed 23 contacts and when I replaced  *
query.setOrdering(EmailID); *by *query.setOrdering(EmailID desc); *it
printed 18 contacts only. Is it a bug or I am 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-j...@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.




Re: [appengine-java] Re: JDO preview release : child object is still null !

2009-11-25 Thread Prashant
Is there any plan to support polymorphism in relationships? I tried it with
1.2.8 pre-release, felt disappointed seeing it is not supported yet. I was
expecting it to be supported in 1.2.8 release.

--

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-j...@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] XMPP Message not being received

2009-11-25 Thread Ravi Sharma
Hi,
I am trying to write a XMPP Client. When i send a mesage from Client to GAE
application, it always reach the server and then server reply back. When i
ran the client first time it worked for 3-4 times. but then now i am not
receiving any message on client side. I checked the server logs and it says
that Message sent succesfully.

I am using my gmail id on client side to connect to
talk.google.comserver.And i logged out my self from all google client
like gmail, gtalk
etc, as i was thinking may be message is being sent to another client.
Intrestingky when i am logged in to Gtalk at the time when i am running my
client, Gtalk recive the response from server. I am using smack libraries
forXMPP client.

1) Can you please suggest what can be a problem here.
2) Is XMPP communication is 100% delivery system. Is there chance that my
message will get lost once on server or client i see that message has been
sent.



Thanks,
Ravi.

--

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-j...@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: Spring Web Flow

2009-11-25 Thread Dieter Hubau
Looks like someone has a similar problem, yet he gave better detailed
information:

http://forum.springsource.org/showpost.php?p=270885postcount=3

If anyone can help, respond in any of the two threads please!

On 18 nov, 17:37, Dieter Hubau dhu...@gmail.com wrote:
 Indeed, I have created a similar thread over there:

 http://forum.springsource.org/showthread.php?t=80572

 If anyone has any clue what could have been wrong, or wants to help me
 and wants to see some of the code, let me know!

 On Nov 13, 10:08 pm, Rusty Wright rwright.li...@gmail.com wrote:



  Have you tried the Spring forums?  Perhaps your problem is specific to 
  Spring Web Flow and not App Engine.  http://forum.springsource.org/

  DieterHubauwrote:
   I hope some people who know stuff about Spring Web Flow are reading
   this :-)

   On Nov 12, 3:48 pm,DieterHubaudhu...@gmail.com wrote:
   Anyone? If you need extra information, I'm willing to paste more of
   the code here..

   On Nov 12, 10:29 am,DieterHubaudhu...@gmail.com wrote:

   Hi everyone,
   I m having an error using Spring + Spring Web Flow in my java web
   application.
   I have already fixed lots of small problems to get it working, but
   this one I can t figure out.
   The app is:http://toverexpressforever.appspot.com
   When you click on the register button, a new Spring Web Flow is
   started and it takes you to the first view-state of the float, /WEB-
   INF/jsp/subscription/details.jsp
   Then you can continue in the flow, by clicking on one of the two
   links. One leads you to another jsp (WEB-INF/jsp/subscription/
   summary.jsp), the second will lead you back to the homepage /home.do
   The first time when I try this, it always works... But whenever I try
   to go to /subscription.do a second time (or 3rd ,4rd, ...) it fails...
   What am I doing wrong here? He always gives me the error message:
   Error: Not Found
   The requested URL /subscription was not found on this server.
   And in the logs, I see this error message for the /subscription.do
   URL:
   #   1. 11-12 01:27AM 36.070 /subscription 404 1ms 0cpu_ms 0kb Mozilla/
   5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016
   Firefox/3.5.4 (.NET CLR 3.5.30729),gzip(gfe)
         See details
         ***.***.***.*** - - [12/Nov/2009:01:27:36 -0800] GET /
   subscription HTTP/1.1 404 0 http://toverexpressforever.appspot.com/;
   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/
   20091016 Firefox/3.5.4 (.NET CLR 3.5.30729),gzip(gfe)
   toverexpressforever.appspot.com
      2.
         W 11-12 01:27AM 36.070
         No handlers matched this URL.
   Anyone know what I'm doing wrong here? On a local Tomcat server (in
   Eclipse) it works, as well as with the Eclipse plugin server (by doing
   Run As - Web Application)...
   Any help is greatly appreciated!!
   Kind regards,
  DieterH

   --

   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-j...@googlegroups.com.
   To unsubscribe from this group, send email to 
   google-appengine-java+unsubscr...@googlegroups.com.
   For more options, visit this group 
   athttp://groups.google.com/group/google-appengine-java?hl=.

--

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-j...@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 using session.getAttribute()

2009-11-25 Thread addy.bhardwaj
Guys

I had a similar issue when I was using JSF. What I found in my case
was if I set an attribute  (say dummy string key value) on every
request, the other values stored in the session are maintained.

If I dont do that, on every subsequent request in which nothing is
saved in the session, other saved values are dropped (this happens
only on appspot not dev server). This all started when I tried
debugging my code on appspot. But I still can't comprehend why this is
happening.

Try the approach and let me know if it works in your case as well.

On Nov 25, 1:58 am, Rusty Wright rwright.li...@gmail.com wrote:
 Did you enable sessions?

 http://code.google.com/appengine/docs/java/config/appconfig.html

 See the section near the end, Enabling Sessions.



 Steph wrote:
  I also have the same issue when retrieving session objects from a
  servlet filter, and running in the local sandbox.

  On Nov 21, 10:11 pm, Sanjay sanjaykumar.pa...@gmail.com wrote:
  Did you solve this problem? I am facing exactly same problem, it would
  be nice if you could share the solution if you found one.

  Thank you

  --

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

--

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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




[appengine-java] Re: Is there a recommended way to differentiate between production and dev GAE environments?

2009-11-25 Thread Jorge
My approach is quite simpler. I keep a configuration file where  I
setup a different webBaseURL depending on the environment, development
VS production. One could a a boolean isProduction and make webBaseURL
a function of that. The thing to remember is to setup the config file
before uploading to GAE and then resetting it back to the development
config.

public class Config {

// True or false the UI actions (buttons) and the http servicce
requests
// are logged.
private static boolean isLogOn = true;

// Web base URL
/private static String webBaseURL = http://
wcondominios.appspot.com/;
private static String webBaseURL = http://localhost:8080/;;

/**
 * @return True or false the the UI actions (buttons) and the http
 * servicce requests are logged.
 */
public static boolean isLogOn() {return isLogOn;}

/**
 * @return The Web base URL
 */
public static String getWebBaseURL() {return webBaseURL;}

}

Jorge Gonzalez

On Nov 24, 8:11 pm, Rusty Wright rwright.li...@gmail.com wrote:
 The filesystem is read only on app engine; would trying to create a file, in 
 WEB-INF for example, work?  I'm wondering if there are corner cases I'm not 
 thinking of where that might fail and falsely report that you're on app 
 engine; for example, if you were doing integration tests under Hudson.

 Nacho Coloma wrote:
  Thanks! I searched a lot but didn't get to this thread.

  On Nov 23, 4:13 pm, leszek leszek.ptokar...@gmail.com wrote:
  Follow that thread:

 http://groups.google.co.uk/group/google-appengine-java/browse_frm/thr...

  --

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

--

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-j...@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] Import/export for Java

2009-11-25 Thread Marcel Overdijk
I'm wondering how the Java utility for exporting/importing data is
making progress.

It's already available for Python but not for Java SDK.

--

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-j...@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.




Re: [appengine-java] Re: out of memory on javax.mail.internet.MimeMultipart.getCount

2009-11-25 Thread david ruescas
I added a trace message, here's the value of
javax.mail.internetMimeMessage.getContentType():

com.dr.reviewengine.MailServlet doPost: multipart content type
text/plain; charset=ISO-8859-1

thankyou

On 11/25/09, m seleron seler...@gmail.com wrote:
 Hi,

 I want you to teach the value of
 [javax.mail.internetMimeMessage.getContentType() ]
 for confirmation.

 thanks.

 On 11月25日, 午前3:57, david ruescas fastn...@gmail.com wrote:
 When receiving email I get an out of memory error when calling
 getCount on the MimeMultipart object.

 Heres the stack trace:

 Error for /_ah/mail/rev...@reviewengine.appspotmail.com
 java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Unknown Source)
         at java.io.ByteArrayOutputStream.write(Unknown Source)
         at
 javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:244)
         at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:181)
         at
 javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
         at com.dr.reviewengine.MailServlet.doPost(MailServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
         at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
         at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
         at
 com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
         at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
         at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
         at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
         at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
         at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
         at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
         at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
         at
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
         at
 com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
         at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
         at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
         at
 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
         at
 org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at
 com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
         at
 com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:239)
         at
 com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5135)
         at
 com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5133)
         at
 com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
         at
 com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363)

 --

 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-j...@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.




--

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-j...@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: Any Sample Authentication Examples using GWT-App Engine

2009-11-25 Thread leszek
http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ

--

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-j...@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] on switching a webapp from RDBMS to GAE/J ( jdo, join, sql )

2009-11-25 Thread K.Honsali
Hi all,

If my understanding of previous discussions is correct, we can resume
from:
- GAE/J is not relational (not full JDO too), and hence does not
support sql features such as joins, like, not in ...etc
- the solution is to de-normalize your tables ... or your mind..

Now, suppose you have a quite big classic sql-based webapp which is
multi-layered like a burger, so it is OK to change the Data Access
Layer without affecting the other components, provided that the DAL
calls and outputs remain the same.
If you want to migrate this app to GAE/J, how would you do; knowing
that beside CRUD queries, you have queries that execute (on the fly w/
sql) up to a dozen joins ?
a )  re-write your DAL in GAE/J's JDO, by denormalizing your tables (
your mind)
b )  write your own sql wrapper, using full JDO and the low level
datastore (can it be?)
c )  none of the above

Thanks for your CPU time :)

--

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-j...@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: on switching a webapp from RDBMS to GAE/J ( jdo, join, sql )

2009-11-25 Thread K.Honsali
I would have added
d) use an embedded rdbms, and do own consistency

If there was a way to control running instances like in EC2



On Nov 25, 5:17 pm, K.Honsali k.hons...@gmail.com wrote:
 Hi all,

 If my understanding of previous discussions is correct, we can resume
 from:
 - GAE/J is not relational (not full JDO too), and hence does not
 support sql features such as joins, like, not in ...etc
 - the solution is to de-normalize your tables ... or your mind..

 Now, suppose you have a quite big classic sql-based webapp which is
 multi-layered like a burger, so it is OK to change the Data Access
 Layer without affecting the other components, provided that the DAL
 calls and outputs remain the same.
 If you want to migrate this app to GAE/J, how would you do; knowing
 that beside CRUD queries, you have queries that execute (on the fly w/
 sql) up to a dozen joins ?
 a )  re-write your DAL in GAE/J's JDO, by denormalizing your tables (
 your mind)
 b )  write your own sql wrapper, using full JDO and the low level
 datastore (can it be?)
 c )  none of the above

 Thanks for your CPU time :)

--

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-j...@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] new comer

2009-11-25 Thread Mike
hi, i am the green hand on GAE ,i want to use it to develop some
project .

--

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-j...@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 in uploading jsp file

2009-11-25 Thread Sahil Mahajan
Hello Stephan

I am new to gae. My JAVA_HOME variable has value C:\Program Files\Java
\jdk1.6.0_01
I also checked build.xml, but I could not understand where I need to
mention jdk instead of jre.

Can you give me some more details

Regards
Sahil


On Nov 24, 11:00 pm, Stephan Hartmann hartm...@metamesh.de wrote:
 You are using a Java Runtime Environment (JRE) which does not include a
 compiler.

 You have to use a JDK instead.

 Regards,
 Stephan

 sahil mahajan schrieb:



  Hello

  I am working on java google app engine. When I try to upload my
  application, I receive following error

  Error Details:

  Nov 24, 2009 10:18:11 PM org.apache.jasper.JspC processFile

  INFO: Built File: \addressbook.jsp

  java.lang.IllegalStateException: cannot find javac executable based on
  java.home

  , tried C:\Program Files\Java\jre1.6.0_04\bin\javac.exe and
  C:\Program Files\

  Java\bin\javac.exe

  Unable to upload app: cannot find javac executable based on java.home,
  tried C:

  \Program Files\Java\jre1.6.0_04\bin\javac.exe and C:\Program
  Files\Java\bin\ja

  vac.exe

  If I remove addressbook.jsp file, error does not occur

  What could be the reason?

  --

  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-j...@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.



--

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-j...@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.




Re: [appengine-java] Import/export for Java

2009-11-25 Thread Ikai L (Google)
In the meantime, there are a few articles about how to do this using the
Python loader for your Java app:

http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loading-for-Java

http://appengine-cookbook.appspot.com/recipe/using-the-python-bulk-exporter-tool-with-a-java-application/?id=ahJhcHBlbmdpbmUtY29va2Jvb2tyigELEgtSZWNpcGVJbmRleCI2YWhKaGNIQmxibWRwYm1VdFkyOXZhMkp2YjJ0eUVnc1NDRU5oZEdWbmIzSjVJZ1JLWVhaaERBDAsSBlJlY2lwZSI3YWhKaGNIQmxibWRwYm1VdFkyOXZhMkp2YjJ0eUVnc1NDRU5oZEdWbmIzSjVJZ1JLWVhaaERBNgw

On Wed, Nov 25, 2009 at 6:50 AM, Marcel Overdijk
marceloverd...@gmail.comwrote:

 I'm wondering how the Java utility for exporting/importing data is
 making progress.

 It's already available for Python but not for Java SDK.

 --

 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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-j...@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.




Re: [appengine-java] Re: any plans for deferred.defer in Java?

2009-11-25 Thread Vince Bonfanti
Hi Jeff,

Thanks for the suggestions and the code. David Chandler sent me a patch to
support user-specified queue names (almost exactly the same as your
changes), and I've committed that patch to SVN. Regarding your other
changes:

  - I've probably make the url-pattern init parameter optional and have it
default to /_ah/queue_name rather than throw an exception from the init
method if it's missing.

  - While we're at it, the default queue name could be optionally specified
by an init parameter also.

  - I'm not sure a stacktrace from the doPost method is really going to give
you much more information, but would be open to that  change.

It looks like the Deferred class is going to be added to the official GAE/J
SDK, though I'm not sure when. Rather than make any more changes to the code
right now, I'd rather wait to see what shows up the SDK and then work
through normal Google channels to get any further modifications made. In the
mean time, I'm glad it's working for you.

Vince

On Tue, Nov 24, 2009 at 8:09 PM, Jeff Schnitzer j...@infohazard.org wrote:

 Attached is a modified version of that class that lets you define any
 path you want for the servlet and lets you specify which queue to use
 like this: Deferred.defer(task, queueName);

 (I needed this for my own purposes)

 Do with it as you wish :-)

 The only other major change I would make is to stop masking all the
 exceptions during the task processing.  Or at least, if you're going
 to log the exception and stop propagation, log the whole thing so we
 get a stacktrace in the logs.

 Jeff

 On Fri, Nov 20, 2009 at 1:03 PM, David Chandler turboman...@gmail.com
 wrote:
  Vince, this is great! I hadn't been watching my own issue, so didn't
  see this until now. Thanks so much!
 
  Only enhancement I would suggest is to enable multiple deferred
  queues. For example. I would like to defer tasks in an email throttle
  queue separately from a general background queue. Perhaps the
  Deferrable interface could have a getQueueName() method, or
  Deferred.defer could have an additional signature defer(Deferrable
  task, String queueName).
 
  Thanks again,
  /dmc

 --


--

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-j...@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: out of memory on javax.mail.internet.MimeMultipart.getCount

2009-11-25 Thread Jeremy Blythe
You might be parsing a text/plain as a multipart. I've blogged about
this here 
http://jeremyblythe.blogspot.com/2009/11/receiving-email-in-google-app-engine.html
I think this is a bug in App Engine.

On Nov 25, 3:42 pm, david ruescas fastn...@gmail.com wrote:
 I added a trace message, here's the value of
 javax.mail.internetMimeMessage.getContentType():

 com.dr.reviewengine.MailServlet doPost: multipart content type
 text/plain; charset=ISO-8859-1

 thankyou

 On 11/25/09, m seleron seler...@gmail.com wrote:

  Hi,

  I want you to teach the value of
  [javax.mail.internetMimeMessage.getContentType() ]
  for confirmation.

  thanks.

  On 11月25日, 午前3:57, david ruescas fastn...@gmail.com wrote:
  When receiving email I get an out of memory error when calling
  getCount on the MimeMultipart object.

  Heres the stack trace:

  Error for /_ah/mail/rev...@reviewengine.appspotmail.com
  java.lang.OutOfMemoryError: Java heap space
          at java.util.Arrays.copyOf(Unknown Source)
          at java.io.ByteArrayOutputStream.write(Unknown Source)
          at
  javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:244)
          at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:181)
          at
  javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
          at com.dr.reviewengine.MailServlet.doPost(MailServlet.java:85)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
          at
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
          at
  org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
          at
  com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
          at
  org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
          at
  com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
          at
  org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
          at
  org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
          at
  org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
          at
  org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
          at
  org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
          at
  org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
          at
  com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
          at
  org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
          at org.mortbay.jetty.Server.handle(Server.java:313)
          at
  org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
          at
  org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
          at
  com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
          at
  org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
          at
  com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
          at
  com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:239)
          at
  com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5135)
          at
  com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5133)
          at
  com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
          at
  com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363)

  --

  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-j...@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.

--

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-j...@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.




Re: [appengine-java] Re: Weird results for JOD query with List item filter (List.contains(....))

2009-11-25 Thread Ikai L (Google)
Prashant,

Is this happening locally? Is EmailID ever an empty value?

On Tue, Nov 24, 2009 at 9:57 AM, Prashant antsh...@gmail.com wrote:

 Max please help me out, it is killing my app. :(


 On Tue, Nov 24, 2009 at 8:45 PM, Prashant antsh...@gmail.com wrote:

 this is surely a bug following is my test case


 PersistenceManager pm = pmf.getPersistenceManager();

 Query query = pm.newQuery(_Contact.class);

 query.setOrdering(EmailID);
 query.setFilter(Groups.contains(\mygroup\));

 int i = 1;
 for(_Contact cont : (List_Contact) query.execute()){
 resp.getWriter().print(i++ +   + cont.getID() + br);
 }

 pm.close();


 above code printed 23 contacts and when I replaced  
 *query.setOrdering(EmailID);
 *by *query.setOrdering(EmailID desc); *it printed 18 contacts only.


  --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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-j...@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.




Re: [appengine-java] Re: Weird results for JOD query with List item filter (List.contains(....))

2009-11-25 Thread Prashant
no, I have tested it on Production Server and EmailID is a primary key so it
cannot be null

--

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-j...@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.




Re: [appengine-java] Re: Weird results for JOD query with List item filter (List.contains(....))

2009-11-25 Thread Ikai L (Google)
Is this something you can cause to happen in a development environment?

Also, what is your application ID?

On Wed, Nov 25, 2009 at 1:46 PM, Prashant antsh...@gmail.com wrote:

 no, I have tested it on Production Server and EmailID is a primary key so
 it cannot be null

  --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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-j...@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: Import/export for Java

2009-11-25 Thread Marcel Overdijk
Thanks for info Ikai.

But I'm wondering if there is any information available about the Java
exporter/importer.

On 25 nov, 19:44, Ikai L (Google) ika...@google.com wrote:
 In the meantime, there are a few articles about how to do this using the
 Python loader for your Java app:

 http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loadi...

 http://appengine-cookbook.appspot.com/recipe/using-the-python-bulk-ex...

 On Wed, Nov 25, 2009 at 6:50 AM, Marcel Overdijk
 marceloverd...@gmail.comwrote:





  I'm wondering how the Java utility for exporting/importing data is
  making progress.

  It's already available for Python but not for Java SDK.

  --

  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-j...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B 
  unsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.

 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine

--

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-j...@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.




Re: [appengine-java] Datastore Issues

2009-11-25 Thread Ikai L (Google)
The PM class may be an over-optimization. Can you help me understand what
the purpose of this class is? There shouldn't be any significant costs
associated with opening, closing and retrieving instances of
PersistenceManager.

On Tue, Nov 24, 2009 at 10:34 AM, Jeffrey Goetsch jeffg@gmail.comwrote:

 Here is a subset of the code.  It doesn't run or have the logic that
 changes the values.  I have included the ChallengeDao, which highlights what
 I had to do to make work correctly.  If I remove the
 PM.closePersistentManager() it fails in many different ways.  I can even get
 a failure about can't modify multiple entities from different groups in the
 same transaction, and I don't even have transactions.

 My goal is to have one PersistenceManager per request.  That way I don't
 have to re-query the objects from datastore twice, because I have read-only
 logic afterwards that packets the data needed for the GWT front end.

 Like I said before, I am will to share the entire code base with people
 that are working on these issues in datanucleus code, but not to the entire
 group.  I am willing to answer any questions you might have.

 Thanks,
 Jeffrey

 public class *PM* {
 private PM() {
 }

 static private PersistenceManagerFactory pmfInstance;
 static private HashMapThread, PersistenceManager pmSet = new
 HashMapThread, PersistenceManager();
 static private HashSetThread testThreads = new HashSetThread();
 static private long testId = 0;
 static private HashMapObject, Object testObj;


 synchronized static private void createPmfInstance() {
 if (pmfInstance == null) {
 pmfInstance =
 JDOHelper.getPersistenceManagerFactory(transactions-optional);
 }
 }

 static public void startTest() {
 testThreads.add(Thread.currentThread());
 }

 static public void endTest() {
 testThreads.remove(Thread.currentThread());
 }

 static public Long createTestId(Object obj) {
 if (!testThreads.contains(Thread.currentThread())) {
 throw new IllegalStateException
 (TestId is illegal when PersistenceManagerFactory is
 active);
 }
 if (testObj == null) {
 testObj = new HashMapObject, Object();
 }

 long newId = testId++;
 while (testObj.containsKey(newId)) {
 newId = testId++;
 }
 testObj.put(newId, obj);
 return newId;
 }

 static public Long setTestId(long id, Object obj) {
 if (!testThreads.contains(Thread.currentThread())) {
 throw new IllegalStateException
 (TestId is illegal when PersistenceManagerFactory is
 active);
 }
 if (testObj == null) {
 testObj = new HashMapObject, Object();
 }

 testObj.put(id, obj);
 return id;
 }

 static public PersistenceManager getPersistenceManager() {
 if (pmfInstance == null) {
 createPmfInstance();
 }

 PersistenceManager pm = pmSet.get(Thread.currentThread());
 if (pm == null) {
 pm = pmfInstance.getPersistenceManager();
 pmSet.put(Thread.currentThread(), pm);
 }

 return pm;
 }

 static public void closePersistenceManager() {
 PersistenceManager pm = pmSet.remove(Thread.currentThread());
 if (pm != null) {
 pm.close();
 }
 }

 static public void rollbackPersistenceManager() {
 org.datanucleus.jdo.JDOPersistenceManager pm =
 (JDOPersistenceManager) PM.getPersistenceManager();
 ObjectManager om = pm.getObjectManager();
 om.clearDirty();
 PM.closePersistenceManager();
 }

 static public T T getObjectById(ClassT cls, Object key) {
 Object obj;
 if (testThreads.contains(Thread.currentThread())) {
 obj = testObj.get(key);
 } else {
 obj = getPersistenceManager().getObjectById(cls, key);
 }

 return (T) obj;
 }

 static public T CollectionT getObjectsById(ClassT cls,
 Collection? keys) {
 CollectionT collection = new LinkedListT();
 if (testThreads.contains(Thread.currentThread())) {
 if (keys != null  !keys.isEmpty()) {
 for (Object key : keys) {
 collection.add((T) testObj.get(key));
 }
 }
 } else {
 if (keys != null  !keys.isEmpty()) {
 //TODO this is not optimized for Batch gets - switch to low
 level api
 PersistenceManager pm = getPersistenceManager();
 LinkedListObject oids = new LinkedListObject();
 for (Object key : keys) {
 oids.addLast(pm.newObjectIdInstance(cls, key));
 }
 collection = pm.getObjectsById(oids);
 }
 }

 return collection;
 }
 }


 

Re: [appengine-java] Re: Weird results for JOD query with List item filter (List.contains(....))

2009-11-25 Thread Ikai L (Google)
The extra space likely comes from indexes. You can check your indexes in
your Indexes tab. For a better understanding of how indexes work, here is
a good session from Google I/O that discusses the topic:

https://sites.google.com/site/io/under-the-covers-of-the-google-app-engine-datastore


On Wed, Nov 25, 2009 at 2:01 PM, Prashant antsh...@gmail.com wrote:

 one more thing I want to ask, earlier I had *Group (String)* instead of 
 *Groups
 (List)* , after replacing *Group *by *Groups* my DataStore usage went 13
 times of what it was earlier. of course I added more groups per contact,
 take an average of 3 groups per contact. why using list makes an entity to
 take 12 times more DataStore space? is it not a good practice to use list
 property ?

  --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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-j...@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] Implementing Authorize.NET Integration with Custom Domain.

2009-11-25 Thread _yoko_
Hey Guys,
 I have some basic questions. I just started using Java-GAE and am
trying to figure out if my site can be ported to GAE.


 How can I do the following(I have a custom domain say abc.com and an
appspot domain say abcd.appspot.com):
  1. Implement an SSL based login page. My site required data like
users SSN number, so it can not be unencrypted and the Google Login or
any other Open ID login would not suffice.

  2. Custom integrate with Authorize.NET. I do not want the user to
leave my site when entering their Credit Card Details etc.


Any insight into these two issues would really be helpful.


Regards,


Yoko

--

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-j...@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.




Re: [appengine-java] Re: on switching a webapp from RDBMS to GAE/J ( jdo, join, sql )

2009-11-25 Thread Ikai L (Google)
Your first option is what we recommend. App Engine's data model is similar
to that of a federated data model based on sharded relational databases.
Here's a pretty good session from Google I/O 2009 about migrating to/from
RDBMS:

http://code.google.com/events/io/2009/sessions/SofterSideofSchemas.html

On Wed, Nov 25, 2009 at 9:40 AM, K.Honsali k.hons...@gmail.com wrote:

 I would have added
 d) use an embedded rdbms, and do own consistency

 If there was a way to control running instances like in EC2



 On Nov 25, 5:17 pm, K.Honsali k.hons...@gmail.com wrote:
  Hi all,
 
  If my understanding of previous discussions is correct, we can resume
  from:
  - GAE/J is not relational (not full JDO too), and hence does not
  support sql features such as joins, like, not in ...etc
  - the solution is to de-normalize your tables ... or your mind..
 
  Now, suppose you have a quite big classic sql-based webapp which is
  multi-layered like a burger, so it is OK to change the Data Access
  Layer without affecting the other components, provided that the DAL
  calls and outputs remain the same.
  If you want to migrate this app to GAE/J, how would you do; knowing
  that beside CRUD queries, you have queries that execute (on the fly w/
  sql) up to a dozen joins ?
  a )  re-write your DAL in GAE/J's JDO, by denormalizing your tables (
  your mind)
  b )  write your own sql wrapper, using full JDO and the low level
  datastore (can it be?)
  c )  none of the above
 
  Thanks for your CPU time :)

 --

 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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-j...@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.




Re: [appengine-java] Re: out of memory on javax.mail.internet.MimeMultipart.getCount

2009-11-25 Thread david ruescas
It worked, cheers

On 11/25/09, david ruescas fastn...@gmail.com wrote:
 Thank you Jeremy, that may indeed be it. I'll give it a try shortly

 Incidentally, what does your  IOUtils.toString look like? Does it use
 an InputStreamReader combined with a StringWriter? Im using

 StringWriter sw = new StringWriter();
 char[] buffer = new char[1024];
 for (int n; (n = r.read(buffer)) != -1; )  {
 sw.write(buffer, 0, n);
 }

 Just checking im doing things the most standard way possible.

 thanks again

 David

 On 11/25/09, Jeremy Blythe jeremybly...@gmail.com wrote:
 You might be parsing a text/plain as a multipart. I've blogged about
 this here
 http://jeremyblythe.blogspot.com/2009/11/receiving-email-in-google-app-engine.html
 I think this is a bug in App Engine.

 On Nov 25, 3:42 pm, david ruescas fastn...@gmail.com wrote:
 I added a trace message, here's the value of
 javax.mail.internetMimeMessage.getContentType():

 com.dr.reviewengine.MailServlet doPost: multipart content type
 text/plain; charset=ISO-8859-1

 thankyou

 On 11/25/09, m seleron seler...@gmail.com wrote:

  Hi,

  I want you to teach the value of
  [javax.mail.internetMimeMessage.getContentType() ]
  for confirmation.

  thanks.

  On 11月25日, 午前3:57, david ruescas fastn...@gmail.com wrote:
  When receiving email I get an out of memory error when calling
  getCount on the MimeMultipart object.

  Heres the stack trace:

  Error for /_ah/mail/rev...@reviewengine.appspotmail.com
  java.lang.OutOfMemoryError: Java heap space
          at java.util.Arrays.copyOf(Unknown Source)
          at java.io.ByteArrayOutputStream.write(Unknown Source)
          at
  javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:244)
          at
  javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:181)
          at
  javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
          at
  com.dr.reviewengine.MailServlet.doPost(MailServlet.java:85)
          at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
          at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
          at
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
          at
  org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
          at
  com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
          at
  org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
          at
  com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
          at
  org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
          at
  org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
          at
  org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
          at
  org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
          at
  org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
          at
  org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
          at
  com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
          at
  org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
          at org.mortbay.jetty.Server.handle(Server.java:313)
          at
  org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
          at
  org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
          at
  com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
          at
  org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
          at
  com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
          at
  com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:239)
          at
  com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5135)
          at
  com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5133)
          at
  com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
          at
  com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363)

  --

  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-j...@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.

 --

 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to 

Re: [appengine-java] Datastore Issues

2009-11-25 Thread Jeffrey Goetsch
The purpose of the PM class is to abstract the PersistenceManager away from
my logic.  Because the datastore doesn't allow unowned relationships, my
business logic which is located in the Persisted objects, must retrieve the
objects to perform there tasks.  The PM object allows me to write Unit Tests
that don't touch the Datastore, and just test the Logic.  Maybe I can
simplify the Thread Map of PersistenceManagers, but I think it makes it very
understandable for someone unfamiliar with the JDO implementation.

There may be no cost to creating, and retrieving the PersistenceManager, but
there is a large cost to closing one.  If I am going to change an object
twice, and I close the persistence manager in between writes, then I have
effectively doubled my writing and reading cost, because I have to retrieve
and write the object twice.

In my case, I change object values many times while processing some of the
logic, and then reuse those objects later to create Data Packet for the
client app.  It just made sense to open 1 persistence manager at the
beginning of every request and then close it when the request is over.
This design worked perfectly fine with Hibernate, so I figured it would have
been a simple port.  But NO.

Thanks,
--Jeff

On Wed, Nov 25, 2009 at 2:05 PM, Ikai L (Google) ika...@google.com wrote:

 The PM class may be an over-optimization. Can you help me understand what
 the purpose of this class is? There shouldn't be any significant costs
 associated with opening, closing and retrieving instances of
 PersistenceManager.

 On Tue, Nov 24, 2009 at 10:34 AM, Jeffrey Goetsch jeffg@gmail.comwrote:

 Here is a subset of the code.  It doesn't run or have the logic that
 changes the values.  I have included the ChallengeDao, which highlights what
 I had to do to make work correctly.  If I remove the
 PM.closePersistentManager() it fails in many different ways.  I can even get
 a failure about can't modify multiple entities from different groups in the
 same transaction, and I don't even have transactions.

 My goal is to have one PersistenceManager per request.  That way I don't
 have to re-query the objects from datastore twice, because I have read-only
 logic afterwards that packets the data needed for the GWT front end.

 Like I said before, I am will to share the entire code base with people
 that are working on these issues in datanucleus code, but not to the entire
 group.  I am willing to answer any questions you might have.

 Thanks,
 Jeffrey

 public class *PM* {
 private PM() {
 }

 static private PersistenceManagerFactory pmfInstance;
 static private HashMapThread, PersistenceManager pmSet = new
 HashMapThread, PersistenceManager();
 static private HashSetThread testThreads = new HashSetThread();
 static private long testId = 0;
 static private HashMapObject, Object testObj;


 synchronized static private void createPmfInstance() {
 if (pmfInstance == null) {
 pmfInstance =
 JDOHelper.getPersistenceManagerFactory(transactions-optional);
 }
 }

 static public void startTest() {
 testThreads.add(Thread.currentThread());
 }

 static public void endTest() {
 testThreads.remove(Thread.currentThread());
 }

 static public Long createTestId(Object obj) {
 if (!testThreads.contains(Thread.currentThread())) {
 throw new IllegalStateException
 (TestId is illegal when PersistenceManagerFactory is
 active);
 }
 if (testObj == null) {
 testObj = new HashMapObject, Object();
 }

 long newId = testId++;
 while (testObj.containsKey(newId)) {
 newId = testId++;
 }
 testObj.put(newId, obj);
 return newId;
 }

 static public Long setTestId(long id, Object obj) {
 if (!testThreads.contains(Thread.currentThread())) {
 throw new IllegalStateException
 (TestId is illegal when PersistenceManagerFactory is
 active);
 }
 if (testObj == null) {
 testObj = new HashMapObject, Object();
 }

 testObj.put(id, obj);
 return id;
 }

 static public PersistenceManager getPersistenceManager() {
 if (pmfInstance == null) {
 createPmfInstance();
 }

 PersistenceManager pm = pmSet.get(Thread.currentThread());
 if (pm == null) {
 pm = pmfInstance.getPersistenceManager();
 pmSet.put(Thread.currentThread(), pm);
 }

 return pm;
 }

 static public void closePersistenceManager() {
 PersistenceManager pm = pmSet.remove(Thread.currentThread());
 if (pm != null) {
 pm.close();
 }
 }

 static public void rollbackPersistenceManager() {
 org.datanucleus.jdo.JDOPersistenceManager pm =
 (JDOPersistenceManager) PM.getPersistenceManager();
 ObjectManager om = 

[appengine-java] Re: select count(*) ?

2009-11-25 Thread James H
Jason, the problem with the increment a counter on your own trick is
that would be in a separate Transaction and thus, unreliably linked to
the first insert Transaction right?

Also, the Stats hook mentioned above is NOT realtime is it?  I believe
I read it is updated at least once a day.

On Oct 21, 12:54 pm, Jason (Google) apija...@google.com wrote:
 The query restrictions are an artifact of the way App Engine's datastore is
 constructed, which makes certain operations (e.g. queries and reads) very
 fast and scalable but does limit the types of queries you can make, though
 you can typically get around these restrictions by re-thinking your model a
 bit.

 We are working on adding built-in cursor support for easier paging through
 entities and have just added a datastore statistics API for, among other
 things, getting the total entity count, even if it exceeds 1,000. More
 details here:

 http://code.google.com/appengine/docs/java/datastore/stats.html

 And we also have a data export utility included with the SDK to make it
 easier for you to back up or even move off of App Engine should you choose
 to, and we're continuing to look at ways of making App Engine, particularly
 the datastore component, easier to use.

 http://code.google.com/appengine/docs/python/tools/uploadingdata.html...

 - Jason



 On Mon, Oct 19, 2009 at 1:53 PM, vetch oldpete...@gmail.com wrote:

  On 6 Paź, 10:03, Jason (Google) apija...@google.com wrote:
   * Because App Engine queries can only return up to 1,000 results,
   count(this) will never return above 1,000, even if you have more than
  1,000
   entities, so bear this in mind.

  I'm deeply shocked. This works like some black hole.

  You put your data there simply, but can't get them back that simply.

  In connection with restricions (inequality property filter), it is
  even harder to get anything more complex.

  BiGAppEngine disappointment.- 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-j...@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.




Re: [google-appengine] Taskqueue not working...

2009-11-25 Thread djidjadji
Have you looked at the TaskQueue menu of the dev_server admin page.
You must start the Task yourself.

2009/11/24 deostroll deostr...@gmail.com:
 I am doing appengine development from my local machine. (Winxp). The
 following code is supposed to add something to the taskqueue. I assume
 that one I add I am supposed to see default messages getting logged in
 the console, but nothing of the sort happens...am I doing something
 wrong?

 class showData(webapp.RequestHandler):
        def get(self):
                if users.get_current_user():
                        nick =  users.get_current_user().nickname()
                        import uuid
                        guid = str(uuid.uuid1()).replace('-','')
                        api = 'script type=text/javascriptvar key=\'' + 
 guid + '\';/
 script'
                        data = {'api_key' : api}

                        stocks = db.GqlQuery(select * from Portfolio where 
 name = ' +
 nick + ')

                        for x in stocks:
                                t = ScripTracker(key_name=guid+str(x.scripcd))
                                t.api_key = guid
                                t.scripcd = str(x.scripcd)
                                t.status = 'working'
                                t.trials = 0
                                t.put()
                                taskqueue.add(url='/stockworker', 
 params={'key':guid,
 'scripcd':x.scripcd})

                        path = os.path.join(os.path.dirname(__file__), 
 'show.htm')
                        self.response.out.write(template.render(path, data))
                else:
                        self.redirect('/')

 --

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




--

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




[google-appengine] Re: cron - too many continues

2009-11-25 Thread googlegeeza
yes, app.yaml is correctly configured - i can run the code via a url

On Nov 24, 2:36 am, Eli Jones eli.jo...@gmail.com wrote:
 does your app.yaml have the appropriate lines to handle the cron url as
 well?

 app.yaml should have this line before other handlers:
 - url: /testcron
 script: test.py
 or something like that..

 On Mon, Nov 23, 2009 at 8:43 AM, googlegeeza 

 gwynhow...@steppingstonesoftware.co.uk wrote:
  i know this has been posted before, but in other posts the error was
  caused by redirects and other issues.

  i have a cron job scheduled to run every minute (also tried it every 5
  minutes). the cron job runs some code which prints a string to the the
  log, that's it. but it doesn't run. the error on the cron jobs page in
  the admin console is Too many continues. This doesn't make sense as
  I am not doing anything in the job, just printing to the log. Code as
  below:

  cron.yaml:
  cron:
  - description: TestCron
   url: /testcron
   schedule: every 1 minutes

  test.py:
  class TestCron(webapp.RequestHandler):
     def get(self):
         logging.info('cron test')

  application = webapp.WSGIApplication( [('/testcron', TestCron),],
  debug=True)

  Why is it reporting too many continues? I am not looping anything, or
  causing anything to 'continue' in any way.

  Nothing gets printed to the log which suggests it's not even trying to
  run my TestCron class.

  Thanks in advance ...

  --

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

--

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




[google-appengine] Help please! - 2 apps running exactly the same code and same data (test/training vs prod) one constantly DeadLineExceeds the other doesn't

2009-11-25 Thread Tim Hoffman
Hi

I have two app instances, one is being used for training and testing
and the other is in production (or it should be if it wasn't
DeadlineExceeding all the time).

I am monitoring both and performing a simple diagnostics get which
does load the entire stack but does no real work.

The training one (psc-dev1) is consistently posting response times for
a complete load of under 2sec and sometimes as high as 10sec

The production one polytechnic-wa during the same period is almost
consistantly getting DeadlineExceeded errors very early into the
startup (just after some inital imports and  just starting main)

Its a big concern to me that two instances running the same code can
show such wildly different performance.

Can anyone from google have a look at this, (is one of my instances
stuck on some flaky hardware for instance)

Thanks

Tim Hoffman

--

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




[google-appengine] Re: What IDE the community recommend to developers of Python+GAE

2009-11-25 Thread Adam
I use Wing IDE. It is not free, but I find it to be invaluable.

--

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




[google-appengine] Re: Help please! - 2 apps running exactly the same code and same data (test/training vs prod) one constantly DeadLineExceeds the other doesn't

2009-11-25 Thread Tim Hoffman
I have also noted that the dashboard for polytechnic-wa is being
updated
Specifically the  Resource Summary, Current load and Errors
sections.

The other instance is right up to date.

There definately seems to be something wrong with my polytechnic-wa
instance.
(I have reployed a couple of times to see if that would make any
difference)

T

On Nov 25, 8:33 pm, Tim Hoffman zutes...@gmail.com wrote:
 Hi

 I have two app instances, one is being used for training and testing
 and the other is in production (or it should be if it wasn't
 DeadlineExceeding all the time).

 I am monitoring both and performing a simple diagnostics get which
 does load the entire stack but does no real work.

 The training one (psc-dev1) is consistently posting response times for
 a complete load of under 2sec and sometimes as high as 10sec

 The production one polytechnic-wa during the same period is almost
 consistantly getting DeadlineExceeded errors very early into the
 startup (just after some inital imports and  just starting main)

 Its a big concern to me that two instances running the same code can
 show such wildly different performance.

 Can anyone from google have a look at this, (is one of my instances
 stuck on some flaky hardware for instance)

 Thanks

 Tim Hoffman

--

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




[google-appengine] Re: Help please! - 2 apps running exactly the same code and same data (test/training vs prod) one constantly DeadLineExceeds the other doesn't

2009-11-25 Thread Jason C
We have an app (steprep) that is streaming out DeadlineExceededErrors
this morning.

We haven't seen this for a couple of weeks, but now it's back.

Can someone look into this?

Thanks,
j

On Nov 25, 7:53 am, Tim Hoffman zutes...@gmail.com wrote:
 I have also noted that the dashboard for polytechnic-wa is being
 updated
 Specifically the  Resource Summary, Current load and Errors
 sections.

 The other instance is right up to date.

 There definately seems to be something wrong with my polytechnic-wa
 instance.
 (I have reployed a couple of times to see if that would make any
 difference)

 T

 On Nov 25, 8:33 pm, Tim Hoffman zutes...@gmail.com wrote:



  Hi

  I have two app instances, one is being used for training and testing
  and the other is in production (or it should be if it wasn't
  DeadlineExceeding all the time).

  I am monitoring both and performing a simple diagnostics get which
  does load the entire stack but does no real work.

  The training one (psc-dev1) is consistently posting response times for
  a complete load of under 2sec and sometimes as high as 10sec

  The production one polytechnic-wa during the same period is almost
  consistantly getting DeadlineExceeded errors very early into the
  startup (just after some inital imports and  just starting main)

  Its a big concern to me that two instances running the same code can
  show such wildly different performance.

  Can anyone from google have a look at this, (is one of my instances
  stuck on some flaky hardware for instance)

  Thanks

  Tim Hoffman

--

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




[google-appengine] Re: Help please! - 2 apps running exactly the same code and same data (test/training vs prod) one constantly DeadLineExceeds the other doesn't

2009-11-25 Thread Jason C
We have an app (steprep) that is streaming out DeadlineExceededErrors
this morning.

We haven't seen this for a couple of weeks, but it's back now.

Can someone look into this and let us know?

Thanks,
j

On Nov 25, 7:53 am, Tim Hoffman zutes...@gmail.com wrote:
 I have also noted that the dashboard for polytechnic-wa is being
 updated
 Specifically the  Resource Summary, Current load and Errors
 sections.

 The other instance is right up to date.

 There definately seems to be something wrong with my polytechnic-wa
 instance.
 (I have reployed a couple of times to see if that would make any
 difference)

 T

 On Nov 25, 8:33 pm, Tim Hoffman zutes...@gmail.com wrote:



  Hi

  I have two app instances, one is being used for training and testing
  and the other is in production (or it should be if it wasn't
  DeadlineExceeding all the time).

  I am monitoring both and performing a simple diagnostics get which
  does load the entire stack but does no real work.

  The training one (psc-dev1) is consistently posting response times for
  a complete load of under 2sec and sometimes as high as 10sec

  The production one polytechnic-wa during the same period is almost
  consistantly getting DeadlineExceeded errors very early into the
  startup (just after some inital imports and  just starting main)

  Its a big concern to me that two instances running the same code can
  show such wildly different performance.

  Can anyone from google have a look at this, (is one of my instances
  stuck on some flaky hardware for instance)

  Thanks

  Tim Hoffman

--

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




[google-appengine] Re: Taskqueue not working...

2009-11-25 Thread deostroll
On Nov 25, 1:13 pm, djidjadji djidja...@gmail.com wrote:
 Have you looked at the TaskQueue menu of the dev_server admin page.
 You must start the Task yourself.

Sorry don't know how to do that...

--

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




Re: [google-appengine] Re: Taskqueue not working...

2009-11-25 Thread djidjadji
http://localhost:8080/_ah/admin/

On the left you see a menu entry TaskQueues

2009/11/25 deostroll deostr...@gmail.com:
 On Nov 25, 1:13 pm, djidjadji djidja...@gmail.com wrote:
 Have you looked at the TaskQueue menu of the dev_server admin page.
 You must start the Task yourself.

 Sorry don't know how to do that...

 --

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




--

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




[google-appengine] using gql Query -- is the 'OR' keyword supported?

2009-11-25 Thread dhruvg
hey,

i am trying to get data from the datastore in the following way;

Object.get(WHERE x = :a OR y = :b, a = True, b = False)

and I am getting the following error:
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\db\__init__.py, line 1008, in gql
*args, **kwds)
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\db\__init__.py, line 1828, in __init__
self._proto_query = gql.GQL(query_string, _app=app)
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 192, in __init__
if not self.__Select():
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 796, in __Select
return self.__From()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 817, in __From
return self.__Where()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 829, in __Where
return self.__FilterList()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 856, in __FilterList
return self.__OrderBy()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 1050, in __OrderBy
return self.__Limit()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 1092, in __Limit
return self.__Offset()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line , in __Offset
return self.__Hint()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 1134, in __Hint
return self.__AcceptTerminal()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 781, in __AcceptTerminal
self.__Error('Expected no additional symbols')
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\gql\__init__.py, line 721, in __Error
(error_message, self.__symbols[self.__next_symbol]))
BadQueryError: Parse Error: Expected no additional symbols at symbol
OR

It looks like GAE doesn't support the 'OR' keyword... is there a way
around this? Is there a way to combine results from two queries?

Thanks in advance.

--

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




[google-appengine] How to attach Tags to Blog post (in AppEngine application)

2009-11-25 Thread phpDays
Hi all!

Please, explain me how to implement next.

Used two models for Blog application:

class BlogPost(db.Model):
  title = db.StringProperty()
  text = db.TextProperty()
  tags = db.ListProperty(BlogTag)

class BlogTag(db.Model):
  name = db.StringProperty()
  # count of all posts marked at this tag
  count = db.IntProperty()

Please, help me understand how is good way to implement this task. I
have find all tags for selected post, and also select all posts for
specified tag name. How it implemented in AppEngine?

Thanks! (I'am sorry if this very simple question for you)

--

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




[google-appengine] No permissions for my applications

2009-11-25 Thread Marten
I have a problem with a permissions. I had the app engine registered
for my email address (not gmail). Now I moved my domain to Google
Apps. The problem is that I can't access my app engine on
http://appengine.google.com/a/my-domain, because it does not have the
information about the applications and I can't create a new ones. I
can access it on http://appengine.google.com/ (but only with
Explorer), can't create new applications (no permissions) and I can't
deploy the solution to already existing applications.
Do you know how can I solve this?

Dump:
Server: appengine.google.com.
Scanning files on local disk.
Scanned 500 files.
Initiating update.
Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u'marten-
online').
--- end server output ---
2009-11-25 18:17:04 (Process exited with code 1)

--

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




[google-appengine] Getting BadKeyError

2009-11-25 Thread deostroll
I enter data into the database using the following code:

import uuid
guid = str(uuid.uuid1()).replace('-','')
stocks = db.GqlQuery(select * from Portfolio where name = ' + nick +
')
for x in stocks:
t = ScripTracker(key_name=guid+str(x.scripcd))
t.api_key = guid
t.scripcd = str(x.scripcd)
t.status = 'working'
t.trials = 0
t.put()

I happened to note down manually one of the key_name values and then
tried to call that particular entity with db.get()

t = db.get('%s' % '4d875b61d92411deba7f85ac5b9931c5532628')

The above statement gives me an error saying:
---
Traceback (most recent call last):
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\webapp\__init__.py, line 507, in __call__
handler.get(*groups)
  File C:\My Websites\deostroll-stocktrack\main.py, line 213, in get
stock = db.get('%s' % '4d875b61d92411deba7f85ac5b9931c5532628')
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\db\__init__.py, line 1178, in get
keys, multiple = datastore.NormalizeAndTypeCheckKeys(keys)
  File C:\Program Files\Google\google_appengine\google\appengine\api
\datastore.py, line 138, in NormalizeAndTypeCheckKeys
keys = [_GetCompleteKeyOrError(key) for key in keys]
  File C:\Program Files\Google\google_appengine\google\appengine\api
\datastore.py, line 2145, in _GetCompleteKeyOrError
key = Key(arg)
  File C:\Program Files\Google\google_appengine\google\appengine\api
\datastore_types.py, line 355, in __init__
raise datastore_errors.BadKeyError('Invalid string key %s.' %
encoded)
BadKeyError: Invalid string key
4d875b61d92411deba7f85ac5b9931c5532628==.
--

What could be the problem?

--deostroll

--

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




[google-appengine] Re: How to attach Tags to Blog post (in AppEngine application)

2009-11-25 Thread Adam
Consider using taggable-mixin: http://code.google.com/p/taggable-mixin/

It is extracted from my blogging software, and it solves exactly the
problem that you are facing.

On Nov 25, 12:11 pm, phpDays anton.danilche...@gmail.com wrote:
 Hi all!

 Please, explain me how to implement next.

 Used two models for Blog application:

 class BlogPost(db.Model):
   title = db.StringProperty()
   text = db.TextProperty()
   tags = db.ListProperty(BlogTag)

 class BlogTag(db.Model):
   name = db.StringProperty()
   # count of all posts marked at this tag
   count = db.IntProperty()

 Please, help me understand how is good way to implement this task. I
 have find all tags for selected post, and also select all posts for
 specified tag name. How it implemented in AppEngine?

 Thanks! (I'am sorry if this very simple question for you)

--

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




[google-appengine] Re: Getting BadKeyError

2009-11-25 Thread deostroll
Ignore the question. Problem solved. Used ScripTracker.get_by_key_name
instead...

On Nov 25, 11:09 pm, deostroll deostr...@gmail.com wrote:
 I enter data into the database using the following code:

 import uuid
 guid = str(uuid.uuid1()).replace('-','')
 stocks = db.GqlQuery(select * from Portfolio where name = ' + nick +
 ')
 for x in stocks:
         t = ScripTracker(key_name=guid+str(x.scripcd))
         t.api_key = guid
         t.scripcd = str(x.scripcd)
         t.status = 'working'
         t.trials = 0
         t.put()

 I happened to note down manually one of the key_name values and then
 tried to call that particular entity with db.get()

 t = db.get('%s' % '4d875b61d92411deba7f85ac5b9931c5532628')

 The above statement gives me an error saying:
 ---
 Traceback (most recent call last):
   File C:\Program Files\Google\google_appengine\google\appengine\ext
 \webapp\__init__.py, line 507, in __call__
     handler.get(*groups)
   File C:\My Websites\deostroll-stocktrack\main.py, line 213, in get
     stock = db.get('%s' % '4d875b61d92411deba7f85ac5b9931c5532628')
   File C:\Program Files\Google\google_appengine\google\appengine\ext
 \db\__init__.py, line 1178, in get
     keys, multiple = datastore.NormalizeAndTypeCheckKeys(keys)
   File C:\Program Files\Google\google_appengine\google\appengine\api
 \datastore.py, line 138, in NormalizeAndTypeCheckKeys
     keys = [_GetCompleteKeyOrError(key) for key in keys]
   File C:\Program Files\Google\google_appengine\google\appengine\api
 \datastore.py, line 2145, in _GetCompleteKeyOrError
     key = Key(arg)
   File C:\Program Files\Google\google_appengine\google\appengine\api
 \datastore_types.py, line 355, in __init__
     raise datastore_errors.BadKeyError('Invalid string key %s.' %
 encoded)
 BadKeyError: Invalid string key
 4d875b61d92411deba7f85ac5b9931c5532628==.
 --

 What could be the problem?

 --deostroll

--

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




[google-appengine] Emailing With Google App Engine

2009-11-25 Thread Olivier Coste
Hi,

With Google App Engine you can use ressources to send emails but if
you don't want to go in junk folder do you need to do all stuffs for
deliverability (add ip in white list, register to junk report
program) ? I'm just asking if google app engine will be better then an
server dedicated to emailing.

Thanks for answers

Oliv

--

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




[google-appengine] One to many relationship problem

2009-11-25 Thread AppUser
Hi,

I have created 3 classes as follow:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Department {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent
private String deptName;
   // Getters and setters
}

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Person {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent
private String firstName;

@Persistent
private String lastName;

@Persistent
private Department department;

@Persistent(mappedBy = employee)
private ListMonthlySalary monthlySalaryList;

   // Getters and setters
}

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MonthlySalary {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent
private Date salaryDate;

@Persistent
private double amount;

@Persistent
private Person employee;

   // Getters and setters
}

Now, I have used JDO to store these objects in following way:
Department department = null;

PersistenceManager pm = PMF.get().getPersistenceManager();
Person employee = null;
try {
// / Employee
KeyFactory.Builder keyBuilder = new KeyFactory.Builder
(Department.class.getSimpleName(), D11);

department = new Department();
department.setKey(keyBuilder.getKey());
department.setDeptName(ennovate);


keyBuilder = new 
KeyFactory.Builder(Person.class.getSimpleName(),
E01);

employee = new Person();
employee.setKey(keyBuilder.getKey());
employee.setFirstName(Chetan);
employee.setLastName(Soni);
employee.setDepartment(department);

pm.makePersistent(employee);
}
catch (Exception e) {
e.printStackTrace();
}
finally {
pm.close();
}

pm = PMF.get().getPersistenceManager();
try {
// / Monthly Salary 1
KeyFactory.Builder keyBuilder = new KeyFactory.Builder
(Person.class.getSimpleName(), E01);

keyBuilder.addChild(MonthlySalary.class.getSimpleName(), M01);

MonthlySalary monthlySalary = new MonthlySalary();
monthlySalary.setKey(keyBuilder.getKey());
monthlySalary.setAmount(5);

monthlySalary.setEmployee(pm.getObjectById(Person.class, E01));
monthlySalary.setSalaryDate(new Date());

pm.makePersistent(monthlySalary);
}
catch (Exception e) {
e.printStackTrace();
}
finally {
pm.close();
}

pm = PMF.get().getPersistenceManager();
try {
// / Monthly Salary 2
KeyFactory.Builder keyBuilder = new KeyFactory.Builder
(Person.class.getSimpleName(), E01);

keyBuilder.addChild(MonthlySalary.class.getSimpleName(), M02);

MonthlySalary monthlySalary = new MonthlySalary();
monthlySalary.setKey(keyBuilder.getKey());
monthlySalary.setAmount(6);

monthlySalary.setEmployee(pm.getObjectById(Person.class, E01));
monthlySalary.setSalaryDate(new Date());

pm.makePersistent(monthlySalary);
}
catch (Exception e) {
e.printStackTrace();
}
finally {
pm.close();
}

Now When I access MonthlySalary using:

String query1 = select from  + MonthlySalary.class.getName();
ListMonthlySalary alist = (ListMonthlySalary) pm.newQuery
(query1).execute();

for(MonthlySalary monthlySalary : alist) { // Giving error at this
line
System.out.println(monthlySalary.getEmployee().getFirstName());
}

It's giving me the error:
org.datanucleus.exceptions.NucleusUserException: Field
org.example.wa.MonthlySalary.employee should be able to provide a
reference to its parent but the entity does not have a parent.  Did
you perhaps try to establish an instance of
org.example.wa.MonthlySalary as the child of an instance of

[google-appengine] One to many relationship problem

2009-11-25 Thread AppUser
Hi,

I have created 3 classes as follow:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Department {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent
private String deptName;

}

--

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




Re: [google-appengine] What IDE the community recommend to developers of Python+GAE

2009-11-25 Thread 胡江海
 Thank you for your email.

I can not use my spreadsheet of google apps. What's happened? Can you help
me.
I am in China.
Thanks!

hu jianghai

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





-- 
胡江海
宁波市发展和改革委员会
057487185573
13777141615

--

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




Re: [google-appengine] Emailing With Google App Engine

2009-11-25 Thread Barry Hunter
personal opinion
If AppEngine was to get special treatment to make emails bypass spam
filters, surely it would just become a prime target for spammers. And
that can only be a bad thing.
/


On 25/11/2009, Olivier Coste coste.o...@gmail.com wrote:
 Hi,

  With Google App Engine you can use ressources to send emails but if
  you don't want to go in junk folder do you need to do all stuffs for
  deliverability (add ip in white list, register to junk report
  program) ? I'm just asking if google app engine will be better then an
  server dedicated to emailing.

  Thanks for answers

  Oliv


  --

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



--

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




[google-appengine] How can I digitaly sign documents in a GAE aplication

2009-11-25 Thread Felipe
Hello,

I am developing an aplication on wich I need to digitaly sign
documents, using a x509 certificate and a private key. For what I have
been reading, I can't get permissions to read user's arquive files, so
I can't read its private key to sign under client side, because its
out of the sandbox. The applet workaround for something like is
signing the applet and make the user acept the applet certificate.

So my first question is: Is there any way I can do something like
signing an applet (signing GAE aplication?) to get this kind of
permissions?

My second question is about interation with browser. I haven't study
much of it yet, but is it possible to send a request to the browser
and make it sign and retrieve the signed document? I could achieve
this using smart card's, for example.

Thanks in advance.

--

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




[google-appengine] ANN: MVCEngine, a lightweight MVC Framework for AppEngine applications

2009-11-25 Thread Adam
Announcing MVCEngine, the lightweight MVC Framework for Google
Appengine.
http://code.google.com/p/gae-mvc-engine/

Inspired by Ruby on Rails and ASP.NET MVC, MVCEngine brings the
familiar MVC pattern as well as lots of other great ideas to AppEngine
programming to make your application development faster, cleaner and
more fun. It includes extensive documentation and a fully-functional
example blogging application (see it in action at
blog.adamcrossland.net).

Features
* Rails-like project directory structure
* Automatic mapping of request variables to method parameters:
http://code.google.com/p/gae-mvc-engine/wiki/FormParametersAsMethodParameters
* A mechanism for mapping requests to different versions of actions
based on the HTTP Verb of the request:
http://code.google.com/p/gae-mvc-engine/wiki/OverloadingActionMethods
* Application-wide, controller-specific and action-specific before and
after filters
* A simple and convenient mechanism for passing objects to templates
* A functional-testing mechanism

It is available under the Apache 2.0 license, so you may use the code
as you please, commercial applications included. While you are not
obligated to givee changes back to the core code base, contributions
are welcome.

An important note regarding the documentation file, MVCEngine.html:
this is a TiddlyWiki file, and if you simply try to open it from
Google Code's Browse Source window, all of the important TiddlyWiki
functionality will get stripped out, and you will see something that
is very difficult to read. It is better to check out the course code
and view MVCEngine.html loaded locally.

--

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




[google-appengine] Re: Help please! - 2 apps running exactly the same code and same data (test/training vs prod) one constantly DeadLineExceeds the other doesn't

2009-11-25 Thread divricean
It happens to me too, application was running OK but from 11-20-2009
it constantly crashes with HardDeadlineExceededError. The code did not
changed. Also locally it runs fine.

On Nov 25, 2:33 pm, Tim Hoffman zutes...@gmail.com wrote:
 Hi

 I have two app instances, one is being used for training and testing
 and the other is in production (or it should be if it wasn't
 DeadlineExceeding all the time).

 I am monitoring both and performing a simple diagnostics get which
 does load the entire stack but does no real work.

 The training one (psc-dev1) is consistently posting response times for
 a complete load of under 2sec and sometimes as high as 10sec

 The production one polytechnic-wa during the same period is almost
 consistantly getting DeadlineExceeded errors very early into the
 startup (just after some inital imports and  just starting main)

 Its a big concern to me that two instances running the same code can
 show such wildly different performance.

 Can anyone from google have a look at this, (is one of my instances
 stuck on some flaky hardware for instance)

 Thanks

 Tim Hoffman

--

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




[google-appengine] Re: No permissions for my applications

2009-11-25 Thread nickmilon
May be deleting browser cookies will do the job.
Happy codding
Nick

On Nov 25, 7:28 pm, Marten mar...@include.cz wrote:
 I have a problem with a permissions. I had the app engine registered
 for my email address (not gmail). Now I moved my domain to Google
 Apps. The problem is that I can't access my app engine 
 onhttp://appengine.google.com/a/my-domain, because it does not have the
 information about the applications and I can't create a new ones. I
 can access it onhttp://appengine.google.com/(but only with
 Explorer), can't create new applications (no permissions) and I can't
 deploy the solution to already existing applications.
 Do you know how can I solve this?

 Dump:
 Server: appengine.google.com.
 Scanning files on local disk.
 Scanned 500 files.
 Initiating update.
 Error 403: --- begin server output ---
 You do not have permission to modify this app (app_id=u'marten-
 online').
 --- end server output ---
 2009-11-25 18:17:04 (Process exited with code 1)

--

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




Re: [google-appengine] Map Reduce on Google App Engine

2009-11-25 Thread Ikai L (Google)
There are a couple of open source implementations of MapReduce. Here's one
of the top results from searching on Google:

http://code.google.com/p/httpmr/

Can you go ahead and star or comment on the open issue?

http://code.google.com/p/googleappengine/issues/detail?id=112

On Tue, Nov 24, 2009 at 3:19 AM, andreas diavastos diavas...@gmail.comwrote:

 Hi,

 I was wondering if I App Engine supports Map Reduce for a user to run.
 We would like to run an application(word count) on AppEngine and we
 would need to use
 the Map Reduce programming model on that application(otherwise it
 would be worthless to run it on AppEngine).
 And my question is whether this operation is supported on the
 AppEngine.

 Thanks in advance,
 Andreas Diavastos

 --

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





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




Re: [google-appengine] Remote Login Problem

2009-11-25 Thread Ikai L (Google)
When you say remote API, are you referring to the Users service? If so,
are you using a custom Google Apps domain?

On Tue, Nov 24, 2009 at 3:14 AM, fujara fuj...@synium.de wrote:

 Hi

 I can't login with the remote api for one of my apps. The login for
 the other apps are working without problems.
 Output: Invalid username or password.
 But the username and passwords are correct.

 Any ideas what could be the problem?

 --

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





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




Re: [google-appengine] How to remove property of java object(POJO) with safty?

2009-11-25 Thread Ikai L (Google)
App Engine uses soft schemas for its entities. That is, if you still need
to read from a property but no longer need to write from it, simply leave
the property field in your entity. You won't be able to display the property
if you remove it from your entity, but you can build your application such
that it does not accept new writes to the property.

Here's a pretty good session from Google I/O 2009 that discusses this:
http://code.google.com/events/io/2009/sessions/SofterSideofSchemas.html

On Mon, Nov 23, 2009 at 7:34 PM, sea ok_...@163.com wrote:

 Hi

 Environment :GAE for java, JPA

 I defined a java object(POJO) and stored some data in it. But later I
 found a property of that java object(POJO) was useless,
 and there was no data in that property.So I removed that property, but
 that caused a big problem, the data in that
 java object(POJO) can not be displayed by program.

 So could you tell me how to deal with it? I want to remove the useless
 property of java object(POJO) , and want original data can be
 displayed by program.

 Thanks a lot.

 --

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





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




[google-appengine] Dashboard summary details have been stuck for over 8 hours

2009-11-25 Thread Tim Hoffman
Hi

The detail of on the dashboard summary of my instance (polytchnic-wa)
has been stuck for at least 8 hours.

I have several other instances running with dashboard details that are
up to date so its not a general problem.
THis particular instance has been having other issues too.

See 
http://groups.google.com.au/group/google-appengine/browse_thread/thread/971d058a0ccca59d/d5a402a8f069c1e1#d5a402a8f069c1e1

Can someone from google please at least acknowledge they they have
viewed these two issues.

Thank you

Tim Hoffman

--

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




Re: [google-appengine] Dashboard summary details have been stuck for over 8 hours

2009-11-25 Thread Ikai L (Google)
Tim,

I'm looking at your dashboard right now. What is incorrect about the data?

On Wed, Nov 25, 2009 at 1:56 PM, Tim Hoffman zutes...@gmail.com wrote:

 Hi

 The detail of on the dashboard summary of my instance (polytchnic-wa)
 has been stuck for at least 8 hours.

 I have several other instances running with dashboard details that are
 up to date so its not a general problem.
 THis particular instance has been having other issues too.

 See
 http://groups.google.com.au/group/google-appengine/browse_thread/thread/971d058a0ccca59d/d5a402a8f069c1e1#d5a402a8f069c1e1

 Can someone from google please at least acknowledge they they have
 viewed these two issues.

 Thank you

 Tim Hoffman

 --

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





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




Re: [google-appengine] using gql Query -- is the 'OR' keyword supported?

2009-11-25 Thread Ikai L (Google)
Here's the full reference for GQL:

http://code.google.com/appengine/docs/python/datastore/gqlreference.html

There's no native OR query, but there is an 'IN' query which provides
functionality similar to 'OR'.

On Wed, Nov 25, 2009 at 9:18 AM, dhruvg dhruv.g...@gmail.com wrote:

 hey,

 i am trying to get data from the datastore in the following way;

 Object.get(WHERE x = :a OR y = :b, a = True, b = False)

 and I am getting the following error:
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \db\__init__.py, line 1008, in gql
*args, **kwds)
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \db\__init__.py, line 1828, in __init__
self._proto_query = gql.GQL(query_string, _app=app)
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 192, in __init__
if not self.__Select():
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 796, in __Select
return self.__From()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 817, in __From
return self.__Where()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 829, in __Where
return self.__FilterList()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 856, in __FilterList
return self.__OrderBy()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 1050, in __OrderBy
return self.__Limit()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 1092, in __Limit
return self.__Offset()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line , in __Offset
return self.__Hint()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 1134, in __Hint
return self.__AcceptTerminal()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 781, in __AcceptTerminal
self.__Error('Expected no additional symbols')
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \gql\__init__.py, line 721, in __Error
(error_message, self.__symbols[self.__next_symbol]))
 BadQueryError: Parse Error: Expected no additional symbols at symbol
 OR

 It looks like GAE doesn't support the 'OR' keyword... is there a way
 around this? Is there a way to combine results from two queries?

 Thanks in advance.

 --

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





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




[google-appengine] Re: Dashboard summary details have been stuck for over 8 hours

2009-11-25 Thread Tim Hoffman
HI

Current load and errors haven't had any new data added during that
time,
For instance I am making a request every 2 minutes to measure
application stack load times and in this
instance (polytechnic-wa) it is not even listed in the Current load
section.  And none of the errors we are getting are listed
in errors.  On the other hand psc-dev1 lists all of the these timing
requests in current load.

T

On Nov 26, 6:17 am, Ikai L (Google) ika...@google.com wrote:
 Tim,

 I'm looking at your dashboard right now. What is incorrect about the data?



 On Wed, Nov 25, 2009 at 1:56 PM, Tim Hoffman zutes...@gmail.com wrote:
  Hi

  The detail of on the dashboard summary of my instance (polytchnic-wa)
  has been stuck for at least 8 hours.

  I have several other instances running with dashboard details that are
  up to date so its not a general problem.
  THis particular instance has been having other issues too.

  See
 http://groups.google.com.au/group/google-appengine/browse_thread/thre...

  Can someone from google please at least acknowledge they they have
  viewed these two issues.

  Thank you

  Tim Hoffman

  --

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

 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine

--

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




[google-appengine] Re: Help please! - 2 apps running exactly the same code and same data (test/training vs prod) one constantly DeadLineExceeds the other doesn't

2009-11-25 Thread Tim Hoffman
The instance with problems seems to have settled down.

The period of high numbers of DeadLineExceeded ran from just around
the time statistic got reset through too around 5:40am (google time)
I define google time as the time stamp in the logs.

Which is a very long period of extreme startup times. (I working hard
on reducing my startup times as much as possible) and I believe I can
reduce
them by a fair amount in a normally running system

However to have two instances running the same code release and
essentially performing the exact same task (that I am monitoring)
and one consistently doing a full stack load in = 10sec vs consistent
DeadlineExceeded error is a real worry because it means to
me I can get an instance caught in a performance backwater that
googles main monitoring tools (like the system status) are probably
not going to
see at all.

T

On Nov 25, 9:53 pm, Tim Hoffman zutes...@gmail.com wrote:
 I have also noted that the dashboard for polytechnic-wa is being
 updated
 Specifically the  Resource Summary, Current load and Errors
 sections.

 The other instance is right up to date.

 There definately seems to be something wrong with my polytechnic-wa
 instance.
 (I have reployed a couple of times to see if that would make any
 difference)

 T

 On Nov 25, 8:33 pm, Tim Hoffman zutes...@gmail.com wrote:

  Hi

  I have two app instances, one is being used for training and testing
  and the other is in production (or it should be if it wasn't
  DeadlineExceeding all the time).

  I am monitoring both and performing a simple diagnostics get which
  does load the entire stack but does no real work.

  The training one (psc-dev1) is consistently posting response times for
  a complete load of under 2sec and sometimes as high as 10sec

  The production one polytechnic-wa during the same period is almost
  consistantly getting DeadlineExceeded errors very early into the
  startup (just after some inital imports and  just starting main)

  Its a big concern to me that two instances running the same code can
  show such wildly different performance.

  Can anyone from google have a look at this, (is one of my instances
  stuck on some flaky hardware for instance)

  Thanks

  Tim Hoffman

--

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




Re: [google-appengine] Re: Dashboard summary details have been stuck for over 8 hours

2009-11-25 Thread Ikai L (Google)
I put a bit of load and I am seeing the results reflected in the dashboard.
It's not instantaneous but the stats do look like they are being updated.

On Wed, Nov 25, 2009 at 2:45 PM, Tim Hoffman zutes...@gmail.com wrote:

 HI

 Current load and errors haven't had any new data added during that
 time,
 For instance I am making a request every 2 minutes to measure
 application stack load times and in this
 instance (polytechnic-wa) it is not even listed in the Current load
 section.  And none of the errors we are getting are listed
 in errors.  On the other hand psc-dev1 lists all of the these timing
 requests in current load.

 T

 On Nov 26, 6:17 am, Ikai L (Google) ika...@google.com wrote:
  Tim,
 
  I'm looking at your dashboard right now. What is incorrect about the
 data?
 
 
 
  On Wed, Nov 25, 2009 at 1:56 PM, Tim Hoffman zutes...@gmail.com wrote:
   Hi
 
   The detail of on the dashboard summary of my instance (polytchnic-wa)
   has been stuck for at least 8 hours.
 
   I have several other instances running with dashboard details that are
   up to date so its not a general problem.
   THis particular instance has been having other issues too.
 
   See
  http://groups.google.com.au/group/google-appengine/browse_thread/thre.
 ..
 
   Can someone from google please at least acknowledge they they have
   viewed these two issues.
 
   Thank you
 
   Tim Hoffman
 
   --
 
   You received this message because you are subscribed to the Google
 Groups
   Google App Engine group.
   To post to this group, send email to google-appengine@googlegroups.com
 .
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
  --
  Ikai Lan
  Developer Programs Engineer, Google App Engine

 --

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





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




[google-appengine] Re: Help please! - 2 apps running exactly the same code and same data (test/training vs prod) one constantly DeadLineExceeds the other doesn't

2009-11-25 Thread Tim Hoffman
The only reason I was not completely dead in the water during this
time
is many of the pages can be served directly from memcache without
loading the whole stack,
so typically the front page would respond in 20ms but woe betide
hitting any page that wasn't in the stack.

My testing is specifically targetted at loading the stack when no page
is in cache and I was typically getting killed with DeadlineExceeded
before I could finish importing stuff (yep I working feverishly on
reducing this startup time by deferring things to later and only if
needed
and reducing the complexity of the configuration/registration process
of the components,)

T

On Nov 26, 6:57 am, Tim Hoffman zutes...@gmail.com wrote:
 The instance with problems seems to have settled down.

 The period of high numbers of DeadLineExceeded ran from just around
 the time statistic got reset through too around 5:40am (google time)
 I define google time as the time stamp in the logs.

 Which is a very long period of extreme startup times. (I working hard
 on reducing my startup times as much as possible) and I believe I can
 reduce
 them by a fair amount in a normally running system

 However to have two instances running the same code release and
 essentially performing the exact same task (that I am monitoring)
 and one consistently doing a full stack load in = 10sec vs consistent
 DeadlineExceeded error is a real worry because it means to
 me I can get an instance caught in a performance backwater that
 googles main monitoring tools (like the system status) are probably
 not going to
 see at all.

 T

 On Nov 25, 9:53 pm, Tim Hoffman zutes...@gmail.com wrote:

  I have also noted that the dashboard for polytechnic-wa is being
  updated
  Specifically the  Resource Summary, Current load and Errors
  sections.

  The other instance is right up to date.

  There definately seems to be something wrong with my polytechnic-wa
  instance.
  (I have reployed a couple of times to see if that would make any
  difference)

  T

  On Nov 25, 8:33 pm, Tim Hoffman zutes...@gmail.com wrote:

   Hi

   I have two app instances, one is being used for training and testing
   and the other is in production (or it should be if it wasn't
   DeadlineExceeding all the time).

   I am monitoring both and performing a simple diagnostics get which
   does load the entire stack but does no real work.

   The training one (psc-dev1) is consistently posting response times for
   a complete load of under 2sec and sometimes as high as 10sec

   The production one polytechnic-wa during the same period is almost
   consistantly getting DeadlineExceeded errors very early into the
   startup (just after some inital imports and  just starting main)

   Its a big concern to me that two instances running the same code can
   show such wildly different performance.

   Can anyone from google have a look at this, (is one of my instances
   stuck on some flaky hardware for instance)

   Thanks

   Tim Hoffman

--

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




[google-appengine] Send message to remote server MDB Queue

2009-11-25 Thread ma
I have a question. I have a more intensive (threaded) process that I
need to be crunched. I have my own VPS server that I use to spawn
threads. It is actually running Glassfish 2.1 and has a Message-Driven
Bean. I'd like to know if I can use my AppEngine as the frontend (to
do the quick determination if the request is legitimate), and then
send the message to be crunched over to the MDB on my remote server?

Thanks

--

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




Re: [google-appengine] What IDE the community recommend to developers of Python+GAE

2009-11-25 Thread Will
It is because the regime blocks the access to google docs/spreadsheet. It
appears that after Obama's visit to China, it became available again. I'm
able to access with https.

Will

2009/11/25 胡江海 hjh6884...@gmail.com


  Thank you for your email.

 I can not use my spreadsheet of google apps. What's happened? Can you help
 me.
 I am in China.
 Thanks!

 hu jianghai

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





 --
 胡江海
 宁波市发展和改革委员会
 057487185573
 13777141615

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


--

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




[google-appengine] MP3 Data Retreival

2009-11-25 Thread MajorProgamming
Is there any way to somehow fetch an external MP3 file (i.e. from
another website), and then calculate the length of the MP3 file.

I don't need the actual data of the file, I just want the length of it
(time it runs).

Keep in mind that these files can be as big as 25MB...

Thanks,

--

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




[google-appengine] Please google help - exactly at 11:00pm google time one of two instances running the same code started DeadlineExceeded errors (several days running)

2009-11-25 Thread Tim Hoffman
Hi

Dead on 11:00pm google time (timestamp from logs) I started getting
DeadlineExceeded errors on my instance polytechnic-wa and the same
instance psc-dev1 is running normally.  As I have mentioned in another
thread these  are both running identical code sets.

I am generally getting error DeadlineExceeded for anything I don't
have in memcache/

I have a specific monitoring request that is never cached that is
identical on both systems that I poll every 2 mins
so that I can measure warm start/cold start times.

The other server which unfortunately is not the production on psc-dev1
is behaving exactly as it has all day.
polytechnic-wa on the other hand all requests have significantly
increased in load and processing times.

Something must be happening in specific parts of google infrastructure
or I believe I would see very similiar  patterns of behaviour between
the two in terms of cold start times.

How can I get someone to invstigate this.  It is definately a
recurring problem we are seeing each day.
Hopefully it won't extend for 8 or so hours that it did yesterday.
But this re-occurring problem is adding considerable pressure from
quarters who aren't keen on app engine.

Thank you

Tim Hoffman

--

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




Re: [google-appengine] MP3 Data Retreival

2009-11-25 Thread Niklas Rosencrantz
On Thu, Nov 26, 2009 at 5:14 AM, MajorProgamming sefira...@gmail.com wrote:

 Is there any way to somehow fetch an external MP3 file (i.e. from
 another website), and then calculate the length of the MP3 file.

 I don't need the actual data of the file, I just want the length of it
 (time it runs).

 Keep in mind that these files can be as big as 25MB...

 Thanks,

Hello,
Good question guaranteed to depend on host config (could be custom or
fake descriptions) while one mentioned way is use HTTP HEAD
#Call HTTP HEAD in Python
import httplib
conn=httplib.HTTPConnection(www.abc.com)
conn.request(HEAD, /dir/file1.mp3)
res=conn.getresponse()
fileSize=res.getheader('content-length')
#or res.getheaders() for all headers
conn.close()

--

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