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

2010-01-17 Thread andy.booth
Have you put the three .jar files in war\WEB-INF\lib too? It can't
find the base Servlet for Resteasy.

I don't think there's a huge benefit of trying to implement a standard
that is already done by Jersey, Resteasy, Restlet and Apache Wink,
which already provides a useful set of choices.

My issue with JAX-RS and Guice together has been initialization time -
in the 6 - 10 second region, with JPA and a templating framework,
rather than the lengthy times suggested with other types of web
framework. In particular, I switch off all class path scanning for
Resource and Providers in Jersey. In fact looking at the documentation
for Resteasy, their property of resteasy.scan = false seems quite good
in this regard. So I might consider moving over to Resteasy.

And many of the JAX-RS implementations add GZIP and Etag type plugins
that help create elegant REST applications. Which would take time with
a custom implementation.

Andy



On Jan 16, 10:19 pm, ChrisDane gregersen@gmail.com wrote:
 Thanks Jeff,

 Thanks, I am just trying to set it up:

 1) Downloaded the latest(1.2.1.GA)
 2) In Eclipse created a new GAE Project
 3) I have been looking in the book RESTful Java with JAX-RS, 1st
 Edition - found the sample code for oreilly-workbook/ex03_1
 4) Copied the ( Customer.java  CustomerResource.java 
 ShoppingApplication.java ) classes to my new GAE project.
 5) Added to Class Path: serverlet-api-2.5.jar   
 webserver-1.3.3.jar     jsr311-api-1.1.jar
 6) Changed the web.xml serverlet to :

 web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns=http://java.sun.com/xml/ns/javaee;
 xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
 xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
  version=2.5
     display-nameArchetype Created Web Application/display-name

     servlet
         servlet-nameResteasy/servlet-name
         servlet-
 classorg.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher/
 servlet-class
         init-param
             param-namejavax.ws.rs.Application/param-name
             param-
 valuecom.restfully.shop.services.ShoppingApplication/param-value
         /init-param
     /servlet

     servlet-mapping
         servlet-nameResteasy/servlet-name
         url-pattern/*/url-pattern
     /servlet-mapping
         welcome-file-list
                 welcome-fileindex.html/welcome-file
         /welcome-file-list
 /web-app

 7) And I am getting an Error:
 ..
 com.google.apphosting.utils.jetty.JettyLogger warn
 WARNING: EXCEPTION
 java.lang.ClassNotFoundException:
 org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
 .

 Can you point out anything in my steps that I am doing wrong?

 Lastly, would I loos anything if I figured out to implement my own
 javax.ws.rs.Application?

 Thanks again
 Regards
 ChrisDane

 On Jan 16, 10:23 pm, Jeff Schnitzer j...@infohazard.org wrote:



  JBoss Resteasy works fine without any special customization for GAE.
  I use it extensively.

 http://www.jboss.org/resteasy

  Jeff

  On Sat, Jan 16, 2010 at 1:09 PM, ChrisDane gregersen@gmail.com wrote:
   Hi there,
   Has anyone seen any examples on using only JAX-RS on GAE.

   Implementing the javax.ws.rs.core.Application and A resource Class
   etc?

   Thanks in advance
   Regards
   ChrisDane

   --
   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: Can an Integer be a primary key for JDO?

2010-01-17 Thread Bert Peters
Thank you. This was the information I needed. Data reduction was no
goal, i just needed a numeric key.

On Jan 16, 10:03 pm, Jeff Schnitzer j...@infohazard.org wrote:
 I don't know what JDO will do, but I can tell you that this won't help
 you reduce data storage requirements, if that is your goal.

 Some things to know about the Low-Level API, and thus any layer on top
 (JDO, JPA, Objectify, Twig, whatever):

  * Numeric keys will be persisted as a Long (or String).

  * All numeric property values get persisted as a Long (even if they
 get converted back to something smaller by the library).

 JeffOn Sat, Jan 16, 2010 at 5:59 AM, Bert Peters bert.ljpet...@gmail.com 
 wrote:
  Thank you for that information, but that's not what i meant.
  What i did mean is whether this is correct/possible:

  @PrimaryKey
  @Persistent(idGeneratorStrategy=INCREMENT)
  private Integer id;

  On Jan 16, 2:25 pm, jd jdpatter...@gmail.com wrote:
  Keys can either have a system generated long id (not set by you) or
  a String name.

  There used to be no way to create an Entity with a long - but now (as
  of 1.2.7?) there is a constructor Entity(Key) and you can create a key
  with a long.  But the docs say:

  Creating an entity for the purpose of insertion (as opposed to
  update) with a key that has its id field set is strongly discouraged
  unless the key was returned by a KeyRange.

  So basically the answer is still no.

  Twig gets around this by converting whatever field you declare as a
  @Key into a String and back again - even Integers.

  On Jan 16, 7:02 pm, Bert Peters bert.ljpet...@gmail.com wrote:

   I was just wondering whether I could use an Integer for a primary key
   in JDO, as it would be a great convenience in my application.
   I couldn't really find an answer to this in the documentation, so I
   ask you. Can I?

  --
  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] Memcache data life cycle

2010-01-17 Thread Max
Hi GAE gurus,

Is there anyone who can tell me the life-cycle of data cached in
memcache?

I found those cached in memcache won't be expired even I re-deploy my
project. Does that means I can use it like a datastore without
transaction support?

Best regards,
Max
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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] Memcache data life cycle

2010-01-17 Thread Qian Qiao
On Sun, Jan 17, 2010 at 19:04, Max thebb...@gmail.com wrote:
 Hi GAE gurus,

 Is there anyone who can tell me the life-cycle of data cached in
 memcache?

 I found those cached in memcache won't be expired even I re-deploy my
 project. Does that means I can use it like a datastore without
 transaction support?

 Best regards,
 Max

No, you can't use it as a datastore, it is only a cache as the name
suggests, even if you set the cache entries to never expire, it might
end up being replaced when the underlying system thinks necessary.

-- Joe

-- 
Two things that are infinite, the universe and my stupidity, and I'm
not sure about the universe.
-- 
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] AppEngine returns SUCCESS status even if it fails to process Chat Msg

2010-01-17 Thread Prashant Gupta
Hi,

I have noticed that sometimes AppEngine fails to process some Chat Msgs
(requests), especially when it receives a (Chat Msg) request after a long
gap (5 min in my case) or when request rate is high, showing following error
in logs and returns status SUCCESS.

W01-17 03:19AM 26.384

Request was aborted after waiting too long to attempt to service your
request. Most likely, this indicates that you have reached your
simultaneous dynamic request limit. This is almost always due to
excessively high latency in your app. Please see
http://code.google.com/appengine/docs/quotas.html for more details.


I have also checked that AppEngine doesn't reprocesses those failed Chat
Msgs (requests) as it does for failed inbound mails. If it not reprocessing
the failed request then why it returns status SUCCESS ? I remember, earlier
AppEngine used to reprocess failed Chat Msgs also, why it doesn't now? Has
it stopped reprocessing failed inbound mails also??


--
Prashant
-- 

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] Serious datastore problem

2010-01-17 Thread Max
I can't find way to report serious problem.
We have uploaded real customer data and there is bug in datastore
results.

But I can't find way to send screenshots and queries that will not be
seem by everyone.
I can't show customer emails or IDs.

In short problem is that when I do following query (I have changed IDs
and table names)

SELECT * FROM Table1 WHERE ctime = DATETIME('2009-12-01 00:00:00')
ORDER BY ctime

key - is key
cid - is indexed long
ctime - is indexed date

first 2 lines are
cid:1234cid:2009-12-01 00:00:37
cid:2345ctime:2009-12-01 00:01:11

when I filter it to show cis=2345 only

SELECT * FROM Table1 WHERE cid= 2345 and ctime = DATETIME('2009-12-01
00:00:00') ORDER BY ctime


first 2 lines are
cid:2345ctime:2009-12-01 00:03:26
cid:2345ctime:2009-12-01 00:15:09




I expected to see cid:2345 ctime:2009-12-01 00:01:11  as first line
in second query.
But it is missing.

We have uploaded 5,426,307 entities (9 GBytes) data to datastore and
our report for December 2009  till now showed that
countMissing = 28253
countExists = 17555



How can I contact you privately? This data is stored on paid account.

Thanks, Max
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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: App Engine cold starts and overly aggressive cycling

2010-01-17 Thread WSouza
Mine happens at pretty random rates too

 - What is your application ID?
footbattle

 - How do you know it is being cycled out? You'll need to insert some code
 that only gets called when the app cold starts.
Random Request was aborted after waiting too long to attempt to
service your request. with about 10s and 0s cpu all over the day, and
when it happens, it keeps happening at high rates for a couple
minutes. I know that happens at a 100% rate after I upload a new
version, but it happens at random during the day too, and a lot. (I
don't know if that is a cold start or not, but the symptoms look the
same)

 - How much time of inactivity does it take before your application is cycled 
 out?
Less than one second to a couple seconds, I have more than 400.000
requests a day with about 800 active users, at the requests per second
chart, the lowest it gets is about 3-4 requests per second.

 - What frameworks or libraries are you loading?
None, just a light-weight home-made one, and we use the low-level API
to avoid performance losses.




On Jan 16, 7:44 am, Jorge athenas...@gmail.com wrote:
  - What is your application ID?

 wcondominios

  - How do you know it is being cycled out? You'll need to insert some code
  that only gets called when the app cold starts.

 I just see incredibly long response times. This, for instance:

 #
 01-16 04:29AM 02.107 / 302 4752ms 6718cpu_ms 126api_cpu_ms 0kb Mozilla/
 5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like
 Gecko) Chrome/3.0.195.38 Safari/532.0,gzip(gfe)
 See details

 While the usual, once the app is warm is more like this:

 #
 01-16 04:30AM 20.341 / 302 183ms 191cpu_ms 95api_cpu_ms 0kb Mozilla/
 5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like
 Gecko) Chrome/3.0.195.38 Safari/532.0,gzip(gfe)
 See details

  - How much time of inactivity does it take before your application is cycled
  out?

 Very random, from a few seconds to a few  hours.

  - What time or days does this seem to happen?

 Random

  - What frameworks or libraries are you loading?

 None. Plain JSPs and Servlets

 Hope this helps. This is one of the major concerns i have after having
 adopted GAE to host this app. I see this as an issue in the current
 preview GAE and I am confident it will be solved some time soon.

 Thanks,

 Jorge Gonzalez

 On Jan 15, 5:32 pm, Ikai Lan i...@google.com wrote:



  Hey everybody,

  We've been seeing more and more reports of applications being cycled out
  overly aggressively, resulting in some folks implementing (discouraged)
  workarounds to keep their application from being cycled out. The primary
  symptom of this problem is that your application will see lots of loading
  requests that fire up a new JVM, which, as many of you know can take
  anywhere from a few seconds with naked servlets to as much as twenty seconds
  when loading something like Spring MVC, JRuby on Rails or Grails.

  In theory, there is enough capacity such that as long as you get some
  traffic every few hours, you should not be getting cycled out, but we have
  been seeing reports of applications being cycled after only a minute or
  less. To help us figure out if these are app specific issues or App Engine
  issues, can you post the following information if you believe this is
  happening to you?

  - What is your application ID?
  - How do you know it is being cycled out? You'll need to insert some code
  that only gets called when the app cold starts.
  - How much time of inactivity does it take before your application is cycled
  out?
  - What time or days does this seem to happen?
  - What frameworks or libraries are you loading?

  Any other information you can provide would be helpful.

  --
  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: String as Primary key in JDO

2010-01-17 Thread Sahil Mahajan
Thanks Chau Huynh

Regards
Sahil

On Jan 17, 12:32 pm, Chau Huynh cmhu...@gmail.com wrote:
 Queries must go with indexes 
 (http://code.google.com/appengine/docs/java/datastore/queriesandindexe...)
 For the column, you can store it as lowercase/uppercase,
 For the display column, you can store the original value.

 On Sun, Jan 17, 2010 at 2:15 PM, Sahil Mahajan sahilm2...@gmail.com wrote:
  Isn't there any other way.
  I want to avoid toLowerCase().
  I want String to be case insensitive for database, but while
  displaying String to user I would like it to conserve case..
  I can compare strings through equalsIgnoreCase. But then I won't be
  able to make effective use of primary key.

  On Jan 17, 11:34 am, jd jdpatter...@gmail.com wrote:
   Just String#toLowerCase() the key when you store them

   On Jan 17, 1:11 am, sahil mahajan sahilm2...@gmail.com wrote:

I am using String as primary key in JDO. But it is case sensitive. It
considers name and NAME as different. Can I make it case sensitive?

--
Regards
Sahil Mahajan

  --
  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.
-- 
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: RESTfull - JAX-RS and GAE/J

2010-01-17 Thread ChrisDane
Thanks Andy,
I Just got it working, by adding alle the jar files from the
1.2.1.GA lib folder into my WAR/WEB-INF/lib... Question is do you
need alle the jar files in order to make it work?

/Christian

org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher

On Jan 17, 11:05 am, andy.booth andy.booth...@googlemail.com
wrote:
 Have you put the three .jar files in war\WEB-INF\lib too? It can't
 find the base Servlet for Resteasy.

 I don't think there's a huge benefit of trying to implement a standard
 that is already done by Jersey, Resteasy, Restlet and Apache Wink,
 which already provides a useful set of choices.

 My issue with JAX-RS and Guice together has been initialization time -
 in the 6 - 10 second region, with JPA and a templating framework,
 rather than the lengthy times suggested with other types of web
 framework. In particular, I switch off all class path scanning for
 Resource and Providers in Jersey. In fact looking at the documentation
 for Resteasy, their property of resteasy.scan = false seems quite good
 in this regard. So I might consider moving over to Resteasy.

 And many of the JAX-RS implementations add GZIP and Etag type plugins
 that help create elegant REST applications. Which would take time with
 a custom implementation.

 Andy

 On Jan 16, 10:19 pm, ChrisDane gregersen@gmail.com wrote:



  Thanks Jeff,

  Thanks, I am just trying to set it up:

  1) Downloaded the latest(1.2.1.GA)
  2) In Eclipse created a new GAE Project
  3) I have been looking in the book RESTful Java with JAX-RS, 1st
  Edition - found the sample code for oreilly-workbook/ex03_1
  4) Copied the ( Customer.java  CustomerResource.java 
  ShoppingApplication.java ) classes to my new GAE project.
  5) Added to Class Path: serverlet-api-2.5.jar   
  webserver-1.3.3.jar     jsr311-api-1.1.jar
  6) Changed the web.xml serverlet to :

  web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns=http://java.sun.com/xml/ns/javaee;
  xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
  xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/we...;
   version=2.5
      display-nameArchetype Created Web Application/display-name

      servlet
          servlet-nameResteasy/servlet-name
          servlet-
  classorg.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher/
  servlet-class
          init-param
              param-namejavax.ws.rs.Application/param-name
              param-
  valuecom.restfully.shop.services.ShoppingApplication/param-value
          /init-param
      /servlet

      servlet-mapping
          servlet-nameResteasy/servlet-name
          url-pattern/*/url-pattern
      /servlet-mapping
          welcome-file-list
                  welcome-fileindex.html/welcome-file
          /welcome-file-list
  /web-app

  7) And I am getting an Error:
  ..
  com.google.apphosting.utils.jetty.JettyLogger warn
  WARNING: EXCEPTION
  java.lang.ClassNotFoundException:
  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
  .

  Can you point out anything in my steps that I am doing wrong?

  Lastly, would I loos anything if I figured out to implement my own
  javax.ws.rs.Application?

  Thanks again
  Regards
  ChrisDane

  On Jan 16, 10:23 pm, Jeff Schnitzer j...@infohazard.org wrote:

   JBoss Resteasy works fine without any special customization for GAE.
   I use it extensively.

  http://www.jboss.org/resteasy

   Jeff

   On Sat, Jan 16, 2010 at 1:09 PM, ChrisDane gregersen@gmail.com 
   wrote:
Hi there,
Has anyone seen any examples on using only JAX-RS on GAE.

Implementing the javax.ws.rs.core.Application and A resource Class
etc?

Thanks in advance
Regards
ChrisDane

--
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] Order of index propertis

2010-01-17 Thread John Patterson
I have a query that is throwing an exception (occasionally) due to the  
order of properties in an index.


the query is like: closed = false AND blocks = x ORDER BY popularity

An exception is thrown on the local datastore:

Query ??? requires the following index:

datastore-index kind=H ancestor=false source=manual
property name=blocks direction=asc/
property name=closed direction=asc/
property name=popularity direction=desc/
/datastore-index


But I have the following index

datastore-index kind=H ancestor=false source=manual
property name=closed direction=asc /
property name=blocks direction=asc /
property name=popularity direction=desc /
/datastore-index

Surely that should be OK?  I haven't tried this on the datastore as it  
takes a long time to build the indexes but should the current index  
work there?


Thanks,

JD


-- 

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: RESTfull - JAX-RS and GAE/J

2010-01-17 Thread Jeff Schnitzer
No, not all the jars.  It depends on what you're trying to do and
which providers you intend to use.  Read the comments in the maven
pom.xml.

I use the jackson provider.  It requires the jackson jars, the
jackson-jaxrs jar, the jackson-resteasy-provider jar, resteasy-jaxrs,
jaxrs-api, and if you're using scanning, the scannotation and
javassist jars.

Jeff

On Sun, Jan 17, 2010 at 10:27 AM, ChrisDane gregersen@gmail.com wrote:
 Thanks Andy,
 I Just got it working, by adding alle the jar files from the
 1.2.1.GA lib folder into my WAR/WEB-INF/lib... Question is do you
 need alle the jar files in order to make it work?

 /Christian

 org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher

 On Jan 17, 11:05 am, andy.booth andy.booth...@googlemail.com
 wrote:
 Have you put the three .jar files in war\WEB-INF\lib too? It can't
 find the base Servlet for Resteasy.

 I don't think there's a huge benefit of trying to implement a standard
 that is already done by Jersey, Resteasy, Restlet and Apache Wink,
 which already provides a useful set of choices.

 My issue with JAX-RS and Guice together has been initialization time -
 in the 6 - 10 second region, with JPA and a templating framework,
 rather than the lengthy times suggested with other types of web
 framework. In particular, I switch off all class path scanning for
 Resource and Providers in Jersey. In fact looking at the documentation
 for Resteasy, their property of resteasy.scan = false seems quite good
 in this regard. So I might consider moving over to Resteasy.

 And many of the JAX-RS implementations add GZIP and Etag type plugins
 that help create elegant REST applications. Which would take time with
 a custom implementation.

 Andy

 On Jan 16, 10:19 pm, ChrisDane gregersen@gmail.com wrote:



  Thanks Jeff,

  Thanks, I am just trying to set it up:

  1) Downloaded the latest(1.2.1.GA)
  2) In Eclipse created a new GAE Project
  3) I have been looking in the book RESTful Java with JAX-RS, 1st
  Edition - found the sample code for oreilly-workbook/ex03_1
  4) Copied the ( Customer.java  CustomerResource.java 
  ShoppingApplication.java ) classes to my new GAE project.
  5) Added to Class Path: serverlet-api-2.5.jar   
  webserver-1.3.3.jar     jsr311-api-1.1.jar
  6) Changed the web.xml serverlet to :

  web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns=http://java.sun.com/xml/ns/javaee;
  xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
  xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/we...;
   version=2.5
      display-nameArchetype Created Web Application/display-name

      servlet
          servlet-nameResteasy/servlet-name
          servlet-
  classorg.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher/
  servlet-class
          init-param
              param-namejavax.ws.rs.Application/param-name
              param-
  valuecom.restfully.shop.services.ShoppingApplication/param-value
          /init-param
      /servlet

      servlet-mapping
          servlet-nameResteasy/servlet-name
          url-pattern/*/url-pattern
      /servlet-mapping
          welcome-file-list
                  welcome-fileindex.html/welcome-file
          /welcome-file-list
  /web-app

  7) And I am getting an Error:
  ..
  com.google.apphosting.utils.jetty.JettyLogger warn
  WARNING: EXCEPTION
  java.lang.ClassNotFoundException:
  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
  .

  Can you point out anything in my steps that I am doing wrong?

  Lastly, would I loos anything if I figured out to implement my own
  javax.ws.rs.Application?

  Thanks again
  Regards
  ChrisDane

  On Jan 16, 10:23 pm, Jeff Schnitzer j...@infohazard.org wrote:

   JBoss Resteasy works fine without any special customization for GAE.
   I use it extensively.

  http://www.jboss.org/resteasy

   Jeff

   On Sat, Jan 16, 2010 at 1:09 PM, ChrisDane gregersen@gmail.com 
   wrote:
Hi there,
Has anyone seen any examples on using only JAX-RS on GAE.

Implementing the javax.ws.rs.core.Application and A resource Class
etc?

Thanks in advance
Regards
ChrisDane

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

[appengine-java] Memcache question

2010-01-17 Thread Andrei
Is there a way to code Memcache that would notify when particular
entry is about to expire
so i can store it in DB?
Thanks
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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] Declarative Security with auth-constraint problems for role-name *

2010-01-17 Thread powell...@gmail.com
I am trying to use declarative security in my web.xml file to require
a google login to access my web  pages. I allow role-name * and role-
name admin. I placed a portion of the file below. When I access a web
page music.jsp, I get prompted for my login.  I am (admin) role, it
works perfectly. However if my wife accesses music.jsp web page, she
gets prompted for login but then gets Error Forbidden Your client does
not have permission to get URL /music.jsp from this service.

Any ideas?

  security-constraint
web-resource-collection
  web-resource-namecontrolAccess/web-resource-name
  url-pattern/*/url-pattern
/web-resource-collection
web-resource-collection
  web-resource-namecontrolJspAccess/web-resource-name
  url-pattern/*.jsp/url-pattern
/web-resource-collection
web-resource-collection
  web-resource-namecontrolControllerServletAccess/web-resource-
name
  url-pattern/ControllerServlet/url-pattern
/web-resource-collection
auth-constraint
  role-name*/role-name
  role-nameadmin/role-name
/auth-constraint
  /security-constraint

Thank you
Dave
-- 
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] adapter4appengine - java.lang.NoClassDefFoundError

2010-01-17 Thread Youngster
Hi,

Hope someone can help me to get this Gilead adapter4appengine to work.
I keep getting java.lang.NoClassDefFoundError when running my app.

I'm using the adapter4appengine-1.0M3, inherited it in the
project.gwt.xml.
I also tried the SampleAppEngine.JDO application which seems to work
fine. I compared this project file by file with my own project but
can't find any relevant differences.
Compiling my app is no problem.

Anyone who had this experience as well? Hope someone can help me out.

Thanks

--

Initializing AppEngine server
16-jan-2010 17:57:18 com.google.apphosting.utils.jetty.JettyLogger
warn
WARNING: failed shoppingsServiceServlet
java.lang.NoClassDefFoundError: net/sf/gilead/adapter4appengine/
EngineRemoteService
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass
(IsolatedAppClassLoader.java:151)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at org.mortbay.jetty.servlet.ServletHolder.doStart
(ServletHolder.java:
233)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize
(ServletHandler.java:612)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:
139)
at org.mortbay.jetty.webapp.WebAppContext.startContext
(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart
(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart
(WebAppContext.java:
448)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart
(HandlerWrapper.java:117)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart
(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:217)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:40)
at
com.google.appengine.tools.development.JettyContainerService.startContainer
(JettyContainerService.java:188)
at
com.google.appengine.tools.development.AbstractContainerService.startup
(AbstractContainerService.java:120)
at
com.google.appengine.tools.development.DevAppServerImpl.start
(DevAppServerImpl.java:217)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start
(AppEngineLauncher.java:86)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:
377)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:
938)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:690)
at com.google.gwt.dev.DevMode.main(DevMode.java:251)
Caused by: java.lang.ClassNotFoundException:
net.sf.gilead.adapter4appengine.EngineRemoteService
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass
(IsolatedAppClassLoader.java:151)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 35 more

And many more of the same errors.
-- 
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] App Engine cold starts and overly aggressive cycling

2010-01-17 Thread Paul Hammant
I have had a similar issue since launch :- http://ph-tryout.appspot.com/

GAE/J spawns a second servlet container too early.  At least too early for the 
servlet spec.  I wrote about it on my blog :- 
http://paulhammant.com/blog/appengines-blind-spot.html
This is only very simple listeners, filters and servlets.  There's no framework 
or data usage of any kind.  The dollar cost of apps being initialized more than 
they need to has always concerned me though.

This could account for some 'aggressive cycle' situations.  Or it could be 
confusable with them.

Ikai - see ticket #412136278 from March of last year. Source for the app should 
be attached to that ticket.

- Paul

On Jan 15, 2010, at 5:32 PM, Ikai Lan wrote:

 Hey everybody,
 
 We've been seeing more and more reports of applications being cycled out 
 overly aggressively, resulting in some folks implementing (discouraged) 
 workarounds to keep their application from being cycled out. The primary 
 symptom of this problem is that your application will see lots of loading 
 requests that fire up a new JVM, which, as many of you know can take 
 anywhere from a few seconds with naked servlets to as much as twenty seconds 
 when loading something like Spring MVC, JRuby on Rails or Grails.
 
 In theory, there is enough capacity such that as long as you get some traffic 
 every few hours, you should not be getting cycled out, but we have been 
 seeing reports of applications being cycled after only a minute or less. To 
 help us figure out if these are app specific issues or App Engine issues, can 
 you post the following information if you believe this is happening to you?
 
 - What is your application ID?
 - How do you know it is being cycled out? You'll need to insert some code 
 that only gets called when the app cold starts.
 - How much time of inactivity does it take before your application is cycled 
 out?
 - What time or days does this seem to happen?
 - What frameworks or libraries are you loading?
 
 Any other information you can provide would be helpful.
 
 -- 
 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.

-- 
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] The error occurs by registering QueueName again.

2010-01-17 Thread m seleron
Hi,

Server Error (500) occurs as follows.
Is there a workaround or something

1.queue.xml to upload my app the following file.

queue-entries
  queue
namedefault/name
rate1/s/rate
  /queue
  queue
namedeleteTasks/name
rate10/s/rate
bucket-size10/bucket-size
  /queue
/queue-entries


2.queue.xml to upload my app the following file.

queue-entries
  queue
namedefault/name
rate1/s/rate
  /queue
/queue-entries


3.[deleteTasks] to Delete Queue the admin console.

(Before deleting the state deleteTasks on admin console)
 Maximum:[paused]
 RateBucketSize:[paused]
 TaskskinQueueRun:[blank]
 in Last Minute:[0]

4.First used queue.xml to upload my app the following file.

queue-entries
  queue
namedefault/name
rate1/s/rate
  /queue
  queue
namedeleteTasks/name
rate10/s/rate
bucket-size10/bucket-size
  /queue
/queue-entries

The following errors occur at deploy.


[Error Details](eclipse deplydialog)

Unable to update app: Error posting to URL:
http://appengine.google.com/api/queue/update?app_id=xxxversion=xxx;
500 Internal Server Error

Server Error (500)
A server error has occurred.


See the deployment console for more details
Unable to update app: Error posting to URL:
http://appengine.google.com/api/queue/update?app_id=xxxversion=xxx;
500 Internal Server Error

Server Error (500)
A server error has occurred.

[Error Details](eclipse appengine-deployXXX.log)

Server Error (500)
A server error has occurred.

at com.google.appengine.tools.admin.ServerConnection.send
(ServerConnection.java:143)
at com.google.appengine.tools.admin.ServerConnection.post
(ServerConnection.java:81)
at com.google.appengine.tools.admin.AppVersionUpload.send
(AppVersionUpload.java:522)
at com.google.appengine.tools.admin.AppVersionUpload.updateQueue
(AppVersionUpload.java:255)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
(AppVersionUpload.java:134)
at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:56)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
(AppEngineBridgeImpl.java:271)
at
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run
(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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] A REALLY strange problem

2010-01-17 Thread OvermindDL1
On Sun, Jan 17, 2010 at 12:48 AM, Abhinav Bhagwat
abhinavbhag...@gmail.com wrote:
 Did you try refreshing your browser cache? Press CTRL+F5 or even better go
 to browser options and clear the cache.

Actually, irritatingly, Ctrl+F5 will not clear the cache and refresh
in all browsers, but Ctrl+r generally always will.  It is best to
recommend Ctrl+r to clear the cache and refresh as I think that will
in all browsers (or the popular ones anyway).
-- 
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] Blobstore API Feedback

2010-01-17 Thread Piotr Sikora

Hello,
lately I've been playing around with Blobstore and I believe that it misses 
few critical features:


1. MD5/SHA1 integrity checksums. This is a *MUST*. All competing services 
(S3, Nirvanix, etc) provide ways to:
- get checksum of already uploaded file (this should be another BlobInfo 
property),
- upload file along with its checksum. When calculated checksum of uploaded 
file differs from the provided one, file is discarded and error response is 
sent to client.


2. Ranged requests. With large files this is another *MUST HAVE* feature and 
hopefully requires no explanation.


3. When success_path generates error response after upload (either 4xx or 
5xx) with custom error page, it results in 500 Internal Server Error 
response with Google's default error page, because Blobstore requires 3xx 
response. In my opionion this is bad, because one cannot return custom error 
page. Maybe only 2xx responses should be handled as incorrect?


4. 500 Internal Server Error response is returned when wrong / old / 
not-existing BlobKey is passed via blobstore.BLOB_KEY_HEADER, in my opinion 
this should result in 404 Not Found response.


Also, few times I received 500 Internal Server Error response when 
uploading file(s) to path previously generated using 
blobstore.create_upload_path(). Those errors didn't result in *any* entry in 
application logs and I wasn't able to find proper way to reproduce this, but 
my guess is that this results from either:

- too old upload token (24h),
- upload token generated for older deployment.

Best regards,
Piotr Sikora  piotr.sik...@frickle.com 

-- 
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] Google Fronted, Content-Length and HEAD requests

2010-01-17 Thread Piotr Sikora

Hello,
I noticed that Google Frontend overrides user-supplied Content-Length 
header with its own. This is of course good idea, but I find this 
undesirable for HEAD requests, especially when combined with Blobstore. For 
*every* HEAD request Google Frontend returns response with Content-Length: 
0.


Would it be possible to disable this for HEAD requests or at least provide 
way to conditionaly disable this based on user-supplied header (ie. 
X-AppEngine-Override: Content-Length)?


According to RFC 2616:

9.4 HEAD
The HEAD method is identical to GET except that the server MUST NOT return a 
message-body in the response. The metainformation contained in the HTTP 
headers in response to a HEAD request SHOULD be identical to the information 
sent in response to a GET request. This method can be used for obtaining 
metainformation about the entity implied by the request without transferring 
the entity-body itself. This method is often used for testing hypertext 
links for validity, accessibility, and recent modification.


The response to a HEAD request MAY be cacheable in the sense that the 
information contained in the response MAY be used to update a previously 
cached entity from that resource. If the new field values indicate that the 
cached entity differs from the current entity (as would be indicated by a 
change in Content-Length, Content-MD5, ETag or Last-Modified), then the 
cache MUST treat the cache entry as stale.


Best regards,
Piotr Sikora  piotr.sik...@frickle.com 

-- 
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] Cant get my www.mydomain.com to work with my APP

2010-01-17 Thread MG
I bought a domain at indiatimes.com.
I do not understand Google's provided 2 methods to verify that i own
this domain.

1. Upload html files to my domain:

I cant do that, i dont own any hosting space etc.

2. Changing CNAME records:

There is no option to modify CNAME at my domain management panel.

Only option i have is to change nameservers.

What to do , so that www.mydomain.com opens up to my google app
homepage.

Thanks
Munish
-- 
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: PyFacebook in GAE, just installing, should be easy

2010-01-17 Thread anandvc
I usually just have the facebook.py file in the same folder as main.py
and it is able to import facebook just fine.

- Anand.

On Jan 14, 10:31 am, Andrew Bialecki andrew.biale...@gmail.com
wrote:
 I'm trying to intergrate Facebook Connect into a GAE app. I've got a
 basic folder structure like so:

 /gae-root
     /myapp
         /templates
         /etc
     app.yaml
     settings.py

 and I tried to add the PyFacebook library like so:

 /gae-root
     /myapp
         /templates
         /etc
     /facebook
         /djangofb
     app.yaml
     settings.py

 I thought this would work, but now when I try to import facebook it
 throws a module not found error. What's even weirder is that if I
 rename the directory from facebook to foo, the import now works but
 I'll hit errors later when I try to get the current logged in user.

 Literally all I did was move the directory into my folder structure
 and try an import. What am I missing?
-- 
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: Cant get my www.mydomain.com to work with my APP

2010-01-17 Thread Roberto Saccon
So change nameservers, the are plenty of DNS companies out there.

On Jan 17, 2:41 am, MG munish.go...@gmail.com wrote:
 I bought a domain at indiatimes.com.
 I do not understand Google's provided 2 methods to verify that i own
 this domain.

 1. Upload html files to my domain:

 I cant do that, i dont own any hosting space etc.

 2. Changing CNAME records:

 There is no option to modify CNAME at my domain management panel.

 Only option i have is to change nameservers.

 What to do , so thatwww.mydomain.comopens up to my google app
 homepage.

 Thanks
 Munish
-- 
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] Google Fronted, Content-Length and HEAD requests

2010-01-17 Thread Mr. Rajiv Bakulesh Shah
Hi, Piotr.

On Google App Engine, response headers are just a dictionary.  In order to 
delete the Content-Length response header, somewhere in your head request 
handler, add this line:

del self.response.headers['Content-Length']

Good luck,
Raj

On Jan 17, 2010, at 2:55 AM, Piotr Sikora wrote:

 Hello,
 I noticed that Google Frontend overrides user-supplied Content-Length 
 header with its own. This is of course good idea, but I find this undesirable 
 for HEAD requests, especially when combined with Blobstore. For *every* HEAD 
 request Google Frontend returns response with Content-Length: 0.
 
 Would it be possible to disable this for HEAD requests or at least provide 
 way to conditionaly disable this based on user-supplied header (ie. 
 X-AppEngine-Override: Content-Length)?
 
 According to RFC 2616:
 
 9.4 HEAD
 The HEAD method is identical to GET except that the server MUST NOT return a 
 message-body in the response. The metainformation contained in the HTTP 
 headers in response to a HEAD request SHOULD be identical to the information 
 sent in response to a GET request. This method can be used for obtaining 
 metainformation about the entity implied by the request without transferring 
 the entity-body itself. This method is often used for testing hypertext links 
 for validity, accessibility, and recent modification.
 
 The response to a HEAD request MAY be cacheable in the sense that the 
 information contained in the response MAY be used to update a previously 
 cached entity from that resource. If the new field values indicate that the 
 cached entity differs from the current entity (as would be indicated by a 
 change in Content-Length, Content-MD5, ETag or Last-Modified), then the cache 
 MUST treat the cache entry as stale.
 
 Best regards,
 Piotr Sikora  piotr.sik...@frickle.com 
 
 -- 
 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: adapter4appengine - java.lang.NoClassDefFoundError

2010-01-17 Thread Youngster
Sorry, think this is the wrong group. I will repost it in App Engine/
Java.

On Jan 16, 8:41 pm, Youngster aecdej...@gmail.com wrote:
 Hi,

 Hope someone can help me to get this Gilead adapter4appengine to work.
 I keep getting java.lang.NoClassDefFoundError when running my app.

 I'm using the adapter4appengine-1.0M3, inherited it in the
 project.gwt.xml.
 I also tried the SampleAppEngine.JDO application which seems to work
 fine. I compared this project file by file with my own project but
 can't find any relevant differences.
 Compiling my app is no problem.

 Anyone who had this experience as well? Hope someone can help me out.

 Thanks

 --

 Initializing AppEngine server
 16-jan-2010 17:57:18 com.google.apphosting.utils.jetty.JettyLogger
 warn
 WARNING: failed shoppingsServiceServlet
 java.lang.NoClassDefFoundError: net/sf/gilead/adapter4appengine/
 EngineRemoteService
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.access$000(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at
 com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass
 (IsolatedAppClassLoader.java:151)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at org.mortbay.util.Loader.loadClass(Loader.java:91)
         at org.mortbay.util.Loader.loadClass(Loader.java:71)
         at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
         at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
 233)
         at org.mortbay.component.AbstractLifeCycle.start
 (AbstractLifeCycle.java:40)
         at org.mortbay.jetty.servlet.ServletHandler.initialize
 (ServletHandler.java:612)
         at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
         at org.mortbay.jetty.webapp.WebAppContext.startContext
 (WebAppContext.java:1218)
         at org.mortbay.jetty.handler.ContextHandler.doStart
 (ContextHandler.java:500)
         at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
 448)
         at org.mortbay.component.AbstractLifeCycle.start
 (AbstractLifeCycle.java:40)
         at org.mortbay.jetty.handler.HandlerWrapper.doStart
 (HandlerWrapper.java:117)
         at org.mortbay.component.AbstractLifeCycle.start
 (AbstractLifeCycle.java:40)
         at org.mortbay.jetty.handler.HandlerWrapper.doStart
 (HandlerWrapper.java:117)
         at org.mortbay.jetty.Server.doStart(Server.java:217)
         at org.mortbay.component.AbstractLifeCycle.start
 (AbstractLifeCycle.java:40)
         at
 com.google.appengine.tools.development.JettyContainerService.startContainer
 (JettyContainerService.java:188)
         at
 com.google.appengine.tools.development.AbstractContainerService.startup
 (AbstractContainerService.java:120)
         at com.google.appengine.tools.development.DevAppServerImpl.start
 (DevAppServerImpl.java:217)
         at com.google.appengine.tools.development.gwt.AppEngineLauncher.start
 (AppEngineLauncher.java:86)
         at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:377)
         at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:938)
         at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:690)
         at com.google.gwt.dev.DevMode.main(DevMode.java:251)
 Caused by: java.lang.ClassNotFoundException:
 net.sf.gilead.adapter4appengine.EngineRemoteService
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at
 com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass
 (IsolatedAppClassLoader.java:151)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         ... 35 more

 And many more of the same errors.
-- 
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] onowned Many2Many relationship management - how to handle

2010-01-17 Thread Siddharth Patnaik
Hi,
I have the following situation. I have 2 entities User and Tour and i
wanted to have unowned relationship between these two. I have followed
the the relationships article on GAE documentation. I am taking care
of relationships at both the ends. However my problem is that only one
side of the relationship is getting persisted. Here is my sample code:

create a persistence manager, pm
start transaction
create Tour object
set the values for this object
add a user object //as part of this i am also adding the tour object
to the user object
pm.makePersistent(tour);
commit the transaction

My problem is,  the user object is never getting updated (with tour
relationship info)
How do i achieve this?
-- 
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 can i run my persistance test cases in a standalone mode?

2010-01-17 Thread Siddharth Patnaik
thanks. I created a separate test project to be in the safer side.

regards,
Siddharth

On Jan 15, 11:39 pm, Ikai L (Google) ika...@google.com wrote:
 Have you taken a look at this page in the docs?

 http://code.google.com/appengine/docs/java/howto/unittesting.html

 It shows you how to set up a standalone environment for JUnit. It looks like
 you're writing your tests using a custom Testing class, but the same
 principles should apply.

 On Fri, Jan 15, 2010 at 12:06 AM, Siddharth Patnaik 
 spatnai...@gmail.comwrote:





  I would like to run my test cases (CRUD operations on my business
  objects) in a stand alone manner. When i am performing any CRUD
  operation in a stand alone way i am getting the following exception.
  It is clear that the persistence handler needs a context. How can i
  provide that?

  INFO: Finished performing appengine-specific metadata validation for
  com.tripgether.persistance.bo.User
  java.lang.NullPointerException: No API environment is registered for
  this thread.
         at
  com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId
  (DatastoreApiHelper.java:67)
         at

  com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamesp 
  ace
  (DatastoreApiHelper.java:77)
         at com.google.appengine.api.datastore.Key.init(Key.java:100)
         at com.google.appengine.api.datastore.Key.init(Key.java:85)
         at com.google.appengine.api.datastore.Key.init(Key.java:81)
         at com.google.appengine.api.datastore.Entity.init(Entity.java:103)
         at com.google.appengine.api.datastore.Entity.init(Entity.java:84)
         at org.datanucleus.store.appengine.DatastoreFieldManager.init
  (DatastoreFieldManager.java:167)
         at

  org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProces 
  s
  (DatastorePersistenceHandler.java:316)
         at
  org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects
  (DatastorePersistenceHandler.java:236)
         at
  org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject
  (DatastorePersistenceHandler.java:225)
         at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent
  (JDOStateManagerImpl.java:3185)
         at org.datanucleus.state.JDOStateManagerImpl.makePersistent
  (JDOStateManagerImpl.java:3161)
         at org.datanucleus.ObjectManagerImpl.persistObjectInternal
  (ObjectManagerImpl.java:1298)
         at org.datanucleus.ObjectManagerImpl.persistObject
  (ObjectManagerImpl.java:1175)
         at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent
  (JDOPersistenceManager.java:669)
         at org.datanucleus.jdo.JDOPersistenceManager.makePersistent
  (JDOPersistenceManager.java:694)
         at com.tripgether.persistance.TestCRUD.main(TestCRUD.java:27)

  --
  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%2Bunsubscrib 
  e...@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: How can i view my application data?

2010-01-17 Thread Siddharth Patnaik
thank you.

regards,
Siddharth

On Jan 14, 6:41 pm, Adam adam.crossl...@gmail.com wrote:
 You can use the Development Console (http://code.google.com/appengine/
 docs/python/tools/devserver.html#The_Development_Console),
 It has a tool for looking into the Datastore.

 On Jan 14, 8:35 am,Siddharthspatnai...@gmail.com wrote:



  Persistence management provided by GAE is great. However i am facing
  some practical issues wrt this.
  1. In my development environment, I would like to view the application
  data. There are many reasons one of them being for debugging. Is there
  any viewer for my application data?
  2. Similarly i would like to view my application data after deploying
  my application on GAE. How do i do it ?
-- 
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] Proxying your urlfetch requests so that they come from a static IP

2010-01-17 Thread Barry Hunter
In the article you mention not knowing the specific IPs appengine
url-fetches come from, however a Google employee has said on this
group you can get the IP ranges from

dig _netblocks.google.com TXT

(they are announced for SPF purposes)

The list is quite long and potentially changes so might not be
suitable for adding to the remote APIs whitelist, but you could have a
script on your proxy update its firewall with those.


2010/1/17 Attila-Mihaly Balazs filei...@gmail.com:
 Hello everyone.

 I saw the question what IPs do the urlfetch request come from a
 couple of times on the list (most recently I think it was in the
 context of the delicio.us API which does whitelisting based on the
 IP). I've done a small writeup about how my application (http://
 www.thetwitfeeder.com/) uses a VPS + a PHP script to ensure that
 requests to the Twitter API come from a static IP:
 http://blog.thetwitfeeder.com/2010/01/proxying-url-fetch-requests-from-google.html

 HTH

 PS. I'm considering launching a small commercial service around this
 (ie. operating a proxy on one or more static IPs and selling
 bandwidth). If somebody would be interested in such a service, I would
 ask them to contact me in private.

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







-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -
-- 
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: Cant get my www.mydomain.com to work with my APP

2010-01-17 Thread Danny Tuppeny
If you can't manage the DNS and create CNAME records, not only can you
not verify the domain, but you wouldn't be able to point subdomains at
App Engine anyway.

I'd recommend contacting your registrar to find out whether they allow
you to modify the DNS records directly (in case it's hidden away
somewhere) and if not, use a third party service (I've used ZoneEdit
many years ago, but there are probably lots to choose from). You'll
use their nameservers, and then get full control of your DNS records.


On Jan 17, 5:41 am, MG munish.go...@gmail.com wrote:
 I bought a domain at indiatimes.com.
 I do not understand Google's provided 2 methods to verify that i own
 this domain.

 1. Upload html files to my domain:

 I cant do that, i dont own any hosting space etc.

 2. Changing CNAME records:

 There is no option to modify CNAME at my domain management panel.

 Only option i have is to change nameservers.

 What to do , so thatwww.mydomain.comopens up to my google app
 homepage.

 Thanks
 Munish
-- 
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: A REALLY strange problem

2010-01-17 Thread Danny Tuppeny
Both files are identical right now. As others have suggested, it may
be your browser caching. If you have no luck with Ctrl+R, you can
always append a random string to the end to make sure you get a clean
copy from the server, eg.:

http://www.visame.org/static/css/style.css?myrandomstring
http://visameblog.appspot.com/static/css/style.css?myrandomstring

Danny

On Jan 17, 8:03 am, OvermindDL1 overmind...@gmail.com wrote:
 On Sun, Jan 17, 2010 at 12:48 AM, Abhinav Bhagwat

 abhinavbhag...@gmail.com wrote:
  Did you try refreshing your browser cache? Press CTRL+F5 or even better go
  to browser options and clear the cache.

 Actually, irritatingly, Ctrl+F5 will not clear the cache and refresh
 in all browsers, but Ctrl+r generally always will.  It is best to
 recommend Ctrl+r to clear the cache and refresh as I think that will
 in all browsers (or the popular ones anyway).
-- 
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: Support for Netbeans

2010-01-17 Thread Jorge
There is a NetBeans plugin for GAE here: 
http://kenai.com/projects/nbappengine/pages/Home
. As far as I know, Google doesn't support it officially and has no
intentions to do so. Maybe Google wants to comment further on this.
Nevertheless, I've been using the NetBeans plugin for almost a year
and it works just great. Slowly, but It's been improved and I hope it
will continue getting better.

Jorge Gonzalez


On Jan 15, 10:23 pm, Dino Conte cardi...@googlemail.com wrote:
 When will google officially support netbeans, and publish a plugin?
-- 
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] Stolen laptops

2010-01-17 Thread Stolen bike lady
Stolen laptops
http://www.juststolen.net/
Juststolen.net was created by police officers to provide the best
possible asset tracking and property recovery services in the world.

JustStolen.net is an innovative tool designed to easily register
assets in order to facilitate their recovery if they are lost or
stolen.
Our powerful database provides consumers and business owners from all
over the globe a place to safely record valuable information about
their belongings. Our stolen property database of: Stolen GPS units,
stolen laptops, stolen Ipods, stolen bikes, stolen guns, etc.. give
law enforcement the information needed to prosecute thieves.
If the property is lost or stolen, JustStolen.net works with law
enforcement to return the property to the rightful owner. Once an item
is recovered law enforcement agencies worldwide can search our
powerful database to identify the rightful owner.
http://www.juststolen.net/
-- 
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] Total Stored Data ??

2010-01-17 Thread BIBAYA
Total Stored Data show i used 0.13 GB
but Stored Data show i only use 3MB

Total Stored Data show i used 0.01 GB one day ago
and I only add 2 image about 160KB

Total Stored Data   $0.005/GByte-day
0%
0%  0.13 of 201.00 GBytes   $0.00 / $1.00

Last updatedTotal number of entitiesSize of all entities
1:18:14 ago 156 3 MBytes
Storage Space by Property Type
pie chart
Storage Space by Entity Kind
pie chart
Breakdown by Property Type Property TypeSize
Blob3 MBytes
String  11 KBytes
Integer 4 KBytes
Date/Time   4 KBytes
Text633 Bytes
User592 Bytes
Boolean 140 Bytes
NULL22 Bytes
Metadata29 KBytes
-- 
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] com.caucho.quercus.QuercusModuleException: java.lang.NoClassDefFoundError: java.net.Proxy is a restricted class. Please see the Google App Engine developer's guide for more detail

2010-01-17 Thread Fabrizo
I am using JIQL to run PHP on my GAE server (
http://docs.google.com/Doc?id=dhg923vj_2ghr8q9f3#PHP ) and am occuring
the following error when trying to connect to the Twitter oAuth API:

com.caucho.quercus.QuercusModuleException:
java.lang.NoClassDefFoundError: java.net.Proxy is a restricted class.
Please see the Google App Engine developer's guide for more details.

Here is a full copy from my GAE log if it helps:

W 01-17 04:52AM 53.151
/
com.caucho.quercus.QuercusModuleException:
java.lang.ExceptionInInitializerError
at com.caucho.quercus.QuercusModuleException.create
(QuercusModuleException.java:60)
at com.caucho.quercus.module.StaticFunction.invoke
(StaticFunction.java:141)
at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:615)
at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:488)
at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:473)
at com.caucho.quercus.env.JavaInvoker.callCopy(JavaInvoker.java:482)
at com.caucho.quercus.expr.FunctionExpr.evalImpl(FunctionExpr.java:
180)
at com.caucho.quercus.expr.FunctionExpr.evalCopy(FunctionExpr.java:
150)
at com.caucho.quercus.expr.AssignExpr.eval(AssignExpr.java:86)
at com.caucho.quercus.program.ExprStatement.execute
(ExprStatement.java:64)
at com.caucho.quercus.program.BlockStatement.execute
(BlockStatement.java:99)
at com.caucho.quercus.program.QuercusProgram.execute
(QuercusProgram.java:239)
at com.caucho.quercus.page.InterpretedPage.execute
(InterpretedPage.java:61)
at com.caucho.quercus.env.Env.include(Env.java:3500)
at com.caucho.quercus.expr.IncludeOnceExpr.eval(IncludeOnceExpr.java:
83)
at com.caucho.quercus.program.ExprStatement.execute
(ExprStatement.java:64)
at com.caucho.quercus.program.BlockStatement.execute
(BlockStatement.java:99)
at com.caucho.quercus.program.QuercusProgram.execute
(QuercusProgram.java:239)
at com.caucho.quercus.page.InterpretedPage.execute
(InterpretedPage.java:61)
at com.caucho.quercus.env.Env.include(Env.java:3500)
at com.caucho.quercus.expr.IncludeOnceExpr.eval(IncludeOnceExpr.java:
83)
at com.caucho.quercus.program.ExprStatement.execute
(ExprStatement.java:64)
at com.caucho.quercus.program.BlockStatement.execute
(BlockStatement.java:99)
at com.caucho.quercus.program.QuercusProgram.execute
(QuercusProgram.java:239)
at com.caucho.quercus.page.InterpretedPage.execute
(InterpretedPage.java:61)
at com.caucho.quercus.page.QuercusPage.executeTop(QuercusPage.java:
119)
at com.caucho.quercus.servlet.QuercusServletImpl.service
(QuercusServletImpl.java:163)
at com.caucho.quercus.servlet.QuercusServlet.service
(QuercusServlet.java:353)
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.handle
(ServletHandler.java:362)
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 org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:268)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at
com.google.apphosting.runtime.jetty.ResourceFileServlet.serveWelcomeFileAsForward
(ResourceFileServlet.java:321)
at
com.google.apphosting.runtime.jetty.ResourceFileServlet.maybeServeWelcomeFile
(ResourceFileServlet.java:258)
at com.google.apphosting.runtime.jetty.ResourceFileServlet.doGet
(ResourceFileServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter
(ParseBlobUploadFilter.java:97)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
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

[google-appengine] Re: Support for Netbeans

2010-01-17 Thread Wesley Chun (Google)
as far as i know, there are no plans to support it at the moment, but
as you know, things can always change under the appropriate market
conditions. someone had a Netbeans issue earlier, and i pointed them
to a tutorial online:

http://groups.google.com/group/google-appengine/browse_thread/thread/56c9d50020562eaf

feel free to post any other resources here that you think would be
useful for other Netbeans users.

thanks!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core Python Programming, Prentice Hall, (c)2007,2001
Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

wesley.j.chun :: wesc+...@google.com
developer relations :: 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: files 1MB? If not.. redirect a POST?

2010-01-17 Thread Brian
Hey guys, Here's an easy way to save 1m files in python without
concern for the filesize...code below is for PDF files, but you can
change the content type to whatever you want.

I over-commented for you... grin
Brian


class pdfFile( db.Model ):
#name of the file you are working with (not unique)
filename = db.StringProperty()
#time the file was uploaded
uploadedOn = db.DateTimeProperty(auto_now_add=True)

def storePDF( self, thePDF ):
# the pieceSize could be 100, but I gave 50k overhead for 
good
measure
pieceSize = 95
# loop to generate all the pieces
for i in range( 0, len( thePDF ), pieceSize ):
# get a new data record
thisPiece = pdfFilePart()
# the key keeps them together
thisPiece.pdfFile = self.key()
# the partNum keeps them in order
thisPiece.portionNum = i/pieceSize
# save this portion of the file to the blob
thisPiece.portion = thePDF[ i: i+pieceSize ]
# commit it
thisPiece.put()

def loadPDF( self ):
# the results will be in thePDF
thePDF = ''
# get all the pieces (remember that self will be the record you 
are
working with)
q = db.GqlQuery(SELECT * FROM pdfFilePart WHERE pdfFile = :1 
ORDER
BY portionNum, self.key() )
# technically, fetching 11 is fine because there's a 10 meg 
limit
right now 95 x 11  10 meg
results = q.fetch(11)
# cycle for each record retreived
for each in results:
# add this blob to the overall
thePDF += each.portion
# return the entire file
return thePDF

class pdfFilePart( db.Model ):
pdfFile = db.ReferenceProperty()# the key to the parent
portionNum = db.IntegerProperty()   # the order of parts
portion = db.BlobProperty() # this portion of the 
file


class test ( webapp.RequestHandler ):
def get(self):
# if getFile exists, then user had clicked to download the 
file
if self.request.get('getFile'):
# get the key from the querystring, get that record 
from pdfFile
and store it in theFile
theFile = pdfFile().get( 
db.Key(self.request.get('getFile')) )
# tell browser this is a pdf file
self.response.headers['Content-Type'] = 
application/pdf
# give browser the content of the file ( 
theFile.loadPDF() )
self.response.out.write( theFile.loadPDF(  ) )
else:
# query for all the files we currently have
q = db.GqlQuery(SELECT * FROM pdfFile ORDER BY 
uploadedOn)
# get those files
results = q.fetch(100)
# loop through each result
for each in results:
# give a link to the file (using the key) and 
displaying the
filename (remember, filename is not unique...uniqueness is from key
() )
self.response.out.write('h2a 
href=/test/?getFile=' + str
(each.key()) + '' + each.filename + '/a/h2')

# display a form to upload a file (pdfFile), and a 
filename (just
to allow you to identify the file...a non-unique filename)
self.response.out.write(form action=/test/ 
enctype=multipart/
form-data accept-charset=utf-8 accept=application/pdf
method=post
input type=hidden name=cmd 
value=uploadPDF
table
trtdPDF 
File:/tdtdinput name=pdfFile type=file
size=70/td/tr

trtdFilename:/tdtdinput type=textbox name=title
size=70/td/tr
trtd colspan=2input 
type=submit value=upload/td/tr
/table/form)

def post(self):
# the file was posted so get a record ready
theFile = pdfFile()
# set the filename
theFile.filename = self.request.get('title')
# putting it gives the record a KEY so we can move on to the 
next
stage
theFile.put()
# save the portion(s) of the file by giving the entire file to
storePDF
theFile.storePDF( self.request.get('pdfFile') )
# go back to the get...as opposed to self.redirect('/')
self.get()
-- 
You 

[google-appengine] Re: files 1MB? If not.. redirect a POST?

2010-01-17 Thread Brian
Hey guys, Here's an easy way to save 1m files without concern for the
filesize...code below is for PDF files, but you can change the content
type to whatever you want.

I over-commented for you... grin
Brian


class pdfFile( db.Model ):
#name of the file you are working with (not unique)
filename = db.StringProperty()
#time the file was uploaded
uploadedOn = db.DateTimeProperty(auto_now_add=True)

def storePDF( self, thePDF ):
# the pieceSize could be 100, but I gave 50k overhead for 
good
measure
pieceSize = 95
# loop to generate all the pieces
for i in range( 0, len( thePDF ), pieceSize ):
# get a new data record
thisPiece = pdfFilePart()
# the key keeps them together
thisPiece.pdfFile = self.key()
# the partNum keeps them in order
thisPiece.portionNum = i/pieceSize
# save this portion of the file to the blob
thisPiece.portion = thePDF[ i: i+pieceSize ]
# commit it
thisPiece.put()

def loadPDF( self ):
# the results will be in thePDF
thePDF = ''
# get all the pieces (remember that self will be the record you 
are
working with)
q = db.GqlQuery(SELECT * FROM pdfFilePart WHERE pdfFile = :1 
ORDER
BY portionNum, self.key() )
# technically, fetching 11 is fine because there's a 10 meg 
limit
right now 95 x 11  10 meg
results = q.fetch(11)
# cycle for each record retreived
for each in results:
# add this blob to the overall
thePDF += each.portion
# return the entire file
return thePDF

class pdfFilePart( db.Model ):
pdfFile = db.ReferenceProperty()# the key to the parent
portionNum = db.IntegerProperty()   # the order of parts
portion = db.BlobProperty() # this portion of the 
file


class test ( webapp.RequestHandler ):
def get(self):
# if getFile exists, then user had clicked to download the 
file
if self.request.get('getFile'):
# get the key from the querystring, get that record 
from pdfFile
and store it in theFile
theFile = pdfFile().get( 
db.Key(self.request.get('getFile')) )
# tell browser this is a pdf file
self.response.headers['Content-Type'] = 
application/pdf
# give browser the content of the file ( 
theFile.loadPDF() )
self.response.out.write( theFile.loadPDF(  ) )
else:
# query for all the files we currently have
q = db.GqlQuery(SELECT * FROM pdfFile ORDER BY 
uploadedOn)
# get those files
results = q.fetch(100)
# loop through each result
for each in results:
# give a link to the file (using the key) and 
displaying the
filename (remember, filename is not unique...uniqueness is from key
() )
self.response.out.write('h2a 
href=/test/?getFile=' + str
(each.key()) + '' + each.filename + '/a/h2')

# display a form to upload a file (pdfFile), and a 
filename (just
to allow you to identify the file...a non-unique filename)
self.response.out.write(form action=/test/ 
enctype=multipart/
form-data accept-charset=utf-8 accept=application/pdf
method=post
input type=hidden name=cmd 
value=uploadPDF
table
trtdPDF 
File:/tdtdinput name=pdfFile type=file
size=70/td/tr

trtdFilename:/tdtdinput type=textbox name=title
size=70/td/tr
trtd colspan=2input 
type=submit value=upload/td/tr
/table/form)

def post(self):
# the file was posted so get a record ready
theFile = pdfFile()
# set the filename
theFile.filename = self.request.get('title')
# putting it gives the record a KEY so we can move on to the 
next
stage
theFile.put()
# save the portion(s) of the file by giving the entire file to
storePDF
theFile.storePDF( self.request.get('pdfFile') )
# go back to the get...as opposed to self.redirect('/')
self.get()
-- 
You received 

Re: [google-appengine] Stolen laptops

2010-01-17 Thread OvermindDL1
On Sun, Jan 17, 2010 at 3:05 PM, Stolen bike lady
jjkjhjkhhkjhy...@live.com wrote:
 Stolen laptops
 http://www.juststolen.net/
 Juststolen.net was created by police officers to provide the best
 possible asset tracking and property recovery services in the world.

 JustStolen.net is an innovative tool designed to easily register
 assets in order to facilitate their recovery if they are lost or
 stolen.
 Our powerful database provides consumers and business owners from all
 over the globe a place to safely record valuable information about
 their belongings. Our stolen property database of: Stolen GPS units,
 stolen laptops, stolen Ipods, stolen bikes, stolen guns, etc.. give
 law enforcement the information needed to prosecute thieves.
 If the property is lost or stolen, JustStolen.net works with law
 enforcement to return the property to the rightful owner. Once an item
 is recovered law enforcement agencies worldwide can search our
 powerful database to identify the rightful owner.
 http://www.juststolen.net/

So was this made on appengine or something?
-- 
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] Total Stored Data ??

2010-01-17 Thread OvermindDL1
On Sun, Jan 17, 2010 at 9:50 AM, BIBAYA rock10061...@gmail.com wrote:
 Total Stored Data show i used 0.13 GB
 but Stored Data show i only use 3MB

 Total Stored Data show i used 0.01 GB one day ago
 and I only add 2 image about 160KB

 Total Stored Data       $0.005/GByte-day
 0%
        0%      0.13 of 201.00 GBytes   $0.00 / $1.00

 Last updated    Total number of entities        Size of all entities
 1:18:14 ago     156     3 MBytes
 Storage Space by Property Type
 pie chart
 Storage Space by Entity Kind
 pie chart
 Breakdown by Property Type Property Type        Size
 Blob    3 MBytes
 String  11 KBytes
 Integer         4 KBytes
 Date/Time       4 KBytes
 Text    633 Bytes
 User    592 Bytes
 Boolean         140 Bytes
 NULL    22 Bytes
 Metadata        29 KBytes

Remember, much of your data is going to be duplicated for each
additional index you have, my guess is that you have a lot of indexes.
-- 
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] Stolen laptops

2010-01-17 Thread Patrick Twohig
I perfer spam only served with eggs.

Sent from my G1 phone.

On Jan 17, 2010 4:54 PM, OvermindDL1 overmind...@gmail.com wrote:

On Sun, Jan 17, 2010 at 3:05 PM, Stolen bike lady jjkjhjkhhkjhy...@live.com
wrote:  Stolen laptop...
So was this made on appengine or something?

--
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] Re: Uploading application using proxy with authentication

2010-01-17 Thread Matt
Use the following:

set HTTP_PROXY = http://username:passw...@example.com:port

and likewise for HTTPS. Remember that your password for the proxy is
out in the open, so it might be worth deleting or overwriting those
settings.

On Dec 12 2009, 9:52 am, deepesh reja drejao...@gmail.com wrote:
 Please help me

 On Dec 11, 12:43 am, deepesh reja drejao...@gmail.com wrote:



  I have my development environment behind the http proxy which requires
  authentication. A method is given 
  onhttp://code.google.com/appengine/docs/java/tools/uploadinganapp.html#...
  for uploading the application, but this doesn't tell me how to give
  authentication. Error is:

  Unable to update app: Error posting to 
  URL:http://appengine.google.com/api/appversion/create?app_id=my-basicver...
  407 Proxy Authentication Required 

  Tell me what to do.
  Thank 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] Clarification of Geographic content distribution

2010-01-17 Thread Karl
Hi,

I wonder if GAE is distributed to several datacenters or not. I found
no official information on this topic but several personal tests show
that it is indeed deployed to several geographic locations and the
closest one is chosen to server the request.

Tests from several locations (decix in germany, japan, china and us
(peer1 network) show really confusing results. Measurings are done
against ghs.google.com and .appspot.com.
Here the mtr's to ghs.google.com

From peer1 network (us): 170msec (urghs !!)
   Packets   Pings
 HostLoss%   Snt   Last   Avg
Best  Wrst StDev
...
 4. 10ge-ten1-3.dal-eqx-cor-2.peer1.net   0.0%   2127.6  11.9
7.5 192.6  23.9
 5. 10ge-ten1-1.dal-eqx-cor-1.peer1.net   0.0%   2127.5   8.9
7.5  95.8   9.6
 6. 10ge.ten1-2.la-600w-cor-2.peer1.net   0.0%   212   44.7  44.8
44.0 140.9   7.0
 7. 64.34.254.42  0.0%   212   44.0  46.6
43.9 170.7  13.9
 8. 216.239.46.1800.0%   212   44.1  44.6
44.0  75.3   2.8
 9. 72.14.233.110 0.0%   212  114.2  78.2
74.0 131.2  12.0
10. 72.14.238.243 0.0%   212   75.9  81.0
75.9 131.1  10.3
11. 209.85.251.8  0.0%   212  1411.  94.5
83.3 1411.  91.3
12. 209.85.250.55 0.0%   212  1350. 161.5
151.1 1350.  82.6
13. 209.85.241.84 0.0%   212  1291. 163.7
152.5 1291.  79.2
66.249.95.130
14. 216.239.43.1230.0%   212  205.3 166.0
162.0 231.2  10.7
15. 66.249.95.133 0.0%   212  170.2 167.7
166.2 194.1   4.1
16. 216.239.48.5  0.0%   212  172.5 172.5
170.8 263.0   8.7
17. 64.233.174.53 0.0%   212  170.9 176.6
170.8 358.0  17.3
64.233.174.29
18. 209.85.250.1  0.0%   212  171.1 176.9
171.0 195.2   4.9
209.85.255.245
209.85.250.5
209.85.255.249
19. bw-in-f121.1e100.net  0.0%   212  173.2 172.4
171.0 175.5   1.3


From germany(decix): 21msec
   Packets   Pings
 HostLoss%   Snt   Last   Avg
Best  Wrst StDev
...
 4. de-cix20.net.google.com   0.0%11   59.8   9.2
0.7  59.8  19.2
 5. 209.85.255.1760.0%111.4   1.4
1.0   1.8   0.2
 6. 216.239.48.11 0.0%11   12.8  14.3
12.2  21.4   3.4
 7. 216.239.48.5  0.0%11   21.7  17.6
16.6  21.7   1.8
 8. 64.233.174.53 0.0%11   17.2 164.0
16.6 1608. 479.2
64.233.174.29
 9. 209.85.255.2450.0%11   24.5  21.1
16.8  28.2   3.6
209.85.250.1
209.85.250.5
10. bw-in-f121.1e100.net  0.0%11   17.0  17.3
17.0  17.8   0.3

From china: 75msec
 Packets   Pings
 HostLoss%   Snt   Last   Avg
Best  Wrst StDev
...
 4. 124.74.254.1570.0%131.1   1.1
0.6   1.7   0.3
 5. 61.152.86.38  0.0%130.7   1.0
0.7   1.8   0.3
 6. 202.97.35.114 0.0%130.8   0.8
0.7   1.2   0.1
 7. 202.97.34.50  7.7%131.8   1.8
1.2   3.2   0.6
 8. 202.97.33.5   0.0%131.2   7.8
0.9  44.7  15.7
 9. ???
10. 209.85.249.1920.0%12   37.3  42.1
37.3  92.4  15.9
209.85.249.195
11. 209.85.250.90 0.0%12  3060. 325.5
74.3 3060. 861.4
209.85.250.86
12. 209.85.250.1010.0%12   75.0  75.1
74.3  76.1   0.7
209.85.243.21
209.85.250.103
13. 209.85.241.1540.0%12   75.2  79.7
74.8  87.3   4.5
209.85.241.166
209.85.241.162
209.85.241.158
14. tx-in-f121.1e100.net  0.0%12   75.9  75.6
74.2  76.3   0.7


mtr's to appspot (I used snapabug.appspot.com):

US: 73msec
 HostLoss%   Snt   Last   Avg
Best  Wrst StDev
...
 4. 10ge-ten1-3.dal-eqx-cor-2.peer1.net   0.0%297.5  10.5
7.5  93.8  16.0
 5. 10ge-ten1-1.dal-eqx-cor-1.peer1.net   0.0%287.5   7.6
7.5   8.0   0.1
 6. 10ge.ten1-2.la-600w-cor-2.peer1.net   0.0%28   44.0  46.9
44.0 125.5  15.4
 7. 64.34.254.42  0.0%28   43.9  44.4
43.9  54.6   2.0
 8. 216.239.46.1820.0%28   60.9  49.0
44.1  89.6  11.8
 9. 72.14.232.85  0.0%28   71.1  72.2
70.9  95.8   4.7
10. 216.239.48.34 0.0%28   74.2  74.0
73.4  74.8   0.3
216.239.43.220
216.239.43.228
209.85.250.144
11. 64.233.174.1270.0%28   74.9  98.3
73.4 184.5  33.2
64.233.174.125
64.233.174.101
64.233.174.103
12. 216.239.46.6

[google-appengine] how to download my own project hosted on Google app engine

2010-01-17 Thread jaljal
Hi,

I want to download my own project hosted on Google app engine because
I had losted it.

Can I do that  ?

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] Re: EntityProto instance to Model instance?

2010-01-17 Thread Andy Freeman
Search in google/appengine/ext/db/__init__.py for protobuf functions.


On Jan 16, 9:21 pm, Nickolas Daskalou n...@daskalou.com wrote:
 Does anyone have an answer for this? Google guys?

 2010/1/15 Kapil Kaisare kksm19820...@gmail.com



  As an aside: what is an EntityProto, and is there a link in the GAE
  documentation for it?

  Regards,
  Kaisare, Kapil Sadashiv

  On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou n...@daskalou.comwrote:

  How can I convert an EntityProto to a Model instance?

  I have a Model method, pre_put(), that I want to call on each Model
  instance before it's Put into the Datastore, using hooks (eg:
 http://code.google.com/appengine/articles/hooks.html).

  My hook code looks like this:

  def hook(service, call, request, response):
      assert service == 'datastore_v3'
      if call == 'Put':
          for entity in request.entity_list():
              entity.pre_put()

  When the hook is called and runs, I get this error:

  AttributeError: EntityProto instance has no attribute 'pre_put'

  Is there any way to convert the entities in request.entity_list() to their
  original Models, manipulate them, and then convert them back to an
  EntityProto instance? Or even better, if the EntityProto instances have
  references to the actual Model instances which we can access and 
  manipulate?

  --
  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%2bunsubscrib...@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.comgoogle-appengine%2bunsubscrib...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.- Hide quoted text -

 - Show quoted text -
-- 
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 download my own project hosted on Google app engine

2010-01-17 Thread Nickolas Daskalou
No, you can't currently do that.

There's an entry for it in the issue tracker, star it if you like:
http://code.google.com/p/googleappengine/issues/detail?id=1047


2010/1/18 jaljal jallouli.mo...@gmail.com

 Hi,

 I want to download my own project hosted on Google app engine because
 I had losted it.

 Can I do that  ?

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



Re: [google-appengine] Re: EntityProto instance to Model instance?

2010-01-17 Thread Nickolas Daskalou
Since these are not documented online anywhere, is it possible these
functions may change in the future (and hence break my code)?


2010/1/18 Andy Freeman ana...@earthlink.net

 Search in google/appengine/ext/db/__init__.py for protobuf functions.


 On Jan 16, 9:21 pm, Nickolas Daskalou n...@daskalou.com wrote:
  Does anyone have an answer for this? Google guys?
 
  2010/1/15 Kapil Kaisare kksm19820...@gmail.com
 
 
 
   As an aside: what is an EntityProto, and is there a link in the GAE
   documentation for it?
 
   Regards,
   Kaisare, Kapil Sadashiv
 
   On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou n...@daskalou.com
 wrote:
 
   How can I convert an EntityProto to a Model instance?
 
   I have a Model method, pre_put(), that I want to call on each Model
   instance before it's Put into the Datastore, using hooks (eg:
  http://code.google.com/appengine/articles/hooks.html).
 
   My hook code looks like this:
 
   def hook(service, call, request, response):
   assert service == 'datastore_v3'
   if call == 'Put':
   for entity in request.entity_list():
   entity.pre_put()
 
   When the hook is called and runs, I get this error:
 
   AttributeError: EntityProto instance has no attribute 'pre_put'
 
   Is there any way to convert the entities in request.entity_list() to
 their
   original Models, manipulate them, and then convert them back to an
   EntityProto instance? Or even better, if the EntityProto instances
 have
   references to the actual Model instances which we can access and
 manipulate?
 
   --
   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
 google-appengine%2bunsubscrib...@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-appengine@googlegroups.com
 .
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 google-appengine%2bunsubscrib...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.- Hide quoted
 text -
 
  - Show quoted text -

 --
 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] Re: EntityProto instance to Model instance?

2010-01-17 Thread Andy Freeman
I asked that question wrt db.class_for_kind and was told that it was
safe to assume that it would always be there.

I'd guess that model_from_protobuf should be safe as well.

File a bug requesting that it be added to the documented function
list.

On Jan 17, 6:26 pm, Nickolas Daskalou n...@daskalou.com wrote:
 Since these are not documented online anywhere, is it possible these
 functions may change in the future (and hence break my code)?

 2010/1/18 Andy Freeman ana...@earthlink.net



  Search in google/appengine/ext/db/__init__.py for protobuf functions.

  On Jan 16, 9:21 pm, Nickolas Daskalou n...@daskalou.com wrote:
   Does anyone have an answer for this? Google guys?

   2010/1/15 Kapil Kaisare kksm19820...@gmail.com

As an aside: what is an EntityProto, and is there a link in the GAE
documentation for it?

Regards,
Kaisare, Kapil Sadashiv

On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou n...@daskalou.com
  wrote:

How can I convert an EntityProto to a Model instance?

I have a Model method, pre_put(), that I want to call on each Model
instance before it's Put into the Datastore, using hooks (eg:
   http://code.google.com/appengine/articles/hooks.html).

My hook code looks like this:

def hook(service, call, request, response):
    assert service == 'datastore_v3'
    if call == 'Put':
        for entity in request.entity_list():
            entity.pre_put()

When the hook is called and runs, I get this error:

AttributeError: EntityProto instance has no attribute 'pre_put'

Is there any way to convert the entities in request.entity_list() to
  their
original Models, manipulate them, and then convert them back to an
EntityProto instance? Or even better, if the EntityProto instances
  have
references to the actual Model instances which we can access and
  manipulate?

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

   - Show quoted text -

  --
  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%2bunsubscrib...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.- Hide quoted text -

 - Show quoted text -
-- 
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: EntityProto instance to Model instance?

2010-01-17 Thread Nickolas Daskalou
Will do, thanks Andy.


2010/1/18 Andy Freeman ana...@earthlink.net

 I asked that question wrt db.class_for_kind and was told that it was
 safe to assume that it would always be there.

 I'd guess that model_from_protobuf should be safe as well.

 File a bug requesting that it be added to the documented function
 list.

 On Jan 17, 6:26 pm, Nickolas Daskalou n...@daskalou.com wrote:
  Since these are not documented online anywhere, is it possible these
  functions may change in the future (and hence break my code)?
 
  2010/1/18 Andy Freeman ana...@earthlink.net
 
 
 
   Search in google/appengine/ext/db/__init__.py for protobuf functions.
 
   On Jan 16, 9:21 pm, Nickolas Daskalou n...@daskalou.com wrote:
Does anyone have an answer for this? Google guys?
 
2010/1/15 Kapil Kaisare kksm19820...@gmail.com
 
 As an aside: what is an EntityProto, and is there a link in the GAE
 documentation for it?
 
 Regards,
 Kaisare, Kapil Sadashiv
 
 On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou 
 n...@daskalou.com
   wrote:
 
 How can I convert an EntityProto to a Model instance?
 
 I have a Model method, pre_put(), that I want to call on each
 Model
 instance before it's Put into the Datastore, using hooks (eg:
http://code.google.com/appengine/articles/hooks.html).
 
 My hook code looks like this:
 
 def hook(service, call, request, response):
 assert service == 'datastore_v3'
 if call == 'Put':
 for entity in request.entity_list():
 entity.pre_put()
 
 When the hook is called and runs, I get this error:
 
 AttributeError: EntityProto instance has no attribute 'pre_put'
 
 Is there any way to convert the entities in request.entity_list()
 to
   their
 original Models, manipulate them, and then convert them back to an
 EntityProto instance? Or even better, if the EntityProto instances
   have
 references to the actual Model instances which we can access and
   manipulate?
 
 --
 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
 google-appengine%2bunsubscrib...@googlegroups.com
   google-appengine%2bunsubscrib...@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-appengine@googlegroups.com
   .
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 google-appengine%2bunsubscrib...@googlegroups.com
   google-appengine%2bunsubscrib...@googlegroups.com
 .
 For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.-Hide quoted
   text -
 
- Show quoted text -
 
   --
   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%2bunsubscrib...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.- Hide quoted
 text -
 
  - Show quoted text -

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