• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Google App Engine + Simple Stripes web-app

 
Ranch Hand
Posts: 231
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a very basic web application that uses the Stripes framework. I've set this up in Netbeans, and it runs perfectly fine locally on Glassfish v3.

My app consists of a few JSPs and a few actions that navigate through the various pages, nothing fancy at the moment.

I've followed the GAE documentation as provided on the google site, I have successfully run my application locally using the GAE server as included in the SDK, this works fine I can access my application on port 8080 no problem.

I've checked in my app to GAE (once again following their documentation) however this fails to run, I'm able to get the following from their logs



Am I missing something completely obvious? Could there be an issue with my code? It runs fine on the GAE server I have running locally, so I'm unsure of what would change

Many thanks

 
James Elsey
Ranch Hand
Posts: 231
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After some more searching, it appears there is one common issue with GAE and stripes

Stripes Framework
Version(s): ?
Status: COMPATIBLE

* The default multipartwrapper implementation needs a temporary directory on the local file system for file uploads, which App Engine doesn't allow. The workaround is to create your own implementation -- more details at http://groups.google.com/group/google-appengine-java/browse_thread/thread/81dbcf7cf2281014.



source

This leads onto some discussions of initialising the multipartWrapper : http://groups.google.com/group/google-appengine-java/browse_thread/thread/81dbcf7cf2281014

I'm not sure how to do that, can anyone please advise? I will continue to research and post any solutions I find

Thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you don't need file uploads, then proceed as described in the last section of http://www.stripesframework.org/display/stripes/File+Uploads: implement MultipartWrapperFactory with an implementation that does nothing at all.

If you do need file uploads, then you'd also implement MultipartWrapperFactory (maybe by subclasssing DefaultMultipartWrapperFactory), but with an implementation that does not use temp directories. In that case you should use the Apache Commons FileUpload library, since that can be configured to not use files, but hold everything in memory. Or you can configure it to use a directory that does exist, and to which GAE allows access.
 
James Elsey
Ranch Hand
Posts: 231
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just for the record, I had to provide an empty implementation of MultipartWrapper and update my web.xml, as follows






I also wrote up what I had to do on my blog

Hopefully this will help others in the future ;)

 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

GAE has no support for uploading of files, so we use this to disable that part of Stripes


I'm fairly certain that's not correct. The way it looks to me is that GAE doesn't support file uploads the way they work by default in Stripes. But that can apparently be changed in the way I described.
 
James Elsey
Ranch Hand
Posts: 231
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry got that comment wrong, cheers for pointing it out I'll make a note to update my code

thanks Ulf,

J
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic