[appengine-java] Re: Datastore server error

2012-03-22 Thread Mike Lawrence
Switch to HR datastore

On Mar 21, 9:28 am, Aswath Satrasala 
wrote:
> I have been have the same Datastore Viewer error with my appid
> 'vs-accounting'.  It is configure as M/S.
> I am having this trouble for over 1.5 days.  This application is in
> production.  I don't know what to do now  :(
>
> Error: Server Error
> The server encountered an error and could not complete your request.
> If the problem persists, please
> reportyour problem
> and mention this error message and the query that caused it.
>
> -Aswath
>
> On Sat, Mar 10, 2012 at 10:33 PM, wakk...@hotmail.com
> wrote:
>
>
>
> > Hi,
>
> > My application is address-generator-singapore.appspot.com, however the
> > Datastore Viewer seems to have gone awry. I can't view it at all; all that
> > happens when I click it is a server error and a link returning me to the
> > applications screen.
>
> > I've done research and it seems this problem is pretty rampart, but there
> > has been no fix regarding this as of yet. Is there a way to get an admin to
> > fix the problem? Because it broke my application and I can't run it at all
> > now.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/google-appengine-java/-/Bn9FOOIDEN0J.
> > To post to this group, send email to
> > google-appengine-java@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: Presentation: Developing WordPong.com on Google App Engine

2012-03-21 Thread Mike Lawrence
Not bought any GAE books.
The online docs are pretty good

On Mar 21, 6:17 am, Bucky  wrote:
> Great presentation and neat looking app. This come just in time for my
> development. Working alone from scratch, I've never done web development
> before, is challenging, to say the least.
>
> You've referenced many websites, but how about books you found helpful.
>
> Thanks again.
>
>
>
> On Tuesday, March 20, 2012 7:35:03 AM UTC-4, Mike Lawrence wrote:
>
> > Presenting this slide deck at DevNexus 2012 this week:
> >http://goo.gl/RspSm
>
> > It details my experiences developing
> >http://WordPong.com, a web-based social game, on GAE.
>
> > Mike Lawrence

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



[appengine-java] Presentation: Developing WordPong.com on Google App Engine

2012-03-20 Thread Mike Lawrence
Presenting this slide deck at DevNexus 2012 this week:
http://goo.gl/RspSm

It details my experiences developing
http://WordPong.com, a web-based social game, on GAE.

Mike Lawrence

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



[appengine-java] Re: publishing html files

2012-03-01 Thread Mike Lawrence
How about a public google doc?
https://support.google.com/docs/bin/answer.py?hl=en&answer=184006


On Feb 26, 2:28 pm, Vik  wrote:
> Hie
>
> I am generated html documents using a google text doc as template (reading
> it using gdata apis and then doing some text manipulation).
> Now, I want to publish these documents somewhere so that I can refer to
> others giving the url of the document (which means it would be publicly
> accessible).
>
> Any suggestions on how do i go about it? Like where should i host these?
>
> Thankx and Regards
>
> Vik
> Founderhttp://www.sakshum.orghttp://blog.sakshum.org

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



[appengine-java] Re: Increased Average HTTP Response Times since Feb 12th 2012

2012-03-01 Thread Mike Lawrence
App Engine Console
https://appengine.google.com/settings
Application Settings
Idle Instances
move slider

On Feb 29, 12:42 am, ravi kumar  wrote:
> Hi Mike how do you change the instance?
>
>
>
>
>
>
>
> On Saturday, 18 February 2012 19:20:34 UTC+5:30, Mike Lawrence wrote:
>
> > I changed instaces settings in console from auto to a minimum of two
> > and the response times are again about a second
> > On Feb 16, 2:07 pm, Matthias Friedrich  wrote:
> > > hi mike,
> > > i can confirm that. The responsetime is getting higher and higher,
> > > meanwhile some are above 90 seconds, causing complete failures. I wonder
> > > whats going on there?

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



[appengine-java] Re: Slow cold starts

2012-02-26 Thread Mike Lawrence

I noticed similar behavior.
I think the auto setting for minimum number
of instances changed from two to zero active
instances.
I changed from auto to one, and my app
is much more responsive. setting minimum
instances higher will co$t you more

On Feb 25, 9:36 am, Anders  wrote:
> In the recent weeks the cold starts for Java apps have started to take a
> long time in my experience. More than three seconds to load a webpage is
> too long generally for a high quality end user experience. I assume it
> happens when the physical GAE servers become too crowded resulting in
> sluggish cold start loading of apps from the file system (and/or maybe
> because of delays in the distributed file system itself).

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



[appengine-java] Re: GAE High Replication datastore (HRD) with transaction

2012-02-20 Thread Mike Lawrence
since hrd is eventually consistent,
you need to restructure your app to not
immediately query the newly commited data after a transaction.

welcome to nosql

my app builds its own result page that assumes the committed data is
there.
by the time the user refreshes the page the
data is there and queryable as normal

On Feb 18, 9:27 pm, sj  wrote:
> I'm using HRD because I want make changes to multiple entities within a
> single transaction using entity groups.
>
> Understand that Non transactional (non ancestor) queries may see all, some,
> or none of the results of a previously committed transaction.
>
> The problem I facing now is:
>
>    - After commit an transaction for adding new record to db
>
>   Transaction tx = pm.currentTransaction();
>   tx.begin();
>   pm.makePersistent(object);
>   tx.commit();
>
>    -
>
>    Follow by query the record committed, sometime it will return result and
>    some time just return as null
>
>    Query q = pm.newQuery(queryStatement);
>    CompanyProfile result = (CompanyProfile) q.execute();
>
> p/s: When turn off HRD, it work perfectly.
>
> Any workaround?
>
> Thanks
>
> Rgds SJ

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



[appengine-java] Re: Increased Average HTTP Response Times since Feb 12th 2012

2012-02-18 Thread Mike Lawrence
I changed instaces settings in console from auto to a minimum of two
and the response times are again about a second
On Feb 16, 2:07 pm, Matthias Friedrich  wrote:
> hi mike,
> i can confirm that. The responsetime is getting higher and higher,
> meanwhile some are above 90 seconds, causing complete failures. I wonder
> whats going on there?

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



[appengine-java] Increased Average HTTP Response Times since Feb 12th 2012

2012-02-16 Thread Mike Lawrence
Average HTTP Response times have gone from sub-second to about 10secs.
http://montools.com/stats/11770

I've not changed any admin settings or code.
Anyone else seeing this?

Looks like the scheduler now causes more cold starts.

Since me requests include memcache and database updates, not sure if
it's related to a service latency.


Response Time
Today   Yesterday   This Week   Last Week   This Month  
Last Month  This Year
Last Year
Max 11.808  12.594  25.427  6.199   25.427  11.191  25.427  30.952
Min 1.859   1.726   0.403   0.374   0.374   0.354   0.354   0.087
Avg 8.779   6.734   6.138   0.749   1.981   0.898   1.258   0.97
#Checks 22  48  166 335 741 1486222724426

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



Re: [appengine-java] Abridged summary of google-appengine-java@googlegroups.com - 10 Messages in 5 Topics

2012-02-15 Thread Mike Lawrence
Does the GAE File API support GAE projects created with a Google Apps account?

http://code.google.com/appengine/docs/java/googlestorage/overview.html
 says:
   Copy the value under Service Account Name. This is the service
account name of your application, in the format
application...@appspot.gserviceaccount.com. If you are using an App
Engine Premier Account, the service account name for your application
is in the format
application-id.example@appspot.gserviceaccount.com.

When I visit this page:
https://code.google.com/apis/console/b/0/#project:476894375364

and try to add this user (the account I'm trying to access the file api from):
   apptes...@appspot.gserviceaccount.com

I get the error:
   User apptes...@appspot.gserviceaccount.com may not be added to
project "API Project". Only members from domain systemsplanet.com (my
Google Apps Domain) may be added.

Sincerely,  Mike Lawrence

Blessed are the flexible, for they will never get bent out of shape

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



[appengine-java] AppEngineFile typo

2012-02-12 Thread Mike Lawrence
On page:
http://code.google.com/appengine/docs/java/googlestorage/overview.html

writableFile = new AppEngine(path);

should be

writableFile = new AppEngineFile(path);

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



[appengine-java] Re: Abridged summary of google-appengine-java@googlegroups.com - 8 Messages in 5 Topics

2012-01-14 Thread Mike Lawrence
I guess I didn't expect to see mention of requiring entity groups for
transactions now that GAE supports cross-entity-group transactions.

Does GAE really need both modes?
Is there a performance benefit to not
enabling global transactions?


On Jan 13, 3:25 m, "Ikai Lan (Google)"  wrote:
> Actually, I took a look at these docs and it seems like we do talk about
> cross group transactions. There are a few areas where we talk about
> exceptions being thrown for transactions on entities in different entity
> groups, but that's expected behavior. You must specify that you want a
> cross-group transaction.
>
> We'd definitely like to improve these docs, however. Do you have any
> suggestions or areas where this documentation seems confusing?
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> plus.ikailan.com | twitter.com/ikai
>
> On Fri, Jan 13, 2012 at 12:23 PM, Ikai Lan (Google) wrote:
>
>
>
> > Thanks! I'll file a bug for this since it's not merely a one line fix.
> > We'll probably want to better explain cross-entity group transactions a bit
> > and link to the documentation on that subject.
>
> > --
> > Ikai Lan
> > Developer Programs Engineer, Google App Engine
> > plus.ikailan.com | twitter.com/ikai
>
> > On Fri, Jan 13, 2012 at 11:12 AM, Mike Lawrence 
> > wrote:
>
> >> Ikai,
> >> Docs still say transactions wont span entity groups:
> >>http://code.google.com/appengine/docs/java/datastore/transactions.html
>
> >>http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes
> >>   Version 1.5.5 - Oct 11, 2011
> >>       App Engine now supports Cross Group (XG) transactions with the
> >> High Replication Datastore, which allow you to perform transactions
> >> across multiple entity groups.
> >>http://code.google.com/appengine/docs/java/datastore/transactions.html
>
> >> Sincerely,  Mike Lawrence
>
> >> On Thu, Jan 12, 2012 at 12:23 AM,
> >>  wrote:
> >> >   Today's Topic Summary
>
> >> > Group:http://groups.google.com/group/google-appengine-java/topics
>
> >> > problem with Content-type: null with css files [1 Update]
> >> > Minor update to Java SDK: 1.6.1.1 [1 Update]
> >> > [No Subject] [1 Update]
> >> > proxying datastore request [3 Updates]
> >> > how to get the correct time for germany? [2 Updates]
>
> >> >  problem with Content-type: null with css files
>
> >> > "Ikai Lan (Google)"  Jan 11 05:22PM -0800
>
> >> > We have an SDK update that resolves this issue on upload (I've also
> >> posted
> >> > in a separate thread about this):
> >> > ...more
>
> >> >  Minor update to Java SDK: 1.6.1.1
>
> >> > "Ikai Lan (Google)"  Jan 11 05:21PM -0800
>
> >> > Hey everyone,
>
> >> > There's a new version of the Java SDK available for download. You can
> >> get
> >> > it here:
>
> >>http://code.google.com/p/googleappengine/downloads/detail?name=appeng...
> >> > ...more
>
> >> >  [No Subject]
>
> >> > Aviv Keren  Jan 11 11:08PM +0200
>
> >> > Ok tnx!
> >> > ...more
>
> >> >  proxying datastore request
>
> >> > meiaestro  Jan 11 07:18AM -0800
>
> >> > Hi all!
>
> >> > I was thinking about making my RPC calls to the server (datastore
> >> commands)
> >> > more secure against java script or data stream modifications on client
> >> side
> >> > (when user is already signed ...more
>
> >> > "Ikai Lan (Google)"  Jan 11 10:44AM -0800
>
> >> > Hi there!
>
> >> > "- a logged in user could manipulate the RPC call (he could for
> >> > example exchange his userID by the ID of someone else and access the
> >> data
> >> > of this user)
>
> >> > - to avoid that I need to ...more
>
> >> > meiaestro  Jan 11 12:31PM -0800
>
> >> > Thanks for the reply.
>
> >> > You're right. I did not use the Users API, as I do not want to force the
> >> > users to have a google account (or any other existing account). This
> >> will
> >> > be optional at a ...more
>
> >> >  how to get the correct time for germany?
>
> >> > vega <_v...@vr-web.de> Jan 11 07:24AM -0800
>
> >> > hi everyone.
>
> >> > since the days are getting longer, i n

Re: [appengine-java] Abridged summary of google-appengine-java@googlegroups.com - 8 Messages in 5 Topics

2012-01-13 Thread Mike Lawrence
Ikai,
Docs still say transactions wont span entity groups:
http://code.google.com/appengine/docs/java/datastore/transactions.html


http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes
   Version 1.5.5 - Oct 11, 2011
   App Engine now supports Cross Group (XG) transactions with the
High Replication Datastore, which allow you to perform transactions
across multiple entity groups.
http://code.google.com/appengine/docs/java/datastore/transactions.html

Sincerely,  Mike Lawrence





On Thu, Jan 12, 2012 at 12:23 AM,
 wrote:
>   Today's Topic Summary
>
> Group: http://groups.google.com/group/google-appengine-java/topics
>
> problem with Content-type: null with css files [1 Update]
> Minor update to Java SDK: 1.6.1.1 [1 Update]
> [No Subject] [1 Update]
> proxying datastore request [3 Updates]
> how to get the correct time for germany? [2 Updates]
>
>  problem with Content-type: null with css files
>
> "Ikai Lan (Google)"  Jan 11 05:22PM -0800
>
> We have an SDK update that resolves this issue on upload (I've also posted
> in a separate thread about this):
> ...more
>
>  Minor update to Java SDK: 1.6.1.1
>
> "Ikai Lan (Google)"  Jan 11 05:21PM -0800
>
> Hey everyone,
>
> There's a new version of the Java SDK available for download. You can get
> it here:
>
> http://code.google.com/p/googleappengine/downloads/detail?name=appengine-java-sdk-1.6.1.1.zip
> ...more
>
>  [No Subject]
>
> Aviv Keren  Jan 11 11:08PM +0200
>
> Ok tnx!
> ...more
>
>  proxying datastore request
>
> meiaestro  Jan 11 07:18AM -0800
>
> Hi all!
>
>
>
> I was thinking about making my RPC calls to the server (datastore commands)
> more secure against java script or data stream modifications on client side
> (when user is already signed ...more
>
> "Ikai Lan (Google)"  Jan 11 10:44AM -0800
>
> Hi there!
>
> "- a logged in user could manipulate the RPC call (he could for
> example exchange his userID by the ID of someone else and access the data
> of this user)
>
> - to avoid that I need to ...more
>
> meiaestro  Jan 11 12:31PM -0800
>
> Thanks for the reply.
>
>
>
> You're right. I did not use the Users API, as I do not want to force the
> users to have a google account (or any other existing account). This will
> be optional at a ...more
>
>  how to get the correct time for germany?
>
> vega <_v...@vr-web.de> Jan 11 07:24AM -0800
>
> hi everyone.
>
> since the days are getting longer, i noticed that in 2 months ill have an
> error with my getTime() Method, which gives me the current time in a "human
> friendly" way.
>
> /** ...more
>
> Ian Marshall  Jan 11 08:44AM -0800
>
> The code below is how I do this. It works for summer and winter times
> automajically.
>
> public static final Locale G_LOCALE_UK = Locale.UK;
> public static final String G_S_TIME_ZONE_ID = ...more
>
> You received this message because you are subscribed to the Google Group
> google-appengine-java.
> You can post via email.
> To unsubscribe from this group, send an empty message.
> For more options, visit this group.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] reading html stream

2011-12-11 Thread mike
Hi, I am trying to make some application for google app engine.

I am trying to get data from this url
http://streamerapi.finance.yahoo.com/s treamer/1.0?
s=EURUSD=X&k=l10,t10,g00,h00,v00,j10&callback=parent.yfs_u1f&mktmcb=parent.yfs_mktmc
b&gencallback= parent.yfs_gencb&r=0

The problem is that content don't have Connection: close or Content-
Length headers
and regular classes like urlconnection,HttpURLConnection or
com.google.appengine.api.urlfetch.*
don't give partially downloaded content available for reading.

How can I be in this situation, what can I do to resolve this problem?

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



[appengine-java] Memcache errors

2011-11-16 Thread Mike Lawrence
My Java GAE app has http sessions enabled.
Periodically, I see calls to createSession fail with a memcache error.
Anyone else seeing similar behavior?
Is there any elegant way to recover from this?


Here's an example:

2011-11-14 18:06:59.062

org.apache.jasper.runtime.JspFactoryImpl internalGetPageContext:
Exception initializing page context
com.google.appengine.api.memcache.MemcacheServiceException: Memcache
put: Error setting single item (_ahsfI5BsuS2dkt9spIPZsZcWQ)
at com.google.appengine.api.memcache.AsyncMemcacheServiceImpl
$7.transform(AsyncMemcacheServiceImpl.java:427)
at com.google.appengine.api.memcache.AsyncMemcacheServiceImpl
$7.transform(AsyncMemcacheServiceImpl.java:419)
at com.google.appengine.api.memcache.MemcacheServiceApiHelper
$RpcResponseHandler.convertResponse(MemcacheServiceApiHelper.java:59)
at com.google.appengine.api.memcache.MemcacheServiceApiHelper
$1.wrap(MemcacheServiceApiHelper.java:98)
at com.google.appengine.api.memcache.MemcacheServiceApiHelper
$1.wrap(MemcacheServiceApiHelper.java:92)
at
com.google.appengine.api.utils.FutureWrapper.wrapAndCache(FutureWrapper.java:
57)
at
com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:
98)
at
com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:
90)
at
com.google.appengine.api.memcache.MemcacheServiceImpl.quietGet(MemcacheServiceImpl.java:
27)
at
com.google.appengine.api.memcache.MemcacheServiceImpl.put(MemcacheServiceImpl.java:
79)
at
com.google.apphosting.runtime.jetty.MemcacheSessionStore.saveSession(MemcacheSessionStore.java:
39)
at
com.google.apphosting.runtime.jetty.SessionManager.createSession(SessionManager.java:
342)

...
at org.mortbay.jetty.Request.getSession(Request.java:1214)

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



[appengine-java] Re: Http 404 error in google app engine

2011-11-07 Thread Mike!

Try doGet, not post


On Oct 29, 10:20 am, jyoerye  wrote:
> I have a project in java with a My SQL data base which I need to
> transfer to Google App engine.
>
> I started with a simple example online:
> I created guestbook.jsp and SignGuestbookServlet,But I get this error
> Http 404: /sign not found:
>
> I am pasting the necessary files here:
> SignGuestbookServlet.java
> package guestbook;
>
> import java.io.IOException;
> import java.util.logging.Logger;
> import javax.servlet.http.*;
> import com.google.appengine.api.users.User;
> import com.google.appengine.api.users.UserService;
> import com.google.appengine.api.users.UserServiceFactory;
>
> public class SignGuestbookServlet extends HttpServlet {
>     /**
>          *
>          */
>         private static final long serialVersionUID = 1L;
>         private static final Logger log =
> Logger.getLogger(SignGuestbookServlet.class.getName());
>
>     public void doPost(HttpServletRequest req, HttpServletResponse
> resp)
>                 throws IOException {
>         UserService userService = UserServiceFactory.getUserService();
>         User user = userService.getCurrentUser();
>
>         String content = req.getParameter("content");
>         if (content == null) {
>             content = "(No greeting)";
>         }
>
>         resp.getWriter().println("Hello,this is jyo  world");
>
>        /* if (user != null) {
>             log.info("Greeting posted by user " + user.getNickname() +
> ": " + content);
>         } else {
>             log.info("Greeting posted anonymously: " + content);
>         }*/
>         resp.sendRedirect("/guestbook.jsp");
>     }
>
> }
>
> guestbook.jsp
>
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ page import="com.google.appengine.api.users.User" %>
> <%@ page import="com.google.appengine.api.users.UserService" %>
> <%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
>
> 
>   
>
> <%
>     UserService userService = UserServiceFactory.getUserService();
>     User user = userService.getCurrentUser();
>     if (user != null) {
> %>
> Hello, <%= user.getNickname() %>! (You can
> sign out.)
> <%
>     } else {
> %>
> Hello!
> Sign in
> to include your name with greetings you post.
> <%
>     }
> %>
>
> 
>     
>     
>   
>
>   
> 
>
> web.xml
>
> 
> 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">
>         
>                 sign
>                 guestbook.SignGuestbookServlet
>         
>         
>                 sign
>                 /sign
>         
>         
>                 guestbook.jsp
>         
> 

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



[appengine-java] Re: Prerelease SDK 1.5.5 available for download!

2011-10-03 Thread Mike!
Wow!  I was just starting to investigate other alternatives to GAE
since I need to have customers upload multiple files and though the
32Mb is fine per request, 30 seconds might be too short for a slow
internet connection.  The ability to write to the storage, 60 second
request and the migration to the high-replication datastore will be
enough for my app!

Thank you Google,
Mike!


On Oct 3, 3:40 pm, "Ikai Lan (Google)" 
wrote:
> Hey everyone,
>
> Prerelease SDK 1.5.5 is now available for download! You can get it here:
>
> Python:http://code.google.com/p/googleappengine/downloads/detail?name=google...
>
> Java:http://code.google.com/p/googleappengine/downloads/detail?name=appeng...
>
> We provide prerelease SDKs as previews for things to come. New features
> should not work in production yet, and documentation is typically still a
> work in progress. Release notes are below as well as in the prerelease
> packages:
>
> Python
> ===
> - Python 2.7 is now available as an experimental runtime for all
> applications
>   using the High Replication Datastore. To upload your app to the Python 2.7
>   runtime, change the runtime argument in your app.yaml to python27.
> - We have released an experimental utility, available in the Admin Console,
> to
>   assist in migrating your application to the High Replication datastore.
> This
>   utility allows you to copy the bulk of your data in the background, while
> the
>   source application is still serving. You then need a brief read-only
> period to
>   migrate your application data while you copy the data that has changed
> from
>   the time the original copy started.
> - We have increased the number of files you can upload with your application
>   from 3,000 to 10,000.
> - We have increased the size limit for a single file uploaded to App Engine
> from
>   10MB to 32MB.
> - We have increased the Frontend request deadline from 30 seconds to 60
> seconds.
> - We have increased the URLFetch maximum deadline from 10 seconds to 60
> seconds.
> - We have increased the URLFetch Post payload from 1MB to 5MB.
> - App Engine now supports Cross Group (XG) transactions with the High
>   Replication Datastore, which allow you to perform transactions across
>   multiple entity groups.
> - We have released an experimental API that can write to Google Storage for
>   Developers directly from App Engine.
> - We have added a graph to the admin console that displays the number of
>   instances for which you will be billed.
> - In the XMPP API, get_presence() is deprecated in favor of using the
> inbound
>   presence handlers documented in
>
> http://code.google.com/appengine/docs/python/xmpp/overview.html#Handl...
> .
> - The Task Queue API 'target' parameter now accepts a new value,
>   taskqueue.DEFAULT_APP_VERSION, which will send the task to the default
>   frontend version, rather than the version or backend where the 'add'
> method is
>   being called.
> - In the URLFetch API, make_fetch_call() now returns an RPC object.
> - Fixed an issue in the Admin Console where the "Run Now" button did not
> work
>   for tasks with a '-' in the name.
> - Fixed an issue where the SDK did not decode Base64 encoded blobs.
> - Fixed an issue to provide a better error message when using the Mail API
> to
>   send email to an invalid user address.
> - Fixed an issue in the SDK where a skip_files entry caused an ImportError
> when
>   the library was located elsewhere in the PYTHONPATH.
> - Fixed an issue in the SDK index viewer where the arrows indicating whether
> a
>   query was ascending or descending were not properly rendered.
> - Fixed an issue where httplib did not support the deadline argument for
>   URLFetch calls.
>    http://code.google.com/p/googleappengine/issues/detail?id=2216
> - Fixed an issue where you could not schedule a cron job to run every 100
>   minutes.
>    http://code.google.com/p/googleappengine/issues/detail?id=5243
> - Fixed an issue in the SDK where failed tasks retried immediately instead
> of
>   waiting for 30 seconds.
>    http://code.google.com/p/googleappengine/issues/detail?id=5587
> - Fixed an issue making it possible to modify request headers using the
> deferred
>   library.
>    http://code.google.com/p/googleappengine/issues/detail?id=5861
>
> Java
> =
> - We have released an experimental utility, available in the Admin Console,
> to
>   assist in migrating your application to the High Replication datastore.
> This
>   utility allows you to copy the bulk of your data in the background, while
> the
>   source application is still serving. You then need to take a short
> down

[appengine-java] Re: .A research: how long will your java app instance start up fully?

2011-10-01 Thread Mike Lawrence

2-3 secs with stripes + slim3

On Sep 29, 9:29 pm, Tapir  wrote:
> ?

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



[appengine-java] Re: Transactions on entities in different entity groups ?

2011-09-29 Thread Mike Lawrence
This is a really important enhancement..!  Please give more details.

The only thing bigger would be removing the "eventually consistent"
nature of the high availability data store,
and making it immediately consistent.

On Sep 28, 4:52 pm, "Ikai Lan (Google)"  wrote:
> You currently can't, but we plan on rolling out a feature that will do this
> in the next few releases. It's currently in trusted tester at the moment.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> plus.ikailan.com | twitter.com/ikai
>
> On Mon, Sep 26, 2011 at 10:59 PM, Santosh kumar  wrote:
> > Hi,
>
> > I want to know how to create/update the entities which are in different
> > entity groups ?
>
> > for ex: I want to update the *apple* and *carrot* entities in a
> > transaction but those parents are not same. (Here i am in such a situation)
>
> > Thanks in advance :)
>
> > *S*antosh *K*umar *K* **
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-java@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: The *real* cost of the billing changes

2011-09-06 Thread Mike Lawrence
Instead of ranting "google broke it",
it might be more productive if you:
- identify the type of app you are building
   - use cases
   - API calls
   - number users
   - typical transactions
   - consistency requirements
   - etc

then offer some suggestions on how google
could support your use cases
- tiered billing
- higher free quotas
- two year contracts
etc


On Sep 2, 7:22 pm, James Briant  wrote:
> The real cost: *My professional credibility.*
>
> That is something that is of immeasurable value and is now in the toilet. I
> do not see how it is recoverable and the loss to me is far beyond the
> not-inconsequential costs of migrating to EC2, Heroku (oh look, it runs java
> as a few days ago), Rackspace or Linode.
>
> I have spent the last year or so being a *very* vocal advocate of GAE. I
> have advocated to start-ups in the San Diego community and at events like
> Start Up Weekend, that teams use GAE: we're starting from scratch, so we *
> can* write our apps to follow the strange rules of GAE. I did so on the
> rational and reasonable belief that we had to write the apps this way
> because they allowed google to run our apps more efficiently than if we just
> spin up Tomcat. I assumed that there was secret sauce. I assumed that Google
> had done what Google does: looked at the data and done the math. Instead, it
> looks to me that they just thought of some ideas that *might* make things
> more efficient, but guessed wrong.
> *
> *Myself, and others who listened to me, have spent man-years writing
> software with onerous rules for not only zero benefit, but in fact vendor
> lock-in to higher costs. And while it will be possible to recover our dollar
> costs by migrating our apps to EC2, Heroku, etc, *I will not be able to
> recover my credibility*.
>
> *How Google can make this right*
>
> I put a lot of effort into learning the GAE Way. *That investment needs to
> pay off.* If the hoops we had to jump through turned out to be the wrong
> hoops, tell us what the right hoops are. There *is* an *engineering*solution 
> to efficient (low cost), scalable app hosting. I bet my reputation
> on it. The GAE team needs to make that happen, not throw in the towel. If
> that means we need quota for things like RAM, fine.

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



[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Mike Lawrence
have you tried viewing the http headers in each request
using chrome, firebug, httpwatch, etc?
sunshine is the best disinfectant

I dont think redirects normally can set cookies
maybe the prod server is striping your
invalid host headers on a redirect

On Aug 28, 7:32 am, Simon Knott  wrote:
> You're not placing anything in your session which isn't serializable are
> you?  
>
> Given that everything seems to be failing when it's starting up a new
> instance, which is when it will attempt to read the session out of the
> datastore/memcache, it may be that it can't deserialize your data.

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



[appengine-java] Re: Always On not working properly

2011-08-26 Thread Mike Lawrence

switching to the high availability data store
fixed this for me.

On Aug 25, 10:30 am, Anders  wrote:
> I switched on the Always On option and it works inasmuch as the dashboard
> shows three resident instances but new instances are started sometimes with
> only a few seconds between page accesses with very low overall traffic. In
> the log the message "This request caused a new process to be started for
> your application, and thus caused your application code to be loaded for the
> first time." pops every 10 log lines or so.
>
> Surely, with Always On activated, new instances should not be started
> several times every minute?! The reason I switched it on was to prevent
> exactly that from happening.

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



[appengine-java] Re: "ApplicationError: 10: Unknown" when writing to blobstore using FileService

2011-08-24 Thread Mike Prince
Good call - I added BufferedInputStream and BufferedOutputStream and
it solved the problem.

i.e. ObjectOutputStream out = new ObjectOutputStream( new
BufferedOutputStream( Channels.newOutputStream( writeChannel ),
65536 ) );

Thanks!

- Mike

On Aug 19, 10:48 am, "Ikai Lan (Google)"  wrote:
> We're surfacing a bad error here. Basically, you get this error message if
> you hold the file open too long; we recommend around 30 seconds.
>
> I'll file a bug internally to get a better error message. Can you break this
> up into multiple writes?
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> plus.ikailan.com | twitter.com/ikai
>
>
>
>
>
>
>
> On Wed, Aug 17, 2011 at 5:32 PM, Mike Prince  wrote:
> > I'm trying to write a Java serialized HashMap to the
> > blobstore using the FileService and getting an "Unknown" error 10.
> > I'm guessing there's 10,000+ items in the map.
>
> > Below is the code I'm using, followed by the stack trace.
>
> > Can someone clue me in on what I'm doing wrong?  And yes, it works
> > fine in the development environment ;)
>
> > Thanks,
>
> > Mike
>
> > public class Filer
> > {
> >        private static final FileService fileService =
> > FileServiceFactory.getFileService();
> >        private static final BlobstoreService blobstoreService =
> > BlobstoreServiceFactory.getBlobstoreService();
>
> >        public static String save( Object value )
> >                throws IOException
> >        {
> >                if( value == null ) return null;
>
> >                AppEngineFile file = fileService.createNewBlobFile(
> > "text/plain" );
> >                return save( file, value );
> >        }
>
> >        private static String save( AppEngineFile file, Object value )
> >                throws IOException
> >        {
> >                // Open a channel and write out object
> >                FileWriteChannel writeChannel =
> > fileService.openWriteChannel( file,
> > true );
> >                ObjectOutputStream out = new
> > ObjectOutputStream( Channels.newOutputStream( writeChannel ) );
> >                out.writeObject( value );
>
> >                // Close it up
> >                out.close();
> >                writeChannel.closeFinally();
>
> >                return file.getFullPath();
> >        }
>
> > And here's the exception...
>
> > org.apache.jsp.tasks.create_002duser_002dsegment_jsp _jspService:
> > Failed to create user segment
> > java.io.IOException
> >        at
>
> > com.google.appengine.api.files.FileServiceImpl.translateException(FileServi 
> > ceImpl.java:
> > 501)
> >        at
>
> > com.google.appengine.api.files.FileServiceImpl.makeSyncCall(FileServiceImpl 
> > .java:
> > 479)
> >        at
> > com.google.appengine.api.files.FileServiceImpl.append(FileServiceImpl.java:
> > 426)
> >        at
> > com.google.appengine.api.files.FileServiceImpl.append(FileServiceImpl.java:
> > 171)
> >        at
>
> > com.google.appengine.api.files.FileWriteChannelImpl.write(FileWriteChannelI 
> > mpl.java:
> > 49)
> >        at
>
> > com.google.appengine.api.files.FileWriteChannelImpl.write(FileWriteChannelI 
> > mpl.java:
> > 41)
> >        at java.nio.channels.Channels.write(Channels.java:80)
> >        at java.nio.channels.Channels.access$000(Channels.java:64)
> >        at java.nio.channels.Channels$1.write(Channels.java:151)
> >        at java.io.ObjectOutputStream
> > $BlockDataOutputStream.drain(ObjectOutputStream.java:1855)
> >        at java.io.ObjectOutputStream
> > $BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1764)
> >        at
> > java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:
> > 1558)
> >        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
> > 346)
> >        at
> > com.yumyumlabs.foundation.appengine.util.Filer.save(Filer.java:42)
> >        at
> > com.yumyumlabs.foundation.appengine.util.Filer.save(Filer.java:33)
> >        at
> > com.yumyumlabs.server.recipe.model.UserSegment.saveUsers(UserSegment.java:
> > 51)
> >        at
>
> > org.apache.jsp.tasks.create_002duser_002dsegment_jsp._jspService(create_002 
> > duser_002dsegment_jsp.java:
> > 104)
> >        at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> >        at javax.servlet.h

[appengine-java] Re: Deploy button in Eclipse does not prompt for administrator account username

2011-08-23 Thread Mike Lawrence

I still cant sign in from eclipse Helios, but I was able to deploy
using this cmd:

set GAESDK=C:\eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.5.0.r36v201105092302\appengine-
java-sdk-1.5.0
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_25
"%JAVA_HOME%\bin\java" -cp "%GAESDK%\lib\appengine-tools-api.jar"
com.google.appengine.tools.admin.AppCfg update war


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


On Aug 22, 4:52 am, Bjorn B  wrote:
> I think the issue is that on some installations for Eclipse (STS among
> other) you get an silent error when clicking on the Google-login
> button in the bottom left corner. Some odd exception (only vissible in
> the error pane), and nothing happends. I still haven't worked out how
> to get around this error.
>
> /Björn
>
> On Aug 16, 9:59 pm, "Ikai Lan (Google)"  wrote:> You need 
> to go to:
>
> > appengine.google.com
>
> > and register an application ID. You can't use one that's taken. Once that's
> > done, put that into your appengine-web.xml.
>
> > --
> > Ikai Lan
> > Developer Programs Engineer, Google App Engine
> > plus.ikailan.com | twitter.com/ikai
>
> > On Sun, Aug 14, 2011 at 10:26 PM, C De  wrote:
> > > So I installed Google App Engine for Java using Eclipse and successfully
> > > created the sample Guestbook project.I managed to run the project on my
> > > machine and also created an app id using the admin console. However when I
> > > try and deploy the app on the Google App Engine I do not get any prompt
> > > asking me to login, subsequently I get an error saying "This application
> > > does not exist".
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Google App Engine for Java" group.
> > > To view this discussion on the web visit
> > >https://groups.google.com/d/msg/google-appengine-java/-/-PFNasspAU4J.
> > > To post to this group, send email to
> > > google-appengine-java@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-appengine-java+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] "ApplicationError: 10: Unknown" when writing to blobstore using FileService

2011-08-17 Thread Mike Prince
I'm trying to write a Java serialized HashMap to the
blobstore using the FileService and getting an "Unknown" error 10.
I'm guessing there's 10,000+ items in the map.

Below is the code I'm using, followed by the stack trace.

Can someone clue me in on what I'm doing wrong?  And yes, it works
fine in the development environment ;)

Thanks,

Mike


public class Filer
{
private static final FileService fileService =
FileServiceFactory.getFileService();
private static final BlobstoreService blobstoreService =
BlobstoreServiceFactory.getBlobstoreService();

public static String save( Object value )
throws IOException
{
if( value == null ) return null;

AppEngineFile file = fileService.createNewBlobFile( 
"text/plain" );
return save( file, value );
}

private static String save( AppEngineFile file, Object value )
throws IOException
{
// Open a channel and write out object
FileWriteChannel writeChannel = fileService.openWriteChannel( 
file,
true );
ObjectOutputStream out = new
ObjectOutputStream( Channels.newOutputStream( writeChannel ) );
out.writeObject( value );

// Close it up
out.close();
writeChannel.closeFinally();

return file.getFullPath();
}



And here's the exception...


org.apache.jsp.tasks.create_002duser_002dsegment_jsp _jspService:
Failed to create user segment
java.io.IOException
at
com.google.appengine.api.files.FileServiceImpl.translateException(FileServiceImpl.java:
501)
at
com.google.appengine.api.files.FileServiceImpl.makeSyncCall(FileServiceImpl.java:
479)
at
com.google.appengine.api.files.FileServiceImpl.append(FileServiceImpl.java:
426)
at
com.google.appengine.api.files.FileServiceImpl.append(FileServiceImpl.java:
171)
at
com.google.appengine.api.files.FileWriteChannelImpl.write(FileWriteChannelImpl.java:
49)
at
com.google.appengine.api.files.FileWriteChannelImpl.write(FileWriteChannelImpl.java:
41)
at java.nio.channels.Channels.write(Channels.java:80)
at java.nio.channels.Channels.access$000(Channels.java:64)
at java.nio.channels.Channels$1.write(Channels.java:151)
at java.io.ObjectOutputStream
$BlockDataOutputStream.drain(ObjectOutputStream.java:1855)
at java.io.ObjectOutputStream
$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1764)
at
java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:
1558)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
346)
at com.yumyumlabs.foundation.appengine.util.Filer.save(Filer.java:42)
at com.yumyumlabs.foundation.appengine.util.Filer.save(Filer.java:33)
at
com.yumyumlabs.server.recipe.model.UserSegment.saveUsers(UserSegment.java:
51)
at
org.apache.jsp.tasks.create_002duser_002dsegment_jsp._jspService(create_002duser_002dsegment_jsp.java:
104)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
390)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at
org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:
213)
at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:
171)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:
145)
at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:
92)
at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:
381)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at org.machino.servlet.PageTimerFilter.doFilter(PageTimerFilter.java:
63)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at org.machino.servlet.LoginFilter.doFilter(LoginFilter.java:121)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at org.machino.servlet.RedirectFilter.doFilter(RedirectFilter.java:
53)
at org.mortbay.

[appengine-java] Re: Getting a grip on startup

2011-08-06 Thread Mike Lawrence
the stripes web framework starts in
under 3 seconds on GAE.
it's clean, simple, and light.

do you really need spring?
is wiring beans really worth all the startup cost?



On Aug 3, 9:57 pm, John  wrote:
> As our app has grown, the amount of initialization work to do in order to
> make an instance useful has increased to the point that GAE often terminates
> requests that start a new instance. We had a warmup servlet, but the work
> started to commonly exceed the deadline. We're now looking to pare down the
> warmup, but we're having trouble with tuning since the behavior seems pretty
> different on the dev server from GAE. On the dev server, the initialization
> (loading our initial servlets) will complete in the vicinity of 4sec while
> GAE instance startup is often more than 20sec. We often see inexplicable
> gaps in our logging of 15sec or more (seemingly hung up), but it doesn't
> seem repeatable.
>
> Our focus to date has been to optimize the JDO/Datanucleus startup, but we
> believe that a significant contributor might be the number of classes
> loaded. Is it accurate to conclude that class loading carries a larger
> overhead on GAE than other environments? Are there any tools that will help
> us understand the processing during this startup? The Appstats tool shows
> long delays, but we don't know what is taking time besides the RPCs.

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



[appengine-java] Re: Joins!

2011-08-06 Thread Mike Lawrence
to build a scalable schema on GAE I'd consider
this agile/tracer bullet approach:
1 identify your most common couple of use cases
  eg building home page, list friends, etc
2 implement it from front end to back end
 using keyed reads over queries where
possible
3 add new features without breaking the
speed of your top use cases

use background tasks to propagate
updates to denormalized data where
needed.

consider slim3 dao for global transactions
to keep your model consistant


mike




On Aug 5, 8:06 pm, Jeff Schnitzer  wrote:
> On Fri, Aug 5, 2011 at 11:45 AM, William Levesque
>
>  wrote:
>
> > But is Google's position that all data should be denormalized?
>
> I don't think anyone would say that.  I wrote up my thoughts around
> this subject here:
>
> http://blog.similarity.com/post/7541938593/how-to-build-an-online-dat...
>
> The upshot is that we've been conditioned by SQL theorists to believe
> that there is a "proper" way of modeling data; that the data itself
> defines the schema and the magic of the RDBMS behind the curtain makes
> it fast.  Unfortunately, this is a lie.  It worked to a point but the
> traffic demands of a mass consumer application have vastly outstripped
> the RDBMS.  You're back to figuring out how to optimize your schema
> for your particular query profile.
>
> So the answer is not "denormalize everything", it's "denormalize the
> right things".  And "the right things" will vary from application to
> application.  You just have to build up a correct mental model of how
> the datastore performs and then design your application accordingly.
>
> Jeff

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



[appengine-java] Re: JDODetachedFieldAccessException when accessing detached object from memcache

2011-07-26 Thread Mike Prince


On Jul 26, 2:00 am, Eduardo Garcia Lopez  wrote:
> Since some days ago we are experiencing some similar problem when accessing
> JDO detached objects.
> We are using two different backends, and task queues, so I suspect there
> could be some problem related to multithread/multiinstance with Datastore.
>
> One question, Mike, are you using backends?

We are not.

I'll keep experimenting today and see what I dig up.

Thanks,

Mike

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



[appengine-java] JDODetachedFieldAccessException when accessing detached object from memcache

2011-07-26 Thread Mike Prince
We've been using memcache to cache detached JDO objects successfully.

However we tried to do a new release today and a new error has popped
up:

"...JDODetachedFieldAccessException... yet this field was not detached
when you detached the object"

The first time we retrieve an object using JDO and access it's fields
everything is ok.  But if we detach and save that object to memcache,
retrieve the object from memcache, and try to access a String field we
get the above error.

Any ideas why this started happening?

Thanks,

Mike

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



[appengine-java] Re: ANN: BatchFB 2.1, a Java Facebook library with automatic batching

2011-07-13 Thread Mike Lawrence

Nice Jeff. Do you ever sleep? ;)

Now we can quickly move all the
fb data to g+ and stop using fb. joy.

On Jul 12, 1:55 am, Jeff Schnitzer  wrote:
> This is the first time I've announced this opensource project in this forum
> because until now there wasn't anything GAE-specific about it.  You can
> still use BatchFB outside of GAE, but now BatchFB will use asynchronous
> fetching on App Engine to issue multiple batches to Facebook in parallel.
>  This is *the* fastest way to pull down significant quantities of data from
> Facebook.
>
> http://batchfb.googlecode.com/
>
> Here is a quick snippet of code:
>
> ---
>
> Batcher batcher = new FacebookBatcher(accessToken);
>
> Later me = batcher.graph("me", User.class);
> Later mark = batcher.graph("markzuckerberg", User.class);
> Later> myFriends = batcher.query(
>     "SELECT uid, first_name, pic_square FROM user WHERE uid IN" +
>     "(SELECT uid2 FROM friend WHERE uid1 = " + myId + ")", User.class);
> Later bob = batcher.queryFirst("SELECT timezone FROM user WHERE
> uid = " + bobsId, User.class);
> PagedLater feed = batcher.paged("me/feed", Post.class);
>
> // No calls to Facebook have been made yet.  The following get() will
> execute the
> // whole batch as a single Facebook call.
> String timezone = bob.get().timezone;
>
> ---
>
> You can stack up hundreds of Graph and FQL requests using the Future-like
> interface; BatchFB will group them into batches and execute the batches in
> parallel on App Engine.
>
> Enjoy,
> Jeff

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



[appengine-java] Re: Blog with schema advice for GAE/NoSQL users

2011-07-13 Thread Mike Lawrence

Nice blog post Jeff.

I've found myself storing lists of keys
in my domain objects to replace
queries with fast parallel gets of
related domain objects. Of course,
there is a trade-off of the expense
of keeping the key list fresh. This makes
the GUI extreamly fast (no queries, just
gets) and moves the slow updates to
the background. Won't work for all
use-cases but works well for my apps.




On Jul 12, 4:40 pm, Jeff Schnitzer  wrote:
> I've been keeping a technology blog about Similarity.com, and writing about
> some of the architectural issues I've faced.  The most recent entry exposes
> some of my schema and gives some advice about how to model data structures
> on App Engine (with Objectify, but the same lessons apply to any NoSQL
> system):
>
> http://blog.similarity.com/post/7541938593/how-to-build-an-online-dat...
>
> There's a Hacker News story for it 
> here:http://news.ycombinator.com/item?id=2756212
>
> Jeff

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



[appengine-java] Cost of using async-session-persistence?

2011-07-01 Thread Mike Lawrence
Googlers?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/TMf-DMwnkYQJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Cost of using async-session-persistence?

2011-06-29 Thread Mike Lawrence
What is the financial cost associated with using this feature?
IE how many additional API calls/datastore accesses/bytes transferred/
etc can one expect?

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

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



[appengine-java] Re: Channel API

2011-06-28 Thread Mike Kitzman
I have a question about this.  On the client side, I can call the close() 
function on the created Socket object, however when I have the same client 
re-connect and request another token, it seems that I am unable retrieve 
another token (The call to createChannel never returns).  Is this something 
that I shouldn't be doing on the client?  Should I just leave the open 
channel and let it eventually die?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/8im6GDnVcKYJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Eclipse App Engine Deploy Does Nothing

2011-06-22 Thread Mike Davis
I recently installed the google app engine plug in for eclipse. I created a 
small sample project, and entered my application id into the xml file.  When 
I click on the button for  "Deploy App Engine Project" absolutely nothing 
happens. I don't get any popups or console out put or anything.  Also, if I 
click on the Sign in to Google button on the back of the IDE nothing 
happens.  The other buttons like Creating a project and compiling work, and 
I can run my example on my local box just fine.  

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/Xdny4ggTrp0J.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Mike Lawrence
I get...

The number of entities: 1
low level 1717 millis
slim3 1502 millis
objectify 2970 millis
jdo 3485 millis

probably should modify this example
to do an average of several runs

one important thing to note, is slim3 allows you
to update multiple entity types
in a single transaction.
not possible with the other 3 APIs



On Jun 7, 4:00 am, Ian Marshall  wrote:
> The low-level API does indeed look very fast.
>
> Just a comment on JDO: repeat runs roughly halve the JDO run time. I
> presume that this is because for repeat runs the JDO persistence
> manager factory has already been constructed.
>
> On Jun 6, 8:44 pm, DennisP  wrote:> I'm looking at 
> this online demo:http://slim3demo.appspot.com/performance/
>
> > Sample run:
> > The number of entities: 1
> > low-level API:get: 2 millis
> > Slim3: 2490 millis
> > JDO: 6030 millis
>
> > Is the low-level API really that much faster?

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



[appengine-java] Unit Testing Emails

2011-06-06 Thread Mike!
Hey all,

I've been trying to do some unit testing for emails.  I've tried
GreenMail in conjunction with JUnit Rule + ExternalResource (start/
stop GreenMail service)...I'm now stumped and can't find anything on
the great oracle (google).  Any ideas?

Mike!

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



[appengine-java] Re: Java => Google app

2011-05-24 Thread Mike Lawrence
maven thoughts

- anyone who's worked on a large
project over time has seen the build
scripts grow in complexity and maintenance
costs

- maven, like many solutions, introduces
a domain-specific-language to simplify
things, or in mavens case, a domain
specific XML schema

- I usually cringe when I see a new dsl.
just one more unnatural thing to learn

- however in practice, I've seen maven
greatly simplify and standardize
large scale development (dozens
of developers working together on dozens
of projects)

- as always - UTRTFTJ use the right
tool for the job

- as for app engine, I don't use a build script.
stand-alone eclipse works fine with
a few developers on a project
On May 23, 8:08 pm, Brandon Donnelson  wrote:
> I see nothing wrong with what you said. Its fun to see others perspectives.
> That's what this group is all about. :)
> On May 23, 2011 4:58 PM, "Rusty Wright"  wrote:> 
> Sorry, my post was slightly tongue in cheek; sometimes I can't resist
> > sticking a twig into a hornet's nest.
>
> > On 2011-05-23 08:26, Ugorji wrote:
> >> +1 all the way to Jeff's comments.
>
> > --
> > You received this message because you are subscribed to the Google Groups
>
> "Google App Engine for Java" group.> To post to this group, send email to
>
> google-appengine-java@googlegroups.com.> To unsubscribe from this group, send 
> email to
>
> google-appengine-java+unsubscr...@googlegroups.com.> For more options, visit 
> this group at
>
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>
>
>

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



[appengine-java] Re: GAE - Java - JSON?

2011-05-21 Thread Mike Lawrence
+1 stripes
  my stripe app boots cold in 2 seconds
  round trip times from browser to datastore
  in back are about 100ms

the rest of the stack...

  combined with slim3 datastore and
  much if the gae datastore issues
  melt away

  jquery mobile - works cross browser,
google tv, cross smart phone.
write once, run almost (requires
 a new version of IE) anywhere with
 no plugin



On May 20, 10:39 pm, Rusty Wright  wrote:
> I'm using Stripes (an action based framework, similar to Struts 2 but
> *way* better) and GSON.  Stripes is very flexible and powerful and very
> well thought out and designed.
>
> On 2011-05-20 06:43, Pop Vasile wrote:> Thanks guys, great resources. I'm 
> still a bit confused about the
> > approach on GAE server-side... Should I use servlets? Restlet?
> > Something else?
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-java@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: SpringMVC RESTful + JSP + GAE/J .. 404 not found on JSPs..

2011-05-17 Thread Mike!
Quick question, do you have "error.jsp" in your /WEB-INF/view/jsp/
folder?  Also, in your first method
(TestController.testStringResult()) you misspelled "redirect", which
will also result in 404.  Also, take off the leading "/" for the
testModelAndView() and testString()...you're effectively looking for /
WEB-INF/view/jsp//error.jsp (which should still resolve, but is not
necessary and clouds up the code a bit)


Mike!


On May 15, 9:09 pm, jlc488  wrote:
> I've implemented a site using SpringMVC RESTful approaches. I did not
> need any view such as JSP or Velocity and stuff at that time.
>
> For some reason, I needed views using JSPs. Somehow It is showing 404
> not found on JSPs or any views include HTMLs on Google AppEngine.
>
> My requirements are
>
> 1) It should work as RESTful approach which means It returns JSON
> formats of results according to the request. --> working like charm
>
> 2) It should be able to show the JSP result pages on such requests
> like clicking User status confirmation link. --> 404 not found.
>
> I suspect this would be the ViewResolver problems but I have no clue
> about which resolver and how to use it properly.
>
> My configurations are below.
>
> --- start of restTask-servlet.xml -
>
> 
>          class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandl 
> erAdapter">
>                 
>                         
>                                 
>                                 
>                                 
>                         
>                 
>         
>
>          class="org.springframework.http.converter.json.MappingJacksonHttpMessageCon 
> verter"/
>
>
>
>          class="org.springframework.http.converter.StringHttpMessageConverter" /
>
>
>
>          class="org.springframework.http.converter.FormHttpMessageConverter" />
>
>          class="com.otuls.task.view.json.MyContentNegotiatingViewResolver">
>         
>         
>         
>         
>         
>         
>         
>         
>         
>         
>         
>         
>         
>         
>
>         
> class="org.springframework.web.servlet.view.InternalResourceViewResolver">
>                 
>                 
>                 
>         
> - end of restTask-servlet.xml ---
>
> - start of JsonView Class ---
>
> public class JsonView extends  AbstractView{
>
>         public static final String DEFAULT_CONTENT_TYPE = "application/json";
>
>         private ObjectMapper objectMapper = new ObjectMapper();
>
>         private JsonEncoding encoding = JsonEncoding.UTF8;
>
>         private boolean prefixJson = false;
>
>         private Set renderedAttributes;
>
>         public JsonView() {
>                 setContentType(DEFAULT_CONTENT_TYPE);
>         }
>
>         public void setObjectMapper(ObjectMapper objectMapper) {
>                 Assert.notNull(objectMapper, "'objectMapper' must not be 
> null");
>                 this.objectMapper = objectMapper;
>         }
>
>         public void setEncoding(JsonEncoding encoding) {
>                 Assert.notNull(encoding, "'encoding' must not be null");
>                 this.encoding = encoding;
>         }
>
>         public void setPrefixJson(boolean prefixJson) {
>                 this.prefixJson = prefixJson;
>         }
>
>         /**
>          * Sets the attributes in the model that should be rendered by this
> view. When set, all other model attributes will be
>          * ignored.
>          */
>         public void setRenderedAttributes(Set renderedAttributes) {
>                 this.renderedAttributes = renderedAttributes;
>         }
>
>         @Override
>         protected void prepareResponse(HttpServletRequest request,
> HttpServletResponse response) {
>                 response.setContentType(getContentType());
>                 response.setCharacterEncoding(encoding.getJavaName());
>         }
>
>         @Override
>         protected void renderMergedOutputModel(Map model,
>                         HttpServletRequest request,
>                         HttpServletResponse response) throws Exception {
>                 model = filterModel(model);
>                 JsonGenerator generator =
> objectMapper.getJsonFactory().createJsonGenerator(response.getWriter());
>                 if (prefixJson) {
>                         generator.writeRaw("{} &

[appengine-java] Re: Vs: Re: Stripes + UrlBinding + Google App Engine

2011-05-15 Thread Mike Lawrence
there is no file system in gae so
the multipart wrapper could be your problem.
it probably would work locally by not in prod

On May 15, 8:30 am, Mike Lawrence  wrote:
> sorry you're having problems.
> dont think this is an app engine issue
> since many folks use stripes on gae.
> here are the stripe parts from my web XML
>
> 
> 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_4.xsd"
>         
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_4.xsd";
>         version="2.4">
>
>         
>                 StripesFilter
>                 net.sourceforge.stripes.controller.StripesFilter
>                 
>
>                 
>                         MultipartWrapperFactory.Class
>                         
>                         
> com.wordpong.app.stripes.EmptyMultipartWrapper
>                         
>                 
>
>         
>
>         
>                 StripesFilter
>                 DispatcherServlet
>                 
>                 *.jsp
>                 REQUEST
>                 FORWARD
>         
>
>         
>         
>                 DispatcherServlet
>                 
> net.sourceforge.stripes.controller.DispatcherServlet
>                 
>                 1
>         
>         
>                 DispatcherServlet
>                 *.action
>         
>
>         
>                 DynamicMappingFilter
>                  class>net.sourceforge.stripes.controller.DynamicMappingFilter
>                 
>         
>         
>                 DynamicMappingFilter
>                 /*
>                 REQUEST
>                 FORWARD
>         
>
> On May 14, 11:05 am, Pauli Savolainen 
> wrote:
>
>
>
> > Hello
>
> > I had some time to try this again, but I still have no success.
>
> > I have an ActionBean with @UrlBinding("/home"). The @DefaultHandler method
> > ForwardResolutions to index.jsp which only prints "Hello":
>
> > @DefaultHandler
> > public Resolution home() {
> >   return new ForwardResolution("index.jsp"); // Also tried "/index.jsp"
>
> > }
>
> > In dev environment I access my app 
> > viahttp://localhost:/index.jspandhttp://localhost:/home. Both print 
> > "Hello". That is, it works perfectly.
>
> > After I have deployed my app on appengine I access the application via
> > http://.appspot.com/index.jsp. This prints "Hello", but when I access
> > my app via http://.appspot.com/home I get an infinite redirect loop.
> > I checked the app engine logs:
>
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> > /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/inde 
> > x.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> > /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> > /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> > /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> > /index.jsp/index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> > /index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> > /index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> > /index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp/index.jsp
> > /home/index.jsp/index.jsp
> > /home/index.jsp
> > /home/
>
> > I consider this more an app engine issue than Stripes issue because
> > everything works locally but not in app engine. Stripes uses a servlet
> > filter to handle the UrlBindings. The filter javadocs states:
>
> > This filter takes the following approach to determining when to dispatch an
> > ActionBean<http://stripes.sourceforge.net/docs/current/javad

[appengine-java] Re: Vs: Re: Stripes + UrlBinding + Google App Engine

2011-05-15 Thread Mike Lawrence
sorry you're having problems.
dont think this is an app engine issue
since many folks use stripes on gae.
here are the stripe parts from my web XML


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_4.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd";
version="2.4">





StripesFilter
net.sourceforge.stripes.controller.StripesFilter





MultipartWrapperFactory.Class


com.wordpong.app.stripes.EmptyMultipartWrapper










StripesFilter
DispatcherServlet

*.jsp
REQUEST
FORWARD










DispatcherServlet

net.sourceforge.stripes.controller.DispatcherServlet

1


DispatcherServlet
*.action













DynamicMappingFilter
net.sourceforge.stripes.controller.DynamicMappingFilter



DynamicMappingFilter
/*
REQUEST
FORWARD




On May 14, 11:05 am, Pauli Savolainen 
wrote:
> Hello
>
> I had some time to try this again, but I still have no success.
>
> I have an ActionBean with @UrlBinding("/home"). The @DefaultHandler method
> ForwardResolutions to index.jsp which only prints "Hello":
>
> @DefaultHandler
> public Resolution home() {
>   return new ForwardResolution("index.jsp"); // Also tried "/index.jsp"
>
> }
>
> In dev environment I access my app 
> viahttp://localhost:/index.jspandhttp://localhost:/home. Both print 
> "Hello". That is, it works perfectly.
>
> After I have deployed my app on appengine I access the application via
> http://.appspot.com/index.jsp. This prints "Hello", but when I access
> my app via http://.appspot.com/home I get an infinite redirect loop.
> I checked the app engine logs:
>
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/inde 
> x.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> /index.jsp/index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> /index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> /index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp 
> /index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp/index.jsp
> /home/index.jsp/index.jsp
> /home/index.jsp
> /home/
>
> I consider this more an app engine issue than Stripes issue because
> everything works locally but not in app engine. Stripes uses a servlet
> filter to handle the UrlBindings. The filter javadocs states:
>
> This filter takes the following approach to determining when to dispatch an
> ActionBean:
>
>    1. Allow the request to process normally, trapping any HTTP errors that
>    are returned.
>    2. If no error was returned then do nothing, allowing the request to
>    complete successfully. If any error other than 404 was returned then send
>    the error through. Otherwise ...
>    3. Check the 
> ActionResolverto
>  see if an
>    
> ActionBeanis
>  mapped to the URL. If not, then send the
>    404 error through. Otherwise...
>    4. Invoke 
> StripesFilterand
>    
> DispatcherServlet
>
> So it expects a 404. This all seems like the app engine doesn't like this
> behaviour, thus the infinte redirect loop.
>
> I have tried to clean my config

[appengine-java] unable to deploy to app engine anymore

2011-05-10 Thread mike fulton
Hi,

I have been successfully using google app engine under eclipse for quite 
awhile. When I tried to deploy an app engine project today from inside 
eclipse, I was prompted to log in to my google account. After specifying my 
email and password, I click the 'sign in' button and it doesn't do anything 
noticable. Anyone else seen this? I am running on Ubuntu 10.04. I've tried a 
few different versions of eclipse but got the same result. I've changed my 
GWT and google app engine versions as well, to no avail. I also tried 
changing my web browser to be 'external' and 'internal', but it's always 
launching the internal eclipse web browser. 
Any help would be much appreciated...

Thanks, Mike

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



[appengine-java] makePersistent silently failing after MetaDataValidator$DatastoreMetaDataException in development

2011-04-26 Thread Mike Prince
I have a first entity MediaAlbum with a @Transient field that holds a List 
of another entity Media.  After querying for a list of MediaAlbum I get an 
exception:

Error in meta-data for 
com.yumyumlabs.foundation.appengine.media.model.Media.id: Cannot have a 
java.lang.Long primary key and be a child object (owning field is 
com.yumyumlabs.foundation.appengine.media.model.MediaAlbum.media).
org.datanucleus.store.appengine.MetaDataValidator$DatastoreMetaDataException: 
Error in meta-data for 
com.yumyumlabs.foundation.appengine.media.model.Media.id: Cannot have a 
java.lang.Long primary key and be a child object (owning field is 
com.yumyumlabs.foundation.appengine.media.model.MediaAlbum.media).
at 
org.datanucleus.store.appengine.MetaDataValidator.checkForIllegalChildField(MetaDataValidator.java:376)

Once this exception has been raised I can no longer persist Media objects, 
as calling persistence manager makePersistent silently fails and the Media 
object I was trying to save does not have an id assigned and does not appear 
to be in the datastore.

If I kill the server and restart, I can continue creating Media objects 
until I again try to list them and get the above exception, and then Media 
cannot be persisted again.

I'm running app engine 1.4.3.  Any ideas?

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



[appengine-java] Re: Integrating Flex/Flash/Silverlight/AJAX/Android with Java classes in GAE

2011-04-07 Thread Mike Lawrence
Mark,
if I write a simple servlet that accepts JSON
it supports any client too, for free with no
external dependencies.

I watched your entire video.
Sorry, not sure I understand your value
proposition.

On Apr 5, 3:45 pm, Mark Piller  wrote:
> Hey guys,
>
> I am not sure what the policy for announcements is on this forum, but I hope
> many of you will find it relevant. I just wanted to let you know that we
> released a version of our software which provides runtime integration
> between various client types and Java classes hosted in GAE. The supported
> client types include Flex, Flash, Silverlight, JavaScript/AJAX, Android,
> Windows Phone and in the very near future iOS. The product enabling the
> integration is called WebORB. It can be plugged into any GAE app. There is a
> video describing the integration at:http://www.youtube.com/watch?v=NSx9oRj5v50
>
> The doc describing the integration is available
> at:http://www.themidnightcoders.com/fileadmin/docs/java/v4/gae_overview.htm
>
> Cheers,
> Mark

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



[appengine-java] Re: Tips/Pitfalls for total newbies?

2011-04-02 Thread Mike Lawrence
Ck out this crash course in getting a java app up from scratch...
http://goo.gl/UT2W3

My personal recommendations:
- plan on spending a week or two learning how the datastore works
before you get started
- if you will ever need the High Replication Datastore, set it up now.
it's a pain to add it later
- wrap all data access in daos
- wrap all gae services in daos
- use slim3 for database access to get around "updating 2 entities in
a single transaction" limitation
- use stripes for the web framework to keep startup times under 3
seconds
- use https for everything  (firesheep is looking for your cookies)
- convert to app engine biz accnt and pay the $9/mnth for 3 always-on
servers. even 3 seconds start-up times make an app unusable for most
folks
- use jquery for minimal layout, do everything else in jsps to
generate jquery content upon form post
- add code to detect when datastore is read-only and handle it with a
custom page (maybe a javascript game, tetris?)
- add a apple-touch-icon.png touch icon so people can save your app to
their phones
- plan for mobile support from day one, ck out jquerymobile.com
- volume test your site using jmeter to see how it will handle massive
traffic spikes
- pay me for not having to learn the hard way like I did :)




On Apr 1, 7:38 am, Drew Spencer  wrote:
> Hi all,
>
> Totally new to this, about to embark on a development for my own business
> and think that GAE is the perfect solution. I basically want to make sure
> that we are making the right choice, and to be informed of any pitfalls
> early on.
>
> Basically the system will be a complete intranet/sales tool based around a
> rather complex pricing engine. I have previous experience using Codeigniter
> + Doctrine, but after tinkering with v2.0 for a while it just seems like it
> is very buggy, and still has many limitations over using Java.
>
> We already use google apps for mail and have a simple intranet built on
> google sites so users will be using their company email account for
> validation.
>
> There are a few key features we need:
>
>    - Small number of users (~100)
>    - Integration with salesforce.com (Using the force.com API?)
>    - Integration with Gmail so that the system can automatically log and
>    send emails, as well as pick them up. (Using IMAP/SMTP?)
>    - Ability to upload and store basic files that can be downloaded by staff
>    (Using docs API, or just datastore?)
>
> If anyone can advise of any things to investigate right now that would be
> really helpful.
>
> I have quite a few years experience programming, and a willing assistant
> with a bit of OO knowledge, other than that I will be learning to use things
> like JDO and JSP for the first time.
>
> All of your input is appreciated.
>
> Drew

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



[appengine-java] Re: Does anyone use cloudcover for running junit tests on appengine?

2011-03-25 Thread Mike Lawrence

this one works really well locally
and on gae
http://code.google.com/p/ktrwjr/

On Mar 22, 5:58 pm, Brendan Doherty 
wrote:
> At Google I/O last year, Max Ross gave an interesting talk on a unit test
> harness that let you run existing test suites in production on Google App
> Engine call cloudcover.
>
>  http://code.google.com/p/cloudcover/
>
> Does anyone use it?  I'd be interested to hear of how well it worked, or any
> problems that people ran into.

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



[appengine-java] Re: New Mac Java Update, Now Dev Server Stops After ACK Running

2011-03-16 Thread Mike Dillon
Thanks I searched and searched before posting, just wasn't using the
right keywords I guess.

On Mar 16, 12:55 pm, Jay Young  wrote:
> https://groups.google.com/forum/#!topic/google-appengine-java/WiImnzV...

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



[appengine-java] Re: New Mac Java Update, Now Dev Server Stops After ACK Running

2011-03-16 Thread Mike Dillon
Thanks, I searched and searched before I posted this. Sorry about
that.

On Mar 16, 12:55 pm, Jay Young  wrote:
> https://groups.google.com/forum/#!topic/google-appengine-java/WiImnzV...

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



[appengine-java] New Mac Java Update, Now Dev Server Stops After ACK Running

2011-03-16 Thread Mike Dillon
My mac just went through series of updates, including a java update.
I used to be able to run my dev appengines perfectly on it. Now after
'ant runserver' and it successfully processes everything I get the
message, "The server is running at http://localhost:"; it then
stops
and ant says BUILD SUCCESSFUL. I can run this exact project on another
machine (another mac minus the java update though). Anyone seen
this / got any ideas? I'd like to change the log reporting level
because
I feel like something isn't getting through.

Thanks,

- Mike

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



[appengine-java] Re: Deleted APP, recover app ID

2011-03-15 Thread Mike Lawrence
http://code.google.com/appengine/kb/general.html

How many applications can I create with Google App Engine?
 You can delete your existing applications via the Admin Console if
you want to create more,
but you will not be able to re-register an application ID.

On Mar 14, 9:41 am, IvanRdz  wrote:
> Hello,
>
> I deleted my app 5 days ago (due to HR datastore migration) and I can
> ´t recover this app id. When I try to register new app with this same
> name in this same account, Google says that this Id is not available.
> I remember a warning saying that there was no problem about the app ID
> if the app is deleted. But I can´t register it.
>
> Can anyone help me please?

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



Re: [appengine-java] java.lang.SecurityException

2011-03-03 Thread Mike Zhou
Toby, by removing the manifest file, the issue is gone. Thanks a lot for the 
help. Mike

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



Re: [appengine-java] java.lang.SecurityException

2011-03-03 Thread Mike Zhou
Toby,

Thanks for the quick response. I will give it a try and let you know how it
goes.

Mike

On Thu, Mar 3, 2011 at 11:15 AM, Toby Reyelts  wrote:

> The jar file containing the class, org.eclipse.emf.ecore.EObject has been
> signed<http://download.oracle.com/javase/tutorial/deployment/jar/signing.html>.
> App Engine doesn't currently support signed jar files. One simple way to
> work around this is to yank the manifest out of the jar.
> (META-INF/MANIFEST.MF)
>
>
> On Wed, Mar 2, 2011 at 11:25 PM, Mike Zhou  wrote:
>
>> Hi,
>>
>> I have an Eclipse EMF based application. It runs well in may AppEngine 
>> Eclipse testing env. However, when it is deployed to the cloud, I get the 
>> following error:
>>
>> Caused by: java.lang.SecurityException: SHA1 digest error for 
>> org/eclipse/emf/ecore/EObject.class
>>
>>  at 
>> com.google.appengine.runtime.Request.process-9015283aec833f7d(Request.java)
>>  at 
>> sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:210)
>>  at java.util.jar.JarVerifier.processEntry(JarVerifier.java:218)
>>  at java.util.jar.JarVerifier.update(JarVerifier.java:205)
>>  at java.util.jar.JarVerifier$VerifierStream.read(JarVerifier.java:428)
>>  at sun.misc.Resource.getBytes(Resource.java:114)
>>  at java.net.URLClassLoader.defineClass(URLClassLoader.java:273)
>>  at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
>>  ... 44 more
>>
>>
>> The same application ran well in previous AppEngine version. It seems that 
>> the AppEngine security control has been changes.
>>
>> Anyone can explain the reason? Also, the difference between AppEngine 
>> Eclipse testing env and the real Java running env in the cloud would be 
>> appreciated.
>>
>> Thanks, Mike
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>

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



[appengine-java] java.lang.SecurityException

2011-03-02 Thread Mike Zhou


Hi,

I have an Eclipse EMF based application. It runs well in may AppEngine Eclipse 
testing env. However, when it is deployed to the cloud, I get the following 
error:

Caused by: java.lang.SecurityException: SHA1 digest error for 
org/eclipse/emf/ecore/EObject.class

at 
com.google.appengine.runtime.Request.process-9015283aec833f7d(Request.java)
at 
sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:210)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:218)
at java.util.jar.JarVerifier.update(JarVerifier.java:205)
at java.util.jar.JarVerifier$VerifierStream.read(JarVerifier.java:428)
at sun.misc.Resource.getBytes(Resource.java:114)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:273)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
... 44 more


The same application ran well in previous AppEngine version. It seems that the 
AppEngine security control has been changes.

Anyone can explain the reason? Also, the difference between AppEngine Eclipse 
testing env and the real Java running env in the cloud would be appreciated.

Thanks, Mike

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



[appengine-java] Re: How to write JPA query that...

2010-12-30 Thread Mike Guo
now i managed to get the answer. thx anyway

-- 
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] How to write JPA query that...

2010-12-30 Thread Mike Guo
@Entity
class A
{
 List bs;
}

@Entity
class B
{
 C c;
}

@Entity
class C
{
 int id;
}

A has a list of Bs.
i want to create a JPA query to fullfill below:
1. get all As, 
2. and the A has one or more B,
3. and the B must has a C
4. and the C's id == the appoint id.

public static List findAsByCid(int cid)
{
}

how to write the JPQL query?
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: [appengine-java] JPA query(JPQL) setFirstResult() and setMaxResult() does not work

2010-12-28 Thread Mike Guo
i'm sorry but what does "RCP" means?

-- 
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] JPA query(JPQL) setFirstResult() and setMaxResult() does not work

2010-12-27 Thread Mike Guo
hi All:
i posted this problem on GWT forum but i think it's better to place here, as 
it has no related to GWT.

see here:
https://groups.google.com/forum/?lnk=gst&q=ClassNotResolvedException#!topic/google-web-toolkit/uEkludbtwpg

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] Re: Best way to approach templating?

2010-12-20 Thread Mike!
hey Jared,

You're pretty much limited to <%...@import> statements when separating
out the JSP into fragments/files...as for templates, have you used
sitemesh before?  That's what I use to do all of my theming...if
you're using Spring or other frameworks, they sometimes have themes
built into them too

Mike!
http://www.thepixlounge.com

On Dec 19, 10:37 am, JaredC  wrote:
> I'm new to the Java App Engine and I've been searching for a way to have a
> general template or theme for my site. I have a header, menu, and side bar
> that will stay the same for all pages, so why not manage it through one
> single jsp file? My thought was to have a jsp:include for the actual content
> of a page. Such as when a user goes to mysite.com/aboutus, the servlet gives
> the template, and the template includes aboutus.jsp. I think I've found you
> can't have dynamic includes though. I tried this:
>
> In the aboutus doGet() :
>             req.setAttribute("page", "aboutus");
>             req.getRequestDispatcher("/template.jsp").include(req, resp);
>
> in the template.jsp:
> .jsp"/>
>
> but always get errors.
>
> Any thoughts on the best practices for templates in GAE/java?

-- 
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: 1.4 eclipse plugin

2010-12-05 Thread Mike
Yeah, I had the same problem and fixed it by making sure that App
Engine SDK 1.4 was First in the Java Build Path -> Order and Export.
And that GWT SDK 2.1.0 was second.

Mike

On Dec 5, 7:28 am, Sudhir  wrote:
> Same issue here... does anyone have a fix that doesn't involve re-
> installing eclipse and recreating the entire project step by step?
>
> Sudhir
>
> On Dec 4, 4:37 pm, GoSharp Lite  wrote:
>
> > I solve my jsp compilation issue by using below steps.
>
> > 1) Download and install "eclipse-java-helios-SR1-win32.zip".
> > 2) Install plugins from "http://dl.google.com/eclipse/plugin/3.6";.
> > 3) Download and install "java_ee_sdk-6u1-jdk-windows.exe".
> > 4) Create a new and empty app using same project name and package as
> > my old app.
> > 5) Carefully copy all files in src and war from my old app into the
> > new app.
> > 6) Import all external libs from my old app into the new app.
> > 7) Set Properties-Google-App Engine-ORM to server files which need
> > enhancement.
> > 8) Debug and no more "Unable to compile class for JSP".
>
> > On Dec 4, 11:47 am, Jerome  wrote:
>
> > > Sorry, no solution but a very similar issue with Eclipse Helios SR 1:
>
> > > org.apache.jasper.JasperException: Unable to compile class for JSP:
>
> > > An error occurred at line: 9 in the generated java file
> > > org.apache.jasper.runtime.HttpJspBase cannot be resolved to a type
>
> > > An error occurred at line: 10 in the generated java file
> > > org.apache.jasper.runtime.JspSourceDependent cannot be resolved to a
> > > type
>
> > > An error occurred at line: 12 in the generated java file
> > > JspFactory cannot be resolved to a type
>
> > > An error occurred at line: 12 in the generated java file
> > > JspFactory cannot be resolved
>
> > > An error occurred at line: 23 in the generated java file
> > > javax.el.ExpressionFactory cannot be resolved to a type
>
> > > An error occurred at line: 24 in the generated java file
> > > org.apache.AnnotationProcessor cannot be resolved to a type
>
> > > An error occurred at line: 31 in the generated java file
> > > _el_expressionfactory cannot be resolved
>
> > > An error occurred at line: 31 in the generated java file
> > > _jspxFactory cannot be resolved
>
> > > An error occurred at line: 31 in the generated java file
> > > The method getServletConfig() is undefined for the type plans_jsp
>
> > > An error occurred at line: 32 in the generated java file
> > > _jsp_annotationprocessor cannot be resolved
>
> > > An error occurred at line: 32 in the generated java file
> > > org.apache.AnnotationProcessor cannot be resolved to a type
>
> > > An error occurred at line: 32 in the generated java file
> > > The method getServletConfig() is undefined for the type plans_jsp
>
> > > An error occurred at line: 32 in the generated java file
> > > org.apache.AnnotationProcessor cannot be resolved to a type
>
> > > An error occurred at line: 38 in the generated java file
> > > HttpServletRequest cannot be resolved to a type
>
> > > An error occurred at line: 38 in the generated java file
> > > HttpServletResponse cannot be resolved to a type
>
> > > An error occurred at line: 39 in the generated java file
> > > ServletException cannot be resolved to a type
>
> > > An error occurred at line: 41 in the generated java file
> > > PageContext cannot be resolved to a type
>
> > > An error occurred at line: 42 in the generated java file
> > > HttpSession cannot be resolved to a type
>
> > > An error occurred at line: 43 in the generated java file
> > > ServletContext cannot be resolved to a type
>
> > > An error occurred at line: 44 in the generated java file
> > > ServletConfig cannot be resolved to a type
>
> > > An error occurred at line: 45 in the generated java file
> > > JspWriter cannot be resolved to a type
>
> > > An error occurred at line: 47 in the generated java file
> > > JspWriter cannot be resolved to a type
>
> > > An error occurred at line: 48 in the generated java file
> > > PageContext cannot be resolved to a type
>
> > > An error occurred at line: 53 in the generated java file
> > > _jspxFactory cannot be resolved
>
> > > An error occurred at line: 1,315 in the generated java file
> > > SkipPageException cannot be resolved to a type
>
> &

Re: [appengine-java] Re: 1.4 eclipse plugin

2010-12-05 Thread Mike Friesen
I had the same problem and fixed it by:

1) Selecting project Root -> Goto File->Properties
2) Select Java Build Path
3) Select Order and Export
4) Move App Engine SDK 1.4.0 to the #1 position and GWT SDK 2.1.0 to the #2
position

On Sun, Dec 5, 2010 at 7:28 AM, Sudhir  wrote:

> Same issue here... does anyone have a fix that doesn't involve re-
> installing eclipse and recreating the entire project step by step?
>
> Sudhir
>
> On Dec 4, 4:37 pm, GoSharp Lite  wrote:
> > I solve my jsp compilation issue by using below steps.
> >
> > 1) Download and install "eclipse-java-helios-SR1-win32.zip".
> > 2) Install plugins from "http://dl.google.com/eclipse/plugin/3.6";.
> > 3) Download and install "java_ee_sdk-6u1-jdk-windows.exe".
> > 4) Create a new and empty app using same project name and package as
> > my old app.
> > 5) Carefully copy all files in src and war from my old app into the
> > new app.
> > 6) Import all external libs from my old app into the new app.
> > 7) Set Properties-Google-App Engine-ORM to server files which need
> > enhancement.
> > 8) Debug and no more "Unable to compile class for JSP".
> >
> > On Dec 4, 11:47 am, Jerome  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Sorry, no solution but a very similar issue with Eclipse Helios SR 1:
> >
> > > org.apache.jasper.JasperException: Unable to compile class for JSP:
> >
> > > An error occurred at line: 9 in the generated java file
> > > org.apache.jasper.runtime.HttpJspBase cannot be resolved to a type
> >
> > > An error occurred at line: 10 in the generated java file
> > > org.apache.jasper.runtime.JspSourceDependent cannot be resolved to a
> > > type
> >
> > > An error occurred at line: 12 in the generated java file
> > > JspFactory cannot be resolved to a type
> >
> > > An error occurred at line: 12 in the generated java file
> > > JspFactory cannot be resolved
> >
> > > An error occurred at line: 23 in the generated java file
> > > javax.el.ExpressionFactory cannot be resolved to a type
> >
> > > An error occurred at line: 24 in the generated java file
> > > org.apache.AnnotationProcessor cannot be resolved to a type
> >
> > > An error occurred at line: 31 in the generated java file
> > > _el_expressionfactory cannot be resolved
> >
> > > An error occurred at line: 31 in the generated java file
> > > _jspxFactory cannot be resolved
> >
> > > An error occurred at line: 31 in the generated java file
> > > The method getServletConfig() is undefined for the type plans_jsp
> >
> > > An error occurred at line: 32 in the generated java file
> > > _jsp_annotationprocessor cannot be resolved
> >
> > > An error occurred at line: 32 in the generated java file
> > > org.apache.AnnotationProcessor cannot be resolved to a type
> >
> > > An error occurred at line: 32 in the generated java file
> > > The method getServletConfig() is undefined for the type plans_jsp
> >
> > > An error occurred at line: 32 in the generated java file
> > > org.apache.AnnotationProcessor cannot be resolved to a type
> >
> > > An error occurred at line: 38 in the generated java file
> > > HttpServletRequest cannot be resolved to a type
> >
> > > An error occurred at line: 38 in the generated java file
> > > HttpServletResponse cannot be resolved to a type
> >
> > > An error occurred at line: 39 in the generated java file
> > > ServletException cannot be resolved to a type
> >
> > > An error occurred at line: 41 in the generated java file
> > > PageContext cannot be resolved to a type
> >
> > > An error occurred at line: 42 in the generated java file
> > > HttpSession cannot be resolved to a type
> >
> > > An error occurred at line: 43 in the generated java file
> > > ServletContext cannot be resolved to a type
> >
> > > An error occurred at line: 44 in the generated java file
> > > ServletConfig cannot be resolved to a type
> >
> > > An error occurred at line: 45 in the generated java file
> > > JspWriter cannot be resolved to a type
> >
> > > An error occurred at line: 47 in the generated java file
> > > JspWriter cannot be resolved to a type
> >
> > > An error occurred at line: 48 in the generated java file
> > > PageContext cannot be resolved to a type
> >
> > > An error occurred at line: 53 in the generated java file
> > > _jspxFactory cannot be resolved
> >
> > > An error occurred at line: 1,315 in the generated java file
> > > SkipPageException cannot be resolved to a type
> >
> > > An error occurred at line: 1,322 in the generated java file
> > > _jspxFactory cannot be resolved
> >
> > > Stacktrace:
> > > at
> > >
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandl
> er.java:
> > > 92)
> > > at
> > >
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:
> > > 330)
> > > at
> > > org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:
> > > 439)
> > > at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
> > > at
> org.apache.jasper.compiler.Compiler.compil

[appengine-java] Re: 1.4 eclipse plugin

2010-12-05 Thread Mike
I fixed this problem by making sure that App Engine SDK 1.4.0 is first
in my Java Build Path in the Order and Export and changing my GWT SDK
to 2.1.0

-- 
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: calling blobstore from inside the webapp

2010-11-30 Thread Mike
Jeremy,

Thanks you for the excellent and detailed post. I think it's the only
available example of how to use the blobstore from within the app.
Let's hope that Google adds more blob APIs, should be pretty
straightforward for them!

all the best,
Michael


On Nov 30, 2:17 am, Jeremy Blythe  wrote:
> Whoops, posted at the same time!! Glad you found my blog post useful.
>
> Jeremy.
>
> On 30 Nov 2010, at 06:00, Mike  wrote:
>
>
>
>
>
>
>
> > Zsombor,
>
> > Follow the implementation outlined in this excellent blog post. It
> > explains how to upload to blobstore from within your app.
>
> > Good luck,
>
> > Michael Weinberg
>
> >http://jeremyblythe.blogspot.com/2010/10/manipulating-images-in-blobs...
>
> > On Nov 28, 8:08 am, Zsombor  wrote:
> >> Hello,
>
> >>  I would like to modify the content of the BlobStore from inside my
> >> webapp. I mean, the user uploads a picture into blobstore, after in
> >> the background the app should create thumbnails, and stores that
> >> thumbnails too in the BlobStore.
> >>  I figured out, that from my 'servlet', I can call
> >> BlobstoreServiceFactory.getBlobstoreService().createUploadUrl("/
> >> internal/uploadBlob/"+id);
> >> and to the acquired URL I can post the content - with proper multi-
> >> part encoding. It works in the development mode, however in the live
> >> system, it always fails with a generic server error message. I'm sure
> >> that my code doesn't gets called - nothing refers to /internal/
> >> uploadBlob/ in the request log. From the response headers, it seems
> >> that the upload server responding :
> >> {server=[Upload Server Built on Nov 11 2010 15:36:58 (1289518618)],
> >> date=[Sun, 28 Nov 2010 12:54:40 GMT], pragma=[no-cache], expires=[Fri,
> >> 01 Jan 1990 00:00:00 GMT], cache-control=[no-cache, no-store, must-
> >> revalidate], content-length=[456], content-type=[text/html], x-google-
> >> cache-control=[remote-fetch], via=[HTTP/1.1 GWA]}
>
> >> Is there anybody, how noticed similar behaviour? Or better, know how
> >> to do it correctly ?
>
> >> BR,
> >>  Zsombor
>
> > --
> > 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: calling blobstore from inside the webapp

2010-11-29 Thread Mike
Zsombor,

Follow the implementation outlined in this excellent blog post. It
explains how to upload to blobstore from within your app.

Good luck,

Michael Weinberg


http://jeremyblythe.blogspot.com/2010/10/manipulating-images-in-blobstore.html


On Nov 28, 8:08 am, Zsombor  wrote:
> Hello,
>
>  I would like to modify the content of the BlobStore from inside my
> webapp. I mean, the user uploads a picture into blobstore, after in
> the background the app should create thumbnails, and stores that
> thumbnails too in the BlobStore.
>  I figured out, that from my 'servlet', I can call
> BlobstoreServiceFactory.getBlobstoreService().createUploadUrl("/
> internal/uploadBlob/"+id);
> and to the acquired URL I can post the content - with proper multi-
> part encoding. It works in the development mode, however in the live
> system, it always fails with a generic server error message. I'm sure
> that my code doesn't gets called - nothing refers to /internal/
> uploadBlob/ in the request log. From the response headers, it seems
> that the upload server responding :
> {server=[Upload Server Built on Nov 11 2010 15:36:58 (1289518618)],
> date=[Sun, 28 Nov 2010 12:54:40 GMT], pragma=[no-cache], expires=[Fri,
> 01 Jan 1990 00:00:00 GMT], cache-control=[no-cache, no-store, must-
> revalidate], content-length=[456], content-type=[text/html], x-google-
> cache-control=[remote-fetch], via=[HTTP/1.1 GWA]}
>
> Is there anybody, how noticed similar behaviour? Or better, know how
> to do it correctly ?
>
> BR,
>  Zsombor

-- 
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: Unable to update app (Error 400)

2010-11-19 Thread Mike
Problem solved!
Super stupid mistake from my site.

On Nov 19, 9:30 am, Mike  wrote:
> Thx for the response,
>
> but when the issue you mentioned appeared I have had the error 500
> message.
> After this was solved, I'm still having the same problem (client error
> - 400).
> Dont know what to do. In the forum I read it can happen if you havent
> received an email which unlocks the account or something like that.
> But i guess this was back in the days, now you guys are doin this by
> sms, right?
> Because I never got a mail and it worked fine in the beginning.
> Do you have another suggestion for me, what it might could be?
>
> Michael
>
> On Nov 18, 5:38 pm, "Ikai Lan (Google)" 
> wrote:
>
> > There was an issue with deploys:
>
> >http://groups.google.com/group/google-appengine-downtime-notify/brows...
>
> > It has since been resolved.
>
> > --
> > Ikai Lan
> > Developer Programs Engineer, Google App Engine
> > Blogger:http://googleappengine.blogspot.com
> > Reddit:http://www.reddit.com/r/appengine
> > Twitter:http://twitter.com/app_engineOnThu, Nov 18, 2010 at 10:05 AM, Mike 
> >  wrote:
> > > Hi,
>
> > > I have problems to deploy my simple hello world app after deploying it
> > > a couple of times and it worked perfectly.
> > > Try to solve the problem on my own first. After reading threw some
> > > similar post within this forum it seems like u only guys can help me
> > > out.
> > > Where is the problem?
> > > -
> > > java.io.IOException: Error posting to URL:
>
> > >https://appengine.google.com/api/appversion/create?app_id=http%3A%2F%...
> > > 400 Bad Request
>
> > > Client Error (400)
> > > The request is invalid for an unspecified reason.
> > > ---
>
> > > thx
> > > mike
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Google App Engine for Java" group.
> > > To post to this group, send email to
> > > google-appengine-j...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-appengine-java+unsubscr...@googlegroups.com
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: Unable to update app (Error 400)

2010-11-19 Thread Mike
Thx for the response,

but when the issue you mentioned appeared I have had the error 500
message.
After this was solved, I'm still having the same problem (client error
- 400).
Dont know what to do. In the forum I read it can happen if you havent
received an email which unlocks the account or something like that.
But i guess this was back in the days, now you guys are doin this by
sms, right?
Because I never got a mail and it worked fine in the beginning.
Do you have another suggestion for me, what it might could be?

Michael

On Nov 18, 5:38 pm, "Ikai Lan (Google)" 
wrote:
> There was an issue with deploys:
>
> http://groups.google.com/group/google-appengine-downtime-notify/brows...
>
> It has since been resolved.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger:http://googleappengine.blogspot.com
> Reddit:http://www.reddit.com/r/appengine
> Twitter:http://twitter.com/app_engineOn Thu, Nov 18, 2010 at 10:05 AM, Mike 
>  wrote:
> > Hi,
>
> > I have problems to deploy my simple hello world app after deploying it
> > a couple of times and it worked perfectly.
> > Try to solve the problem on my own first. After reading threw some
> > similar post within this forum it seems like u only guys can help me
> > out.
> > Where is the problem?
> > -
> > java.io.IOException: Error posting to URL:
>
> >https://appengine.google.com/api/appversion/create?app_id=http%3A%2F%...
> > 400 Bad Request
>
> > Client Error (400)
> > The request is invalid for an unspecified reason.
> > ---
>
> > thx
> > mike
>
> > --
> > 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] Unable to update app (Error 400)

2010-11-18 Thread Mike
Hi,

I have problems to deploy my simple hello world app after deploying it
a couple of times and it worked perfectly.
Try to solve the problem on my own first. After reading threw some
similar post within this forum it seems like u only guys can help me
out.
Where is the problem?
-
java.io.IOException: Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=http%3A%2F%2Fmycabexapmle.appspot.com&version=1&;
400 Bad Request

Client Error (400)
The request is invalid for an unspecified reason.
---

thx
mike

-- 
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] BlobStore & Image Service

2010-11-01 Thread Mike
I know about the new super-fast image serving API for images stored in
the blobstore - it's awesome and greatly simplifies image resizing..

However I still want to resize the original image to a smaller size
before handling it with the image serving API.. So if a user uploads a
5MB Image I want to resize it say to 1000x1000 and then serve using
the Image Service.

My question is how to resize an image from blobstore and put it back
to blobstore after the resize? The resize API returns the modified
image as a byte array, but can somebody provide an example of how to
put that byte array back into the blobstore? I know we are supposed to
POST it to blobstore, but i couldn't get this thing to work - while
handling the POST for original upload, I transform the Image and
supposed to Invoke yet another POST? An working example would be
great!

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] Re: Fwd: BlobstoreService not compatible with HTML5 multiple file upload?

2010-10-23 Thread Mike!
It's my #1 request too, but GAE doesn't support any multiple file
upload...I'm guessing that it's not far off though since the blobstore
interface returns a Map of blobs

Mike!

On Oct 23, 3:55 pm, Dan Dubois  wrote:
> Has anyone figured out a way around this problem yet?
>
> Best wishes,
> Dan
>
> -- Forwarded message --
> From: Dan Dubois 
> Date: Aug 12, 10:41 pm
> Subject: BlobstoreService not compatible with HTML5 multiple file
>
> upload?
> To: Google App Engine for Java
>
> I see this issue has already been raised:http://code.google.com/p/
> googleappengine/issues/detail?id=3351
>
> On Aug 10, 1:12 pm, Dan Dubois  wrote:
>
> > It might be nice for blobstoreService.getUploadedBlobs(req) to return
> > a com.google.common.collect.Multimap but it is
> > probably too late to change that method of the API.
>
> > On Aug 10, 1:06 pm, Dan Dubois  wrote:
>
> > > Dear All,
>
> > > I would like to upload multiple files to my Blobstore using HTML5's
> > > multiple file upload feature.
>
> > > 
>
> > > However, on Safari at least, I imagine each file that is uploaded will
> > > be attributed with the same name "myfiles".
>
> > > Therefore Map blobs =
> > > blobstoreService.getUploadedBlobs(req); does not work as Map keys must
> > > be unique so only one Map.Entry will be in the Map as the others will
> > > get overwritten.
>
> > > I can see on my dev server that all my files are actually uploaded to
> > > the Datastore.
>
> > > Is there a way around this?
>
> > > I guess either Safari hasn't implemented "multiple" of HTML5 properly
> > > or the BlobstoreService API needs to be changed to cater for the new
> > > HTML5 feature...
>
> > > Best wishes,
> > > Dan
>
>

-- 
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: Having Issue with Sitemesh on App engine .

2010-09-28 Thread Mike!
I've got it working in mine too, but I don't use the 
filtering inside the decorator.xml file...What is your specific
error?  Where's your base directory pointing to?  Is it in the WEB-INF
folder?

Mike!

On Sep 28, 12:26 pm, Guillaume Laforge  wrote:
> I've been successfully using SiteMesh 2.4.1 on App Engine.
>
> I'm using the filter definition here:
>
>     
>         sitemesh
>
>  com.opensymphony.sitemesh.webapp.SiteMeshFilter
>     
>
>     
>         sitemesh
>         /*
>     
>
> And I've got a decorator like this:
>
> 
>     
>     
>     
>     
>         /*
>     
> 
>
> And I've got a decorator.jsp file.
>
> Things work fine for me.
>
> Guillaume
>
>
>
> On Tue, Sep 28, 2010 at 15:38, anand  wrote:
> > I tried to incorporate sitemesh in my application and deploy in the
> > AppEngine .Its working properly in the development environment .But
> > not working when uploaded to the cloud .
>
> > Downloaded sitemesh-2.4.2.jar  and added  WEB-INF/lib directory.
>
> > Added the below config in web.xml
>
> > 
> >   sitemesh
> >   
> >     com.opensymphony.module.sitemesh.filter.PageFilter
> >   
> >  
> >  
> >   sitemesh
> >   /*
> >  
>
> > Created a /WAR/WEB-INF/decorators.xml file:
>
> >  
> >  
> >   
> >     /*
> >   
> >  
>
> > Its working in the localhost but not on the cloud .Let me know if you
> > found any issue .
>
> > --
> > 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.
>
> --
> Guillaume Laforge
> Groovy Project Manager
> Head of Groovy Development at SpringSourcehttp://www.springsource.com/g2one

-- 
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: Application Versions and the Datastore

2010-08-09 Thread Mike Dillon

Thanks Pieter, I knew I had read that in the documentation along time
ago but for the life of me I couldn't find it again.


On Aug 9, 10:24 am, Pieter Coucke  wrote:
> All versions of the same app share the same datastore.
>
> http://code.google.com/appengine/docs/java/javadoc/com/google/appengi...
>
> "Although Google App Engine allows many versions of your application to be
> accessible, there is only one datastore for your application, shared by all
> versions. Similarly, the set of indexes is shared by all application
> versions."
>
>
>
> On Mon, Aug 9, 2010 at 4:12 PM, Mike Dillon  wrote:
> > Hi all,
>
> > I was wondering if the different version of the user application code
> > base had its own different datastore as well. We just pushed a new
> > version onto the app engine and need to re-import our data because of
> > some class structure changes. Will the version 1 still keep its
> > datastore while we import the data for version 2?
>
> > Thanks,
>
> > -Mike
>
> > --
> > 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 > 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] Application Versions and the Datastore

2010-08-09 Thread Mike Dillon
Hi all,

I was wondering if the different version of the user application code
base had its own different datastore as well. We just pushed a new
version onto the app engine and need to re-import our data because of
some class structure changes. Will the version 1 still keep its
datastore while we import the data for version 2?

Thanks,

-Mike

-- 
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: Frustrations with Performance

2010-07-08 Thread Mike!
Just a though (haven't done it yet)...could you schedule a task every
random 30-60 seconds, and have that task schedule another task?
(watch out for sync issues?) Have it do some busy work, enough to keep
your VM going?

Mike!

On Jul 8, 5:46 am, "l.denardo"  wrote:
> If you mean sending a request from gthe client, that simply won't
> work.
> During particular days I've seen cold starts logged as near as 10
> seconds between each other for the same user.
> Polling with a shorter period will simply destroy your client as well.
>
> The best thing for these issues is to move on client side most of the
> computation which can be done locally and use GAE for heavier
> background things and persistence.
>
> This is a known issue for low traffic sites (meaning inactive for a
> long period).
> Things seem to be better if you have a low but quite constant traffic,
> but this could be a matter of luck.
> Of course, latency is particularly high if datastore issues are going
> on, and I hope it will be solved with the new architecture.
>
> Regards
> Lorenzo
>
> On Jul 7, 9:35 pm, Baz  wrote:
>
> > For a work-around you can cron a hit to your site every minute to keep it
> > live.
>
> > On Wed, Jul 7, 2010 at 11:01 AM, Jake  wrote:
> > > Hey,
>
> > > Are you getting frequent instance restarts?  Check the log for loading
> > > requests.  This has been known to happen on sites with little-to-no
> > > traffic.
>
> > > Solution?  None, but if this issue is affecting you, star this:
> > >http://code.google.com/p/googleappengine/issues/detail?id=2931
>
> > > Jake
>
> > > On Jul 7, 11:54 am, praseed  wrote:
> > > > Folks,
>
> > > > I hope I have the right audience.
>
> > > > I am an Independent Software Vendor (read: small software business)
> > > > and I have developed a GWT/GAE product.
>
> > > > Things were good during development (plugin et al). I was able to get
> > > > features developed quickly.
>
> > > > However, the application performance these days has been dicey to say
> > > > the least.
>
> > > > A simple click of a button tends to get 5 to 6 seconds to respond at
> > > > times. Dont have any concurrent users right now. The Appspot dashboard
> > > > does not show any issues and I am well below the quota.
>
> > > > I have upgraded to the latest GAE engine.
>
> > > > The App is absolutely horrendous to use due to this. As an ISV, I
> > > > cannot demo this to my prospective customers and I cant "market" the
> > > > cloud availability, Google performance etc.., -- coz that seems to be
> > > > the downfall of my app.
>
> > > > The App performs way better on my laptop. The moment it is deployed,
> > > > it is bloody slow.
>
> > > > I am aware of the current datastore issues at Google. Is that the sole
> > > > reason for this , almost pervasive issue?
>
> > > > Google AppEngine for Business has been announced. Any time tables?
> > > > Will it address these issues?
>
> > > > Can someone address this? How about other developers? Can anyone chime
> > > > in here...
>
> > > > Cheers
> > > > Strawman
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Google App Engine for Java" group.
> > > To post to this group, send email to
> > > google-appengine-j...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-appengine-java+unsubscr...@googlegroups.com
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: Java Heap Space Error, Correct Increasing Method?

2010-06-28 Thread Mike Dillon
Thanks Toby, I had figured this out before you replied but didn't
refresh the page before I posted my solution. I appreciate the help!

On Jun 28, 3:59 pm, Toby Reyelts  wrote:
> You need to supply --jvm_flag as a command-line argument to dev_appserver.sh
> (aka KickStart), not to java.exe. That should work the same way for the ant,
>  task. (You can see this in config/user/ant-macros.xml).
>
>
>
> On Mon, Jun 28, 2010 at 3:51 PM, Mike Dillon  wrote:
> > Another thing to consider. I'm not using eclipse, and I'm building and
> > running the server with 'ant runserver'. I just realized that ant
> > isn't calling
> > dev_appserver.sh so I haven't been executing those args at all. When I
> > use dev_appserver.sh to run my server it chokes on --jvm_flag but will
> > run with just the -Xmx, however that has no affect.
>
> > - Mike
>
> > On Jun 28, 2:47 pm, Mike Dillon  wrote:
> > > Thanks,
>
> > > Yes that is exactly whats going on, the linux box has 4gb of ram, my
> > > mac has 2gb...
>
> > > And yes I tried the --jvm_flag=-Xmx512m on my mac with no success.
>
> > > - Mike
>
> > > On Jun 28, 2:42 pm, Don Schwarz  wrote:
>
> > > > Have you tried --jvm_flag=-Xmxm on your Mac?  It should work
> > there
> > > > too.
>
> > > > As for the Linux box, the default heap size is different depending on
> > > > whether you have a "server-class" machine or not, so it is possible
> > that you
> > > > are seeing a much higher default heap size just by virtue of using a
> > machine
> > > > with more RAM or more processors.
>
> > > > The -Xmx setting you added to dev_appserver.sh has no effect.  Your
> > code is
> > > > executed in a subprocess, which is why --jvm_flag must be used to pass
> > Java
> > > > args through to this process.
>
> > > > On Mon, Jun 28, 2010 at 6:38 PM, Mike Dillon 
> > wrote:
> > > > > Thanks Don,
>
> > > > > I forgot to mention that I'm using a mac with the latest snow leopard
> > > > > update. It seems that these heap space
> > > > > commands are incorrect for my machine, because we just tested it on a
> > > > > linux box and it works fine, even
> > > > > without the --jvm_flag prefix.
>
> > > > > Any ideas?
>
> > > > > - Mike
>
> > > > > On Jun 28, 1:18 pm, Don Schwarz  wrote:
> > > > > > I believe you want the following flag:
>
> > > > > > --jvm_flag=-Xmx512m
>
> > > > > > On Sun, Jun 27, 2010 at 3:13 PM, Mike Dillon <
> > mikedillo...@gmail.com>
> > > > > wrote:
> > > > > > > Hello all,
>
> > > > > > > Im working on a project that reads GTFS archives as part of its
> > > > > > > functionality. When we are importing
> > > > > > > a particular set of data that has ~60,000 entries my dev server
> > locks
> > > > > > > up around the 27,000 entry. The
> > > > > > > error is the java heap space error. I would like to know if
> > anyone has
> > > > > > > successfully upped their heap
> > > > > > > space. I searched, and found general instructions but after
> > > > > > > implementing them I'm still failing around
> > > > > > > the same entry. This is leading me to believe that my command
> > line
> > > > > > > args are not taking affect. Here
> > > > > > > is what I have so far:
>
> > > > > > > appengine-sdk-java/bin/dev_appserver.sh:
> > > > > > > #!/bin/bash
> > > > > > > # Launches the development AppServer
> > > > > > > [ -z "${DEBUG}" ] || set -x  # trace if $DEBUG env. var. is
> > non-zero
> > > > > > > SDK_BIN=`dirname $0 | sed -e "s#^\\([^/]\\)#${PWD}/\\1#"` # sed
> > makes
> > > > > > > absolute
> > > > > > > SDK_LIB=$SDK_BIN/../lib
> > > > > > > SDK_CONFIG=$SDK_BIN/../config/sdk
> > > > > > > java -Xms1024m -Xmx1024m -ea -cp
> >  "$SDK_LIB/appengine-tools-api.jar" \
> > > > > > >  com.google.appengine.tools.KickStart \
> > > > > > >  com.google.appengine.tools.development.DevAppServerMain $*
>
> > > > > > > Is this correct?

[appengine-java] Re: Java Heap Space Error, Correct Increasing Method?

2010-06-28 Thread Mike Dillon
Solved!

Okay here is a quick format for how to increase your java heap space:

If you are running your dev server by running ./dev_appserver.sh  then do this:
#!/bin/bash
# Launches the development AppServer
[ -z "${DEBUG}" ] || set -x  # trace if $DEBUG env. var. is non-zero
SDK_BIN=`dirname $0 | sed -e "s#^\\([^/]\\)#${PWD}/\\1#"` # sed makes
absolute
SDK_LIB=$SDK_BIN/../lib
SDK_CONFIG=$SDK_BIN/../config/sdk
java -ea -cp  "$SDK_LIB/appengine-tools-api.jar" \
  com.google.appengine.tools.KickStart \
  com.google.appengine.tools.development.DevAppServerMain --jvm_flag=-
Xmx $*

*** Notice where the --jvm_flag is !

If you are using ant runserver then you need to edit appengine-sdk-
java/config/user/ang-macros.xml :
Find this, and add an arg value:
 







  







  

  


Thanks for the help Don.

- Mike

On Jun 28, 3:51 pm, Mike Dillon  wrote:
> Another thing to consider. I'm not using eclipse, and I'm building and
> running the server with 'ant runserver'. I just realized that ant
> isn't calling
> dev_appserver.sh so I haven't been executing those args at all. When I
> use dev_appserver.sh to run my server it chokes on --jvm_flag but will
> run with just the -Xmx, however that has no affect.
>
> - Mike
>
> On Jun 28, 2:47 pm, Mike Dillon  wrote:
>
>
>
> > Thanks,
>
> > Yes that is exactly whats going on, the linux box has 4gb of ram, my
> > mac has 2gb...
>
> > And yes I tried the --jvm_flag=-Xmx512m on my mac with no success.
>
> > - Mike
>
> > On Jun 28, 2:42 pm, Don Schwarz  wrote:
>
> > > Have you tried --jvm_flag=-Xmxm on your Mac?  It should work 
> > > there
> > > too.
>
> > > As for the Linux box, the default heap size is different depending on
> > > whether you have a "server-class" machine or not, so it is possible that 
> > > you
> > > are seeing a much higher default heap size just by virtue of using a 
> > > machine
> > > with more RAM or more processors.
>
> > > The -Xmx setting you added to dev_appserver.sh has no effect.  Your code 
> > > is
> > > executed in a subprocess, which is why --jvm_flag must be used to pass 
> > > Java
> > > args through to this process.
>
> > > On Mon, Jun 28, 2010 at 6:38 PM, Mike Dillon  
> > > wrote:
> > > > Thanks Don,
>
> > > > I forgot to mention that I'm using a mac with the latest snow leopard
> > > > update. It seems that these heap space
> > > > commands are incorrect for my machine, because we just tested it on a
> > > > linux box and it works fine, even
> > > > without the --jvm_flag prefix.
>
> > > > Any ideas?
>
> > > > - Mike
>
> > > > On Jun 28, 1:18 pm, Don Schwarz  wrote:
> > > > > I believe you want the following flag:
>
> > > > > --jvm_flag=-Xmx512m
>
> > > > > On Sun, Jun 27, 2010 at 3:13 PM, Mike Dillon 
> > > > wrote:
> > > > > > Hello all,
>
> > > > > > Im working on a project that reads GTFS archives as part of its
> > > > > > functionality. When we are importing
> > > > > > a particular set of data that has ~60,000 entries my dev server 
> > > > > > locks
> > > > > > up around the 27,000 entry. The
> > > > > > error is the java heap space error. I would like to know if anyone 
> > > > > > has
> > > > > > successfully upped their heap
> > > > > > space. I searched, and found general instructions but after
> > > > > > implementing them I'm still failing around
> > > > > > the same entry. This is leading me to believe that my command line
> > > > > > args are not taking affect. Here
> > > > > > is what I have so far:
>
> > > > > > appengine-sdk-java/bin/dev_appserver.sh:
> > > > > > #!/bin/bash
> > > > > > # Launches the development AppServer
> > > > > > [ -z "${DEBUG}" ] || set -x  # trace if $DEBUG env. var. is non-zero
> > > > > > SDK_BIN=`dirname $0 | sed -e "s#^\\([^/]\\)#${PWD}/\\1#"` # sed 
> > > > > > makes
> > > > > > absolute
> > > > > > SDK_LIB=$SDK_BIN/../lib
> > > > > > SDK_CONFIG=$SDK_BIN/../config/sdk
> > > > > > java -Xms1024m -Xmx1024m -ea -cp  
> > > > 

[appengine-java] Re: Java Heap Space Error, Correct Increasing Method?

2010-06-28 Thread Mike Dillon
Another thing to consider. I'm not using eclipse, and I'm building and
running the server with 'ant runserver'. I just realized that ant
isn't calling
dev_appserver.sh so I haven't been executing those args at all. When I
use dev_appserver.sh to run my server it chokes on --jvm_flag but will
run with just the -Xmx, however that has no affect.

- Mike

On Jun 28, 2:47 pm, Mike Dillon  wrote:
> Thanks,
>
> Yes that is exactly whats going on, the linux box has 4gb of ram, my
> mac has 2gb...
>
> And yes I tried the --jvm_flag=-Xmx512m on my mac with no success.
>
> - Mike
>
> On Jun 28, 2:42 pm, Don Schwarz  wrote:
>
>
>
> > Have you tried --jvm_flag=-Xmxm on your Mac?  It should work there
> > too.
>
> > As for the Linux box, the default heap size is different depending on
> > whether you have a "server-class" machine or not, so it is possible that you
> > are seeing a much higher default heap size just by virtue of using a machine
> > with more RAM or more processors.
>
> > The -Xmx setting you added to dev_appserver.sh has no effect.  Your code is
> > executed in a subprocess, which is why --jvm_flag must be used to pass Java
> > args through to this process.
>
> > On Mon, Jun 28, 2010 at 6:38 PM, Mike Dillon  wrote:
> > > Thanks Don,
>
> > > I forgot to mention that I'm using a mac with the latest snow leopard
> > > update. It seems that these heap space
> > > commands are incorrect for my machine, because we just tested it on a
> > > linux box and it works fine, even
> > > without the --jvm_flag prefix.
>
> > > Any ideas?
>
> > > - Mike
>
> > > On Jun 28, 1:18 pm, Don Schwarz  wrote:
> > > > I believe you want the following flag:
>
> > > > --jvm_flag=-Xmx512m
>
> > > > On Sun, Jun 27, 2010 at 3:13 PM, Mike Dillon 
> > > wrote:
> > > > > Hello all,
>
> > > > > Im working on a project that reads GTFS archives as part of its
> > > > > functionality. When we are importing
> > > > > a particular set of data that has ~60,000 entries my dev server locks
> > > > > up around the 27,000 entry. The
> > > > > error is the java heap space error. I would like to know if anyone has
> > > > > successfully upped their heap
> > > > > space. I searched, and found general instructions but after
> > > > > implementing them I'm still failing around
> > > > > the same entry. This is leading me to believe that my command line
> > > > > args are not taking affect. Here
> > > > > is what I have so far:
>
> > > > > appengine-sdk-java/bin/dev_appserver.sh:
> > > > > #!/bin/bash
> > > > > # Launches the development AppServer
> > > > > [ -z "${DEBUG}" ] || set -x  # trace if $DEBUG env. var. is non-zero
> > > > > SDK_BIN=`dirname $0 | sed -e "s#^\\([^/]\\)#${PWD}/\\1#"` # sed makes
> > > > > absolute
> > > > > SDK_LIB=$SDK_BIN/../lib
> > > > > SDK_CONFIG=$SDK_BIN/../config/sdk
> > > > > java -Xms1024m -Xmx1024m -ea -cp  "$SDK_LIB/appengine-tools-api.jar" \
> > > > >  com.google.appengine.tools.KickStart \
> > > > >  com.google.appengine.tools.development.DevAppServerMain $*
>
> > > > > Is this correct?
>
> > > > > Also the way we get our data is through a custom import function that
> > > > > chunks the data into groups of 20
> > > > > and then processes them and stores them into the datastore.  We are
> > > > > only using one instance of the
> > > > > persistance manager as per the recommendations to use a singleton
> > > > > class. Each batch hits a servlet on
> > > > > our app and then does its work. Should we close the persistence
> > > > > manager after every batch is completed?
> > > > > I'm wondering if this would be a memory leak.
>
> > > > I believe our documentation recommends storing the
> > > PersistenceManagerFactory
> > > > as a singleton, but using a new PersistenceManager each time 
> > > > (remembering
> > > to
> > > > close it before discarding).
>
> > > > However, the local implementation of the datastore does keep everything
> > > in
> > > > memory (and simply flushes to disk periodically), so you will run into
> > > size
> > > > issues at some point.
>
> > > --
> > > 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 > >  unsubscr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: Java Heap Space Error, Correct Increasing Method?

2010-06-28 Thread Mike Dillon
Thanks,

Yes that is exactly whats going on, the linux box has 4gb of ram, my
mac has 2gb...

And yes I tried the --jvm_flag=-Xmx512m on my mac with no success.

- Mike


On Jun 28, 2:42 pm, Don Schwarz  wrote:
> Have you tried --jvm_flag=-Xmxm on your Mac?  It should work there
> too.
>
> As for the Linux box, the default heap size is different depending on
> whether you have a "server-class" machine or not, so it is possible that you
> are seeing a much higher default heap size just by virtue of using a machine
> with more RAM or more processors.
>
> The -Xmx setting you added to dev_appserver.sh has no effect.  Your code is
> executed in a subprocess, which is why --jvm_flag must be used to pass Java
> args through to this process.
>
>
>
> On Mon, Jun 28, 2010 at 6:38 PM, Mike Dillon  wrote:
> > Thanks Don,
>
> > I forgot to mention that I'm using a mac with the latest snow leopard
> > update. It seems that these heap space
> > commands are incorrect for my machine, because we just tested it on a
> > linux box and it works fine, even
> > without the --jvm_flag prefix.
>
> > Any ideas?
>
> > - Mike
>
> > On Jun 28, 1:18 pm, Don Schwarz  wrote:
> > > I believe you want the following flag:
>
> > > --jvm_flag=-Xmx512m
>
> > > On Sun, Jun 27, 2010 at 3:13 PM, Mike Dillon 
> > wrote:
> > > > Hello all,
>
> > > > Im working on a project that reads GTFS archives as part of its
> > > > functionality. When we are importing
> > > > a particular set of data that has ~60,000 entries my dev server locks
> > > > up around the 27,000 entry. The
> > > > error is the java heap space error. I would like to know if anyone has
> > > > successfully upped their heap
> > > > space. I searched, and found general instructions but after
> > > > implementing them I'm still failing around
> > > > the same entry. This is leading me to believe that my command line
> > > > args are not taking affect. Here
> > > > is what I have so far:
>
> > > > appengine-sdk-java/bin/dev_appserver.sh:
> > > > #!/bin/bash
> > > > # Launches the development AppServer
> > > > [ -z "${DEBUG}" ] || set -x  # trace if $DEBUG env. var. is non-zero
> > > > SDK_BIN=`dirname $0 | sed -e "s#^\\([^/]\\)#${PWD}/\\1#"` # sed makes
> > > > absolute
> > > > SDK_LIB=$SDK_BIN/../lib
> > > > SDK_CONFIG=$SDK_BIN/../config/sdk
> > > > java -Xms1024m -Xmx1024m -ea -cp  "$SDK_LIB/appengine-tools-api.jar" \
> > > >  com.google.appengine.tools.KickStart \
> > > >  com.google.appengine.tools.development.DevAppServerMain $*
>
> > > > Is this correct?
>
> > > > Also the way we get our data is through a custom import function that
> > > > chunks the data into groups of 20
> > > > and then processes them and stores them into the datastore.  We are
> > > > only using one instance of the
> > > > persistance manager as per the recommendations to use a singleton
> > > > class. Each batch hits a servlet on
> > > > our app and then does its work. Should we close the persistence
> > > > manager after every batch is completed?
> > > > I'm wondering if this would be a memory leak.
>
> > > I believe our documentation recommends storing the
> > PersistenceManagerFactory
> > > as a singleton, but using a new PersistenceManager each time (remembering
> > to
> > > close it before discarding).
>
> > > However, the local implementation of the datastore does keep everything
> > in
> > > memory (and simply flushes to disk periodically), so you will run into
> > size
> > > issues at some point.
>
> > --
> > 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 > unsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: Java Heap Space Error, Correct Increasing Method?

2010-06-28 Thread Mike Dillon
Thanks Don,

I forgot to mention that I'm using a mac with the latest snow leopard
update. It seems that these heap space
commands are incorrect for my machine, because we just tested it on a
linux box and it works fine, even
without the --jvm_flag prefix.

Any ideas?

- Mike

On Jun 28, 1:18 pm, Don Schwarz  wrote:
> I believe you want the following flag:
>
> --jvm_flag=-Xmx512m
>
>
>
>
>
> On Sun, Jun 27, 2010 at 3:13 PM, Mike Dillon  wrote:
> > Hello all,
>
> > Im working on a project that reads GTFS archives as part of its
> > functionality. When we are importing
> > a particular set of data that has ~60,000 entries my dev server locks
> > up around the 27,000 entry. The
> > error is the java heap space error. I would like to know if anyone has
> > successfully upped their heap
> > space. I searched, and found general instructions but after
> > implementing them I'm still failing around
> > the same entry. This is leading me to believe that my command line
> > args are not taking affect. Here
> > is what I have so far:
>
> > appengine-sdk-java/bin/dev_appserver.sh:
> > #!/bin/bash
> > # Launches the development AppServer
> > [ -z "${DEBUG}" ] || set -x  # trace if $DEBUG env. var. is non-zero
> > SDK_BIN=`dirname $0 | sed -e "s#^\\([^/]\\)#${PWD}/\\1#"` # sed makes
> > absolute
> > SDK_LIB=$SDK_BIN/../lib
> > SDK_CONFIG=$SDK_BIN/../config/sdk
> > java -Xms1024m -Xmx1024m -ea -cp  "$SDK_LIB/appengine-tools-api.jar" \
> >  com.google.appengine.tools.KickStart \
> >  com.google.appengine.tools.development.DevAppServerMain $*
>
> > Is this correct?
>
> > Also the way we get our data is through a custom import function that
> > chunks the data into groups of 20
> > and then processes them and stores them into the datastore.  We are
> > only using one instance of the
> > persistance manager as per the recommendations to use a singleton
> > class. Each batch hits a servlet on
> > our app and then does its work. Should we close the persistence
> > manager after every batch is completed?
> > I'm wondering if this would be a memory leak.
>
> I believe our documentation recommends storing the PersistenceManagerFactory
> as a singleton, but using a new PersistenceManager each time (remembering to
> close it before discarding).
>
> However, the local implementation of the datastore does keep everything in
> memory (and simply flushes to disk periodically), so you will run into size
> issues at some point.

-- 
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] Java Heap Space Error, Correct Increasing Method?

2010-06-28 Thread Mike Dillon
Hello all,

Im working on a project that reads GTFS archives as part of its
functionality. When we are importing
a particular set of data that has ~60,000 entries my dev server locks
up around the 27,000 entry. The
error is the java heap space error. I would like to know if anyone has
successfully upped their heap
space. I searched, and found general instructions but after
implementing them I'm still failing around
the same entry. This is leading me to believe that my command line
args are not taking affect. Here
is what I have so far:

appengine-sdk-java/bin/dev_appserver.sh:
#!/bin/bash
# Launches the development AppServer
[ -z "${DEBUG}" ] || set -x  # trace if $DEBUG env. var. is non-zero
SDK_BIN=`dirname $0 | sed -e "s#^\\([^/]\\)#${PWD}/\\1#"` # sed makes
absolute
SDK_LIB=$SDK_BIN/../lib
SDK_CONFIG=$SDK_BIN/../config/sdk
java -Xms1024m -Xmx1024m -ea -cp  "$SDK_LIB/appengine-tools-api.jar" \
  com.google.appengine.tools.KickStart \
  com.google.appengine.tools.development.DevAppServerMain $*

Is this correct?

Also the way we get our data is through a custom import function that
chunks the data into groups of 20
and then processes them and stores them into the datastore.  We are
only using one instance of the
persistance manager as per the recommendations to use a singleton
class. Each batch hits a servlet on
our app and then does its work. Should we close the persistence
manager after every batch is completed?
I'm wondering if this would be a memory leak.

Thanks,

-Mike

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



[appengine-java] Re: Any ETA for a backup/restore facility?

2010-06-28 Thread Mike Dillon
Mscwd01,

I'm not a google employee, but I have had success backing up our
datastore and then restoring our datastore with
the bulkloader utility. Currently the bulkloader is in the python sdk,
so all you need to do is download that and then
youll be able to do backups and restore from those backups.  Check out
the literature on the app engine, and try
a couple searches to get your bearings.  Nick Johnson has commented or
written every search result that comes
back when I was researching this a couple of weeks back, and there is
also an  I/O video on the bulkloader.

Make sure you read some of the fine print, i.e. one caveat is that you
must have had your datastore populated for
at least 12 hours which is the amount of time it takes for the
statistics info to be built. That what the bulkloader
works off of to do its datastore dump.

- Mike

On Jun 28, 7:16 am, mscwd01  wrote:
> Hey Google Employees,
>
> There has been a backup/restore facility on the roadmap for a while
> now. Can you let us know if and when we may get an in-built tool that
> will allow us to easily save the contents of the datastore to our
> local machines and restore it if needs be?
>
> In the meantime, what is the preferred solution to backup/restore our
> Java based apps?
>
> 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] Re: AppEngine session advice

2010-05-27 Thread Mike
It might be helpful to see the entire trace for a series of runs.

Is the app only slow after a period of not being used?  If so, have
you looked into the possibility that the app is being swapped out, and
so the JVM is being re-created and spun up for the next call?

On May 27, 4:20 am, Ice13ill  wrote:
> Well, for me it's kinda strange, because i think i don't really
> understand what's going on...
> Let's say I want to get all my documents using gdata for docs list
> (just an example). So, first I call getUserCredentials() (which makes
> a query to datastore to get parameters: 31 ms) then an url_fetch (for
> gdata: 50ms) and then another query to get other docs from datastore
> (40ms) (app stats).
> What i don't understand is this:
>  - first query is made after about 2500 ms
>  - between first call (first datastore query) and the second call (url
> fetch) there are about 900 ms, 500ms between second and third
>  - RPC total: 121 ms (sum of those 3 calls), Grand total : 4000 ms
>
> I don't understand those large gaps. Am I reading it wrong ?
>
> So I don't think the call to UserServiceFactory.getUserService() is
> long taking... It's like the my session enters a sleep state if i
> don't use the app for about 2-3 minutes (can this be related to
>  ?).
>
> On May 26, 11:36 pm, Mike  wrote:
>
>
>
> > Some questions:
>
> > 1) Did you run the server trace on your code to see what was slow?
>
> > 2) One idea -- rather than calling UserServiceFactory.getUserService()
> > every time in the servlet -- why not hang onto that in the Servlet
> > (say, by doing that once in the constructor) and using it over and
> > over (so long as the Servlet is long-lived, all subsequent calls will
> > be much faster).
>
> > 3) What have you tried, and what are you seeing?
>
> > Cheers
> > Mike
>
> > On May 25, 5:18 am, Ice13ill  wrote:
>
> > > I'm building an app that uses Google account auth.
> > > The application also uses a custom persistent entity (UserProfile) for
> > > users that are registered (so basically there are functionalities that
> > > can be used for free and others by registering).
> > > At the beginning, the app was simple, so at every request the user was
> > > checked by calling .getUserService().getCurrentUser() (including at
> > > first login obviously). But it seams that a call to that method can
> > > sometimes take about 3-5 seconds and also, clearly it is not he best
> > > way.
> > > So I need some advice implementing the session part, using what is
> > > described in the appengine documentation (session-enable + memcache +
> > > etc) . It does'n seem hard, but I know that some hints&tips could help
> > > me at the beginning.
> > > 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 
> > > 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: How to use com.google.appengine.api.datastore.Text ?

2010-05-26 Thread Mike
Here's the page specifically for the Text object:
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Text.html

As you can see in that documentation (as Pieter demonstrated) -- Text
wraps a string (String) and does so via its constructor (rather than
via some set method).

Cheers
Mike

-- 
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: AppEngine session advice

2010-05-26 Thread Mike
Some questions:

1) Did you run the server trace on your code to see what was slow?

2) One idea -- rather than calling UserServiceFactory.getUserService()
every time in the servlet -- why not hang onto that in the Servlet
(say, by doing that once in the constructor) and using it over and
over (so long as the Servlet is long-lived, all subsequent calls will
be much faster).

3) What have you tried, and what are you seeing?

Cheers
Mike

On May 25, 5:18 am, Ice13ill  wrote:
> I'm building an app that uses Google account auth.
> The application also uses a custom persistent entity (UserProfile) for
> users that are registered (so basically there are functionalities that
> can be used for free and others by registering).
> At the beginning, the app was simple, so at every request the user was
> checked by calling .getUserService().getCurrentUser() (including at
> first login obviously). But it seams that a call to that method can
> sometimes take about 3-5 seconds and also, clearly it is not he best
> way.
> So I need some advice implementing the session part, using what is
> described in the appengine documentation (session-enable + memcache +
> etc) . It does'n seem hard, but I know that some hints&tips could help
> me at the beginning.
> 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 
> 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: How to organize your server code

2010-05-24 Thread Mike
Actually, I would recommend the following syntax instead:

public MyServlet {

private OtherServlet otherServlet

@Inject
public MyServlet(OtherServlet otherServlet) {
this.otherServelt = otherServlet;
}

// ...

}

Its ok to do the field injection, but the constructor injection is
recommended (I thought) over field injection, and is negligibly more
code...

On May 24, 1:04 am, Tristan  wrote:
> Here's how you'd do it using Guice on the server:
>
> public MyServlet {
>
>   @Inject
>   OtherServlet otherServlet;
>
>   public void someMethod(){
>     otherServlet.doSomething();
>     ...
>   }
>
> }

-- 
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: Best method to set up nested classes in Objectify

2010-05-24 Thread Mike
I'm not an expert, but I believe I understand Objectify (and -- you
could post the query on their group as well, the owner is very
responsive and helpful).

The structure would more accurately have been described as:

@Entity
public class A {

private Long id;

@Embeded
private B child;

}

I don't know how big A & B are, and I don't know why you're trying to
conserve bandwidth -- but your #3 should work (but, requires an extra
trip to get an B associated with an A.

There's also a couple of ways of achieving it.  You could either
associate each B to an A by having a Key in each B; or you could
have a Key in each A.

I prefer this layout:


@Entity
public class A {

private Long id;

// Whatever else is in here
}

@Entity
public class B {

private Long id;

private Key parent;
}

Your concerns about "dangling" relationships are concerns about the
GAE Datastore and its capabilities -- not about Objectify.  The GAE
requires that all logic to ensure these valid states must be
implemented in the application layer (its not a SQL DB).  If you're
really worried about that type of consistency, then using the B
embedded in A is the way to go.

Also -- its not true that you can't send less data to the client with
the A contains @Embedded B -- it just means that you would have to
create (and use) some sort of DTO that contained only the data that
you wanted to send to the client, and using that technique is likely
the simplest way for you to achieve your goals (I think).

Cheers
Mike

-- 
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] Help running without a ContextPath

2010-05-23 Thread Mike!
Hey all,

I'm using Spring 3 with full annotations for my controllers and can
not figure out how to get rid of my context root other than using
urlrewrite.  The problem with urlrewrite is that I still need to
maintain an xml document so I can "find" my controller and methods
with their request path.  In my web.xml file, I also must have the
context path as my servlet-mapper value and can not use "/*".  When
I've tried "/*", I can not resolve my JSP views being returned back by
my methods.

Any help would be greatly appreciated!


Mike!

-- 
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: GAE Guestbook example differing behavior between Chrome and Firefox

2010-02-26 Thread Mike
> Have you ruled out cache issues?

Thanks.

It appears that it was a caching problem (on the browser I guess).
The expected behavior is delivered to each browser now.

Thanks for the tips, apologies for not sorting it out myself.

Cheers
Mike Sheridan

-- 
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] createLoginURL() and Sing-up behavior when running locally under Eclipse debugger?

2010-02-26 Thread Mike
Hi,

In following along with the example/tutorial from:
http://code.google.com/appengine/docs/java/gettingstarted/usingusers.html

The page states that calls to:
com.google.appengine.api.users.UserService.createLoginURL()

with an email/username that does not have a google account (even when
running under Eclipse) will redirect to what appears to be a Google
Accounts sign-up page.

However, I am unable to trigger that behavior, no matter what text I
provide to that control.

Any suggestions?  Is this a bug or a misprint (or even, a
misunderstanding on my part)?

Cheers
Mike Sheridan

-- 
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: GAE Guestbook example differing behavior between Chrome and Firefox

2010-02-26 Thread Mike
On Feb 26, 12:13 pm, "Ikai L (Google)"  wrote:
> Are you using GWT? Try disabling that. This could be related to that, though 
> I'm not sure off the top of my head.

I had made that mistake the first time, but for this example, I made
sure that I did not select GWT when I created the project.

> You might also want to check on the GWT groups if you intend on moving 
> forward with it as your front end.
>
> http://groups.google.com/group/Google-Web-Toolkit

Thanks.  I haven't made that determination yet.  Still learning what's
available and what each library/toolkit/etc provides.

I just took a peek at the GWT homepage, and I will probably move to
that at some point.  But, want to learn from the ground up, and go
through these steps as well.

Cheers
Mike

-- 
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] GAE Guestbook example differing behavior between Chrome and Firefox

2010-02-26 Thread Mike
Hello all,

Gave the Guestbook example a shot, and found that I get different
behavior when accessing it (locally, debug web server from Eclipse) --
is this expected?

If I point Chrome to http://localhost:/guestbook -- I get Hello
world! (great).  Same happens in Firefox.

However, if I point Chrome to  http://localhost:, then I get
(rendered):

Web Application Starter Project

Please enter your name:

But Firefox will render what I believe was expected, and is this:

Hello App Engine!
Available Servlets:
Guestbook

So, I checked out the source that was delivered to each browser, and
it was indeed different.

Firefox is getting this delivered:










  

Hello App Engine
  

  
Hello App Engine!


  
Available Servlets:
  
  
Guestbook

  

  



Whereas Chrome is getting this delivered:









  










Web Application Starter Project







  

  
  
  
  
  
  






  
Your web browser must have JavaScript enabled
in order for this application to display correctly.
  


Web Application Starter Project


  
Please enter your
name:
  
  


  
  

  

  




Would appreciate a helpful nudge in the right direction (still getting
up to speed a bit here)...

Cheers
Mike

-- 
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] Getting the updated Key for child entity after calling pm.makePersistent(childEntity)

2010-01-01 Thread Mike
Hi,

I have two entities - Parent and Child, the relationship is "mapped"
using the mappedBy annotations.

Both entities are using Key type as the pk, which is manually
generated during the instantiation of the object.

When the PK is generated for the Child, parent information in the
child key is omitted because both parent and child are not yet
persisted. However, after persisting the parent and then the child.
The child's key changed because parent key information is appended to
the child's key, and currently I could not find a way to retrieve the
updated key without additional queries after pm.makePersistent
(childEntity) is called.

Now this is my question. How do I retrieve the updated Key? I have
tried pm.detachCopy(childEntity) with no result. Could someone please
give me some advice? Do I need to manually append parent key with
KeyFactory.Builder? If so, I do I achieve it with the Key type?

Thanks in advance

Michael

--

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: Scope of datastores -- accessible across multiple GAE applications?

2009-12-27 Thread mike s
Merry Christmas.

Surely an important use of cloud computing is creating services that
can be shared?

So why not implement your "harvester" with an API that allows other
apps, including your own, to read the database?  i.e. other
applications connect to your datastore through your application rather
than some other magic.   Wouldn't that be safer anyway?

Michael

On Dec 25, 4:46 am, Riyad  wrote:
> bump
>
> On Dec 23, 9:50 pm, Riyad  wrote:> What is the 
> definedscopeof a datastore as used by your JDO/JPA code
> > in a Java application deployed on GAE? Can you only insert/retrieve
> > data for a pre-defined datastore associated with your running app, or
> > can you connect to another application's datastore and insert/retrieve
> > data from that data store as well?
>
> > Example:
>
> > Consider a very large data-mining application written and deployed on
> > GAE as separate applications:
>
> > 1. Harvester -- application scrubs the web all day long looking for
> > information and inserting it into it's data store. Lots of the new
> > experiemntal Task API used here.
>
> > 2. Website -- website used by customers to search the compiled data,
> > create accounts, and do other compelling things with it -- like rank
> > it. This would be reading/updating data from App #1's datastore.
>
> > 3. Admin -- website used by admins to manually modify the information
> > in the system -- again, manipulating the data from App #1's datastore.
>
> > Is this possible? Or would I just have to model this entire
> > application as a single huge GAE application in order to allow all
> > those pieces to share access to the datastore that the Harvester
> > creates and maintains?
>
> > Thanks for the assist guys.
>
> > Best,
> > Riyad

--

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] Some suggestions regarding the "not support multiple parent key provider fields" JDOexception

2009-12-22 Thread Mike
Hi,

I am playing about with JDO,  creating objects, relationship, etc. I
have a set of unit tests to make sure that what I am creating conform
with GAE's implementation of JDO. Coming from a RDBMS background, very
often I find myself the following exception:

javax.jdo.JDOException: App Engine ORM does not support multiple
parent key provider fields.

Wouldn't it make developers' life a lot easier to include the name of
the entity that causes the exception? Sometimes it is not obvious
which entity is causing the problem.

--

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] Any advantages on using the Key type instead of String or Long for PK

2009-12-22 Thread Mike
Hi,

Just one quick question about the use of PrimaryKey.

Currently I am using a String type as the Primary key so that I can
query it using comparison, e.g.


select from " + MyUser.class.getName() + " where pk == '" + user.getPk
() + "'


But if the Primary key is of a Key type, I am not able to use the
query above.

So I am wondering if there is any sort of implications when using the
String type as the pk field.

--

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: GetObjectByID JDO question (NucleusObjectNotFoundException)

2009-12-21 Thread Mike
You can query the key only, hope this helps.

http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Queries_on_Keys



On Dec 21, 8:51 pm, Jess Evans  wrote:
> Be wary of a try/get/catch/persist combo.  I was doing this initially, but
> found it triggered a memory leak.  I resorted to a query by business key.  I
> can't confirm whats most efficient.  It's certainly not in terms of index
> storage overhead.  I just wanted to throw out the warning.
>
> On Dec 21, 2009 12:08 PM, "t3jem"  wrote:
>
> Ok,
>
> So I'm writing my first game using the Google App Engine and have been
> finding that using RPC and the datastore is much different than I'm
> use to.  I've managed to get along, but I'm pretty stuck on this one,
> I can't find it anywhere.
>
> My problem is, I need to be able to create a new object with a unique
> ID when a new user logs into the game.  I was doing this by randomly
> generating a key and then using a query to the datastore to retrieve
> an object by that ID.  If nothing turns up then I persist the new
> object with that ID.  I understand that with an exceedingly great
> amount of users this method could become a bit slow, but I don't
> intend to have more than 1000 objects of this type in the datastore so
> I don't foresee any problems with this method (please tell me if I'm
> terribly mistaken).
>
> I get my error when I go to attempt a retrieval of the missing object
> from the datastore.  I use PersistenceManager.getObjectById(foo.class,
> Key)
>
> when my program reaches the call it throws a
> NucleusObjectNotFoundException.  I understand this is probably normal
> behavior, the problem is, I can't seem to find a way to check if the
> key already exists in the datastore or not.
>
> Is there a cheap way to check for a key? the only other method I can
> think of is to get a collection of all the objects of that class and
> check the created key against all existing ones, but that seems much
> to expensive.
>
> Thank you for your time
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com 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] Strange exception from JDO - Please help

2009-12-21 Thread Mike
Hi,

I am a newbie to GAE and it's the first time I try out the JDO
facility. I followed the JUnit How-To to create all the base classes
for Junit test and the following is my test:

public class AbcTest extends LocalServiceTestCase {

Abc abcType = null;

PersistenceManagerFactory pmf =
GAEPresistenceHelper.getPersistenceManagerFactory();


@Override
public void setUp() throws Exception {
super.setUp();
abcType = new Abc();
abcType.setCreationTime(Calendar.getInstance().getTime());
PersistenceManager pm = pmf.getPersistenceManager();
pm.makePersistent(abcType);
pm.close();
}


public void testPKGeneration(){
assertNotNull(abcType.getPk());
}


@Override
public void tearDown() throws Exception {
super.tearDown();
System.out.println(KeyFactory.keyToString(abcType.getPk()));
PersistenceManager pm = pmf.getPersistenceManager();
ObjectState state = JDOHelper.getObjectState(abcType);
System.out.println(state.name());
pm.getObjectById(abcType.getPk());

}

}


The ABC class:

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

@PrimaryKey
@Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
private Key pk;

public Key getPk() {
return pk;
}

public void setPk(Key pk) {
this.pk = pk;
}

}



Could someone please advice? Am I doing anything wrong? Thanks in
advance.

Michael Chan

--

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




[appengine-java] new comer

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

--

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




[appengine-java] Re: Image Upload

2009-09-02 Thread Mike

I needed to copy the JARs into the WEB-INF/lib directory, in addition
to import them as libraries.  Sweet!

On Sep 2, 6:24 pm, Mike  wrote:
> GWT and java app engine
>
> eclipse galileo 3.5
>
> On Sep 2, 6:13 pm, Travis J Warren  wrote:
>
> > What environment are you developing in?
>
> > On Sep 3, 8:03 am, Michael Ring  wrote:
>
> > > I'm trying to use apache file upload per the example in the app engine
> > > file upload FAQ and am getting this error:
>
> > > java.lang.NoClassDefFoundError: org/apache/commons/fileupload/servlet/
> > > ServletFileUpload
>
> > > I have the apache file upload and commons io libraries properly added.
>
> > > Here is the servlet code directly from 
> > > google:http://code.google.com/appengine/kb/java.html#fileforms
>
> > > what can I check on?
>
> > > Thanks,
>
> > > Mike
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Image Upload

2009-09-02 Thread Mike

GWT and java app engine

eclipse galileo 3.5


On Sep 2, 6:13 pm, Travis J Warren  wrote:
> What environment are you developing in?
>
> On Sep 3, 8:03 am, Michael Ring  wrote:
>
> > I'm trying to use apache file upload per the example in the app engine
> > file upload FAQ and am getting this error:
>
> > java.lang.NoClassDefFoundError: org/apache/commons/fileupload/servlet/
> > ServletFileUpload
>
> > I have the apache file upload and commons io libraries properly added.
>
> > Here is the servlet code directly from 
> > google:http://code.google.com/appengine/kb/java.html#fileforms
>
> > what can I check on?
>
> > Thanks,
>
> > Mike
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Xml Support in GAE (xerces.jar SAXNotSupportedException)

2009-08-18 Thread Mike

Hi Max,

I used javax.xml.parsers.SAXParser.

Mike


On Aug 18, 8:50 am, Max  wrote:
> I have read that I must add xerces.jar to project to add support for
> XML.
>
> I have project in Eclipse with Google Plugin that works fine without
> XML.
> I added xerces.jar to war/WEB-INF/lib
>
> I have not changed any line of code. just added jar.
> It still works in hosted mode but does not work when I deploy to app
> engine.
>
> Uncaught exception from servlet
> java.lang.Error: 
> org.xml.sax.SAXNotSupportedException:http://xml.org/sax/features/external-general-entities
>         at org.mortbay.xml.XmlParser.setValidating(XmlParser.java:132)
>         at org.mortbay.xml.XmlParser.<init>(XmlParser.java:97)
>         at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp
> (TagLibConfiguration.java:202)
>         at org.mortbay.jetty.webapp.WebAppContext.startContext
> (WebAppContext.java:1215)
>         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
> com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler
> (AppVersionHandlerMap.java:190)
>         at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler
> (AppVersionHandlerMap.java:167)
>         at
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceReques­t
> (JettyServletEngineAdapter.java:127)
>         at com.google.apphosting.runtime.JavaRuntime.handleRequest
> (JavaRuntime.java:235)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:4823)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:4821)
>         at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
> (BlockingApplicationHandler.java:24)
>         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> 359)
>         at com.google.net.rpc.impl.Server$2.run(Server.java:820)
>         at com.google.tracing.LocalTraceSpanRunnable.run
> (LocalTraceSpanRunnable.java:56)
>         at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
> (LocalTraceSpanBuilder.java:516)
>         at com.google.net.rpc.impl.Server.startRpc(Server.java:775)
>         at com.google.net.rpc.impl.Server.processRequest(Server.java:348)
>         at com.google.net.rpc.impl.ServerConnection.messageReceived
> (ServerConnection.java:436)
>         at com.google.net.rpc.impl.RpcConnection.parseMessages
> (RpcConnection.java:319)
>         at com.google.net.rpc.impl.RpcConnection.dataReceived
> (RpcConnection.java:290)
>         at com.google.net.async.Connection.handleReadEvent(Connection.java:
> 428)
>         at com.google.net.async.EventDispatcher.processNetworkEvents
> (EventDispatcher.java:762)
>         at com.google.net.async.EventDispatcher.internalLoop
> (EventDispatcher.java:207)
>         at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
> 101)
>         at com.google.net.rpc.RpcService.runUntilServerShutdown
> (RpcService.java:251)
>         at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
> (JavaRuntime.java:374)
>         at java.lang.Thread.run(Unknown Source)
> Unexpected exception from servlet: java.lang.Error:
> org.xml.sax.SAXNotSupportedException:http://xml.org/sax/features/external-general-entities
> 
>
> My code does not call xerces or any other XML stuff. I just added it.
>
> Is there any documentation how o add xml support in GAE project?
>
> Thanks, Max
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



  1   2   >