[appengine-java] Re: Email sending failure with "Bad Request: Missing body"

2011-04-20 Thread bzorg
Hi,

Did you try "msg.setText(...);" to set message plain-text ?

--L

On Apr 11, 3:57 am, MobiUcare  wrote:
> when sending email, sometimes such error occurs
>
> does it mean that "contents" is empty?
>
> - error -
> com.skyppond.mdm.controller.rpc.DeviceRegisterController register:
> Send failure (javax.mail.MessagingException: Illegal Arguments
> (java.lang.IllegalArgumentException: Bad Request: Missing body))
>
> --- code -
> public void sendRegistrationEmail(UserVO user, DeviceVO device)
>                         throws Exception {
>
>                 Properties props = new Properties();
>                 Session session = Session.getDefaultInstance(props, null);
>
>                 Message msg = new MimeMessage(session);
>
>                 String localeStr = user.getLocale();
>                 if (localeStr == null) {
>                         localeStr = "en_US";
>                 }
>
>                 Locale locale = new Locale(localeStr.substring(0, 2),
>                                 localeStr.substring(3));
>
>                 msg.setFrom(new InternetAddress(AllConfig.SUPPORT_EMAIL,
>                                 "MobiUCare Support"));
>
>                 msg.addRecipient(Message.RecipientType.TO,
>                                 new InternetAddress(user.getEmail()));
>
>                 msg.addRecipient(Message.RecipientType.BCC, new 
> InternetAddress(
>                                 AllConfig.SUPPORT_EMAIL));
>
>                 String encodingOptions = "text/html; charset=UTF-8";
>                 msg.setHeader("Content-Type", encodingOptions);
>
>                 msg.setSubject(MimeUtility.encodeText(
>                                 this.getLocalizedMessage(locale, 
> "email.registration.title"),
>                                 "UTF-8", "Q"));
>
>                 String contents = readContents(EMAIL_URL_REGISTRATION + 
> "?language="
>                                 + locale.getLanguage());
>
>                 if(contents!=null){
>                 logger.info("Email contents size : "+contents.length());
>                 }
>
>                 Multipart mp = new MimeMultipart();
>                 MimeBodyPart htmlPart = new MimeBodyPart();
>                 htmlPart.setContent(contents, "text/html; charset=UTF-8");
>
>                 mp.addBodyPart(htmlPart);
>
>                 msg.setContent(mp);
>
>                 Transport.send(msg);
>
>                 logger.info("EMAIL SENT : " + user.getEmail());
>
>         }

-- 
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: Which one is best for development...Spring Framework or Servlet& Jsp....

2011-04-20 Thread Thomas Wiradikusuma
I'm also using Spring MVC and Spring Security.

I tried to ditch Spring in favor of Guice, but in the end I couldn't
live without it. Form handling, i18n, security, etc, everything make
me go back to Spring :) I use manual wiring, so performance is
acceptable. I no longer get timeout when first loading.

On Apr 20, 11:30 am, Nick Rudnik  wrote:
> Spring MVC 3 works very well inside App Engine. I have a fairly small and
> simple application and see a load time of around 20 seconds also.

-- 
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] Re: Data being stored in a weird way

2011-04-20 Thread Amit Pandey
Hi Didier,

I have almost same problem. I'm not able to store þ (thorn) char in
datastore. I'm using String as a data type.

Thanks,
 Amit

On Wed, Apr 20, 2011 at 10:08 AM, Didier Durand wrote:

> Hi,
>
> Are you using eclipse ?  if yes check under File > Properties > Text
> File encoding that your file is UTF-8 encoding.
>
> I would guess not.
>
> So, change it to UTF-8 and your issue should get fixed.
>
> regards
>
> didier
>
> On Apr 19, 6:32 pm, Luca Matteis  wrote:
> > I posted a question on StackOverflow about my data being stored with
> > weird chars, and it only happens live, which is very strange.
> >
> > Here's the question:
> http://stackoverflow.com/questions/5707266/google-app-engine-data-bei...
>  >
> > Am I missing something?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-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.



Re: [appengine-java] Re: Data being stored in a weird way

2011-04-20 Thread Luca Matteis
Didier, I don't think that has anything to do with the java source file.

On Wed, Apr 20, 2011 at 10:53 AM, Amit Pandey  wrote:
> Hi Didier,
>
> I have almost same problem. I'm not able to store þ (thorn) char in
> datastore. I'm using String as a data type.
>
> Thanks,
>  Amit
>
> On Wed, Apr 20, 2011 at 10:08 AM, Didier Durand 
> wrote:
>>
>> Hi,
>>
>> Are you using eclipse ?  if yes check under File > Properties > Text
>> File encoding that your file is UTF-8 encoding.
>>
>> I would guess not.
>>
>> So, change it to UTF-8 and your issue should get fixed.
>>
>> regards
>>
>> didier
>>
>> On Apr 19, 6:32 pm, Luca Matteis  wrote:
>> > I posted a question on StackOverflow about my data being stored with
>> > weird chars, and it only happens live, which is very strange.
>> >
>> > Here's the
>> > question:http://stackoverflow.com/questions/5707266/google-app-engine-data-bei...
>> >
>> > Am I missing something?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-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.
>

-- 
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] How to store these values in AppEngine Datastore using JDO

2011-04-20 Thread Ram
 down vote 
favorite
 
  
public class ServletCheckServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
resp.setContentType("text/plain");

PrintWriter pw=resp.getWriter();
String s1=req.getParameter("username");
String s2=req.getParameter("password");

* **//How to store these values in AppEngine Datastore using JDO***

 }
}

Also, *I want to get these saved values from Data store using another 
Servlet*

How to do this.I followed as 
here...but
 
i am not able understand that exampleThey are confusingPlease help 
me to do this simply.

-- 
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 log user generated traffic per user

2011-04-20 Thread Nichole
or a ServletRequestListener or HttpSessionListener.  There are
attribute listeners too.  In general,
as convenient as listeners are, they also affect performance.

On Apr 18, 9:51 pm, Nichole  wrote:
> Or you could use a ServletContextListener or a ServletFilter.  They're
> components so easy to swap in an out of your
> architecture.
>
> On Apr 18, 4:04 am, Simon Knott  wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > Didier's solution will definitely do the job for servlets.  Alternatively,
> > you could use a servlet filter to "wrap" all calls to specific URL mappings
> > that allows you to capture the same data, without the need for a common base
> > class, as well as capturing data for dynamic pages as well.
>
> > You won't be able to capture specific user data for static entities unless
> > you deliver them to end users via some servlet-delivery mechanism.
>
> > Cheers,
> > Simon

-- 
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] Many /_ah/warmup - Deadline ExceededException

2011-04-20 Thread Aswath Satrasala
Hello,
My app-id has 'Always on' enabled
Our app-id activity has increased.  I am noticing 2-3 related issues.
* I am seeing many many "/_ah/warmup " in the logs.  (maybe our app-id
activity is increased)
* A lot of these are throwing 'DeadlineExceededException'.
* Why should that exception be thrown for some and not thrown for few
/_ah/warmup.

My logs are filled with above messages and errors.I feel something unusual
here.

-Aswath

2011-04-20 04:39:18.446 /_ah/warmup 500 48134ms 6953cpu_ms  0kb

   1.
  1.  See 
details

  0.1.0.3 - - [20/Apr/2011:04:39:18 -0700] "GET /_ah/warmup
HTTP/1.1" 500 0 - - "9.349708795707059392.vs-accounting.appspot.com"
ms=48135 cpu_ms=6953 api_cpu_ms=0 cpm_usd=0.193164 exit_code=104
throttle_code=1

  2.  W 2011-04-20 04:38:59.058

  com.veersoft.listener.VsServletContextListener
contextInitialized: 2011-04-20 17:08:59 IST

  3.  C 2011-04-20 04:39:18.426

  Uncaught exception from servlet
  com.google.apphosting.runtime.HardDeadlineExceededError: This
request (b3f5ddbb056640c9) started at 2011/04/20 11:38:31.643 UTC and
was still executing at 2011/04/20 11:39:18.417 UTC.
at 
com.google.appengine.runtime.Request.process-b3f5ddbb056640c9(Request.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at 
com.veersoft.listener.VsServletContextListener.registerEntities(VsServletContextListener.java:76)
at 
com.veersoft.listener.VsServletContextListener.contextInitialized(VsServletContextListener.java:67)
at 
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at 
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at 
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:437)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573)
at 
com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
at 
com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

  4.  W 2011-04-20 04:39:18.438

  A serious problem was encountered with the process that handled
this request, causing it to exit. This is likely to cause a new
process to be used for the next request to your application. If you
see this message frequently, you may be throwing exceptions during the
initialization of your application. (Error code 104)

-- 
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] on time failed error in cron jobs

2011-04-20 Thread Ram



I have created a application using cron jobsAfter deployed in 
AppEngine...In Cron jobs,
  it shows,on time fialed...how to clear this 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-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] I want to create an Entity and its properties.

2011-04-20 Thread Ram
I am using Eclipse and Java AppEngine

I want to create an Entity and its propertiesAlso I have servlet, this 
servlet will get some values and it will store in Particular Entity(which is 
already created)The old values stored in Entity should be available for 
future referenceis it possible in Datastore..

If possible how to do this

please give your 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: How to store these values in AppEngine Datastore using JDO

2011-04-20 Thread Nick Rudnik
You found the right article. Simply, you have to create a POJO with the 
proper annotations for the fields you want to persist, instatiate the POJO 
and set the properties with your two values, get a reference to the 
PersistenceManager and save the POJO.

-- 
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] Two fields of sister classes in an entity!

2011-04-20 Thread Muhammad Ijaz Khan
Hi,
App engine doesnt allow yet, two fields of same class type as it says
"Class Card has multiple relationship fields of type Red: border1 and
border2.  This is not yet supported."
But can we use fields of different inherited classes from one parent? eg.
Card may have Red and Blue field types but both Red and Blue derived from
class Color.
Please update.
regards
Ijaz

-- 
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: Two fields of sister classes in an entity!

2011-04-20 Thread Simon Knott
What storage mechanism are you using JPA or JDO?  I'm assuming that if 
you've got the error message for your Card object, that it would be a 
two-minute job to test the scenario you're querying about.

Cheers,
Simon

-- 
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: Many /_ah/warmup - Deadline ExceededException

2011-04-20 Thread Aswath Satrasala
I am also noticing that for no reason, additional instances are getting
created.  Every 2-3 minutes, I see '/_ah/warmup' messages in the info logs

-Aswath

On Wed, Apr 20, 2011 at 5:19 PM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> Hello,
> My app-id has 'Always on' enabled
> Our app-id activity has increased.  I am noticing 2-3 related issues.
> * I am seeing many many "/_ah/warmup " in the logs.  (maybe our app-id
> activity is increased)
> * A lot of these are throwing 'DeadlineExceededException'.
> * Why should that exception be thrown for some and not thrown for few
> /_ah/warmup.
>
> My logs are filled with above messages and errors.I feel something unusual
> here.
>
> -Aswath
>
> 2011-04-20 04:39:18.446 /_ah/warmup 500 48134ms 6953cpu_ms  0kb
>
>1.
>   1.  See 
> details
>
>   0.1.0.3 - - [20/Apr/2011:04:39:18 -0700] "GET /_ah/warmup HTTP/1.1" 500 
> 0 - - "9.349708795707059392.vs-accounting.appspot.com" ms=48135 cpu_ms=6953 
> api_cpu_ms=0 cpm_usd=0.193164 exit_code=104 throttle_code=1
>
>   2.  W 2011-04-20 04:38:59.058
>
>   com.veersoft.listener.VsServletContextListener contextInitialized: 
> 2011-04-20 17:08:59 IST
>
>   3.  C 2011-04-20 04:39:18.426
>
>   Uncaught exception from servlet
>   com.google.apphosting.runtime.HardDeadlineExceededError: This request 
> (b3f5ddbb056640c9) started at 2011/04/20 11:38:31.643 UTC and was still 
> executing at 2011/04/20 11:39:18.417 UTC.
>
>   at 
> com.google.appengine.runtime.Request.process-b3f5ddbb056640c9(Request.java)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>   at 
> com.veersoft.listener.VsServletContextListener.registerEntities(VsServletContextListener.java:76)
>
>   at 
> com.veersoft.listener.VsServletContextListener.contextInitialized(VsServletContextListener.java:67)
>   at 
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
>   at 
> org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
>
>   at 
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
>   at 
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
>   at 
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
>
>   at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>   at 
> com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:437)
>   at 
> com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573)
>
>   at 
> com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
>   at 
> com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
>
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
>   at 
> com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>   at java.lang.Thread.run(Thread.java:636)
>
>   4.  W 2011-04-20 04:39:18.438
>
>   A serious problem was encountered with the process that handled this 
> request, causing it to exit. This is likely to cause a new process to be used 
> for the next request to your application. If you see this message frequently, 
> you may be throwing exceptions during the initialization of your application. 
> (Error code 104)
>
>
>
>

-- 
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: I can't read a 7.5MB file in tasks 10min. Whats the task's blobstore read bandwidth/(throttle)?

2011-04-20 Thread branflake2267
Is there a memory limit?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to 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] Re: Two fields of sister classes in an entity!

2011-04-20 Thread Muhammad Ijaz Khan
aah, I thought the same and tried with my jdo app but getting other errors
so thought to ask while i solve that issue :s

On Wed, Apr 20, 2011 at 5:08 PM, Simon Knott  wrote:

> What storage mechanism are you using JPA or JDO?  I'm assuming that if
> you've got the error message for your Card object, that it would be a
> two-minute job to test the scenario you're querying about.
>
> Cheers,
> Simon
>
> --
> 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: How to trace the TaskQueue status

2011-04-20 Thread branflake2267
I setup a JDO class and store the task attributes. I send back the JDO key 
and track it on the client side by polling it. I delete the entry after the 
task is finished. It works quite well for me.

Brandon Donnelson
http://gwt-examples.googlecode.com
http://c.gawkat.com

-- 
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: Any GqlQuery example for Java?

2011-04-20 Thread branflake2267
Heres one example I did:

SELECT * FROM __BlobInfo__ WHERE __key__ = 
KEY('__BlobInfo__','AMIfv940prQksEQ-cbqa_T3kupYZUKj0jFS6CEWqUfW5gTjuriiJFdVsg_Z4rEBl3aldWS7ygE_Vbcl85IWRE2vtxHvB7GF5sdtE0kIkrPk6c2hsfxlqfdocpu1zeOQygEb8RslST1cF9bT37n_9X1kdQpRtu5gyPB3-AgmpZ1GtbzWyGv7Uj1M')

I have more about it 
here: http://code.google.com/p/gwt-examples/wiki/DemoGAEMultiFileBlobUpload

Brandon Donnelson
http://gwt-examples.googlecode.com
http://c.gawkat.com

-- 
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] Timeout when trying to upload to Blobstore (files < 5k)

2011-04-20 Thread Josh F.
I'm trying to upload to the blobstore by programattically creating the POST 
request using the following class:

MultiPartFormOutputStream

 BlobstoreService blobstoreService = 
BlobstoreServiceFactory.getBlobstoreService();
 try
 {
 uploadURL = 
blobstoreService.createUploadUrl("/upload");
 }
 catch(BlobstoreFailureException e)
 {
resp.sendRedirect("close.jsp");
 }
 
 //add host if in dev mode
 if(uploadURL.indexOf("http") == -1)
 {
 uploadURL = "http://localhost:"; + uploadURL;
 }
 URL url = new URL(uploadURL);
 // create a boundary string

 String boundary = MultiPartFormOutputStream.createBoundary();
 URLConnection urlConn = 
MultiPartFormOutputStream.createConnection(url); 
 urlConn.setReadTimeout(3);
 urlConn.setConnectTimeout(3);
 urlConn.setRequestProperty("Accept", "*/*");
 urlConn.setRequestProperty("Content-Type", 
MultiPartFormOutputStream.getContentType(boundary));
 urlConn.setRequestProperty("Cookie", name + "=" + value);
 // set some other request headers...
 urlConn.setRequestProperty("Connection", "Keep-Alive");
 // no need to connect because getOutputStream() does it 

 MultiPartFormOutputStream out = null; 
try
{
 out = new MultiPartFormOutputStream(urlConn.getOutputStream(), 
boundary);
 // write a text field element
 out.writeField("old", oldBlobKey);
 out.writeField("topic", topic);
 out.writeField("category", category);
 out.writeField("key", key);
 // write bytes directly
 out.writeFile("myFile", "text/html", "content.html", htmlData);
 out.close();
}
catch(IOException e)
{
resp.sendRedirect("close.jsp");
}

Even when it times out  uploading and an exception gets thrown, the byte 
array still gets uploaded and the content.html file gets updated...I'm now 
sure how that works. I tried catching the exception with the above code, but 
sometimes it STILL displays an erro rmessage saying there was an uncaught 
IOException.

1.) Why is app-engine timing out when  uploading a file that is <5k in size?
2.) Why is it that even when I am attempting to catch the exception after 
creating the connection to the upload URL (in the case of the timeout), it 
still comes back as an uncaught exception...

Any help would be greatly appreciated! I really need to figure out why this 
Timeout is occurringI see people who talk about uploading files 
>1MB...how is it that my tiny HTML files timeout when being uploaded to the 
Blobstore?
 

-- 
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] trying to import FileServiceFactory

2011-04-20 Thread Josh F.
I'm trying to do something like the code example for "Writing file to 
Blobstore", however I can't seem to import the FileServiceFactory class.

http://code.google.com/appengine/docs/java/blobstore/overview.html#Writing_Files_to_the_Blobstore

The API documentation says it's under 
com.google.appengine.api.files.FileServiceFactory; but eclipse can't find 
it. 

-- 
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] Session and load balancing

2011-04-20 Thread hadf
I would like to know if GAE insures that requests attached to the same
HttpSession are redirected on the same server instance, considering
that it may not because of load balancing.

-- 
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: Many /_ah/warmup - Deadline ExceededException

2011-04-20 Thread Nischal
When a new instance is spun, it gets the same 30 second limit that other 
http requests get on the appengine. You should see to it that your app loads 
up in under 30s. These errors are usually a result of the app taking more 
than 30s to load.

-- 
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] Session and load balancing

2011-04-20 Thread Don Schwarz
No, we currently do not do this.  Feel free to file a bug in our issue
tracker to help us prioritize this kind of change in the future.

On Wed, Apr 20, 2011 at 12:16 PM, hadf  wrote:

> I would like to know if GAE insures that requests attached to the same
> HttpSession are redirected on the same server instance, considering
> that it may not because of load balancing.
>
> --
> 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] appengine-mapreduce: "Returning NOBODY because of SkipAdminCheck"... ??

2011-04-20 Thread Santosh kumar
Hi,

I have a mapper which is running fine without errors,
but finally it displaying "Returning NOBODY because of SkipAdminCheck"...
continuously.
What could be the reason ??

Thanks in advance...**

-- 
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] Two fields of sister classes in an entity!

2011-04-20 Thread Bruno Fuster
Using lists might solve your issue. If you assume item 0 is border1 and item
1 is border2, you could even create methods like getBorder1(return
list.get(0)) and getBorder2(list.get(1))



On Wed, Apr 20, 2011 at 10:32 AM, Muhammad Ijaz Khan wrote:

> Hi,
> App engine doesnt allow yet, two fields of same class type as it says
> "Class Card has multiple relationship fields of type Red: border1 and
> border2.  This is not yet supported."
> But can we use fields of different inherited classes from one parent? eg.
> Card may have Red and Blue field types but both Red and Blue derived from
> class Color.
> Please update.
> regards
> Ijaz
>
> --
> 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.
>



-- 
Bruno Fuster

-- 
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: Cheapest way to update a versioned object?

2011-04-20 Thread blue
Thanks for the responses.

I'm using Objectify, but am bypassing it to write only to memcache.  I can 
definitely write-through, but that would mean I have datastore writes on 
every request, which is what I'm trying to avoid.

Does anyone know where the virtual ceiling is for memcache?  I would really 
like to sweep my memcache every 5 minutes and write to the datastore, but if 
I have a million users storing 1mb objects in memcache, are some going to be 
falling off the LRU cliff?

>From all the docs I've read and research I've done on GAE memcache, it seems 
that I shouldn't have to worry so much about losing anything in memcache if 
I'm doing a sweep every 5 minutes.  I guess I could write up some tests, but 
I'd like to know if anyone has any hard evidence as to if my objects are 
going to be evicted if I attempt this?

Thanks everyone!

-- 
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] Session and load balancing

2011-04-20 Thread Nick Rudnik
Why would this be needed? The session implementation stores its data outside 
of a specific jvm so every instance has access to all sessions. It is a very 
excellent design decision not to have to connect a user to a single instance 
for the life of a session. Instances can come and go as they please without 
affecting any existing sessions.

-- 
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: on time failed error in cron jobs

2011-04-20 Thread Nick Rudnik
It will only clear when the execution succeeds. Check your log to see why it 
failed. Make sure your cron job actually returns a clean response with the 
http 200 code. 

-- 
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] is the remoteapi classes available in Maven repository?

2011-04-20 Thread mingfai
hi, a quick question, does anyone know if the following two classes are 
available in any jar/artifact in the Maven repository?
import com.google.appengine.tools.remoteapi.RemoteApiInstaller;
import com.google.appengine.tools.remoteapi.RemoteApiOptions;

I think I tried every artifact and checked the jars quickly and do not seem 
to be able to find these two classes. 

-- 
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 and load balancing

2011-04-20 Thread hadf
This is not needed and we can manage with session store, but
developpers must be informed not to use static attributes, given that
they are shared between server instances. If not, developments that
works locally may not in production context.

On 20 avr, 20:36, Nick Rudnik  wrote:
> Why would this be needed? The session implementation stores its data outside
> of a specific jvm so every instance has access to all sessions. It is a very
> excellent design decision not to have to connect a user to a single instance
> for the life of a session. Instances can come and go as they please without
> affecting any existing sessions.

-- 
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: Cheapest way to update a versioned object?

2011-04-20 Thread Simon Knott
Just be warned that some users were complaining that their entities were 
being flushed within seconds, a couple of months ago.  I personally haven't 
experienced this, however.

-- 
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: why two regsitered caches share same space

2011-04-20 Thread Stefan
Hi Ikai,

could you please elaborate on this. Specifically, how do you use the
namespaces api in a local TESTING environment, i.e. using
LocalServiceTestHelper etc.? (It works fine in production and dev
server.)

When I call NamespaceManager.set("testing") in my test setUp() method,
this results in a NullpointerException in NamespaceManager.set().

Here is my setUp() method:

NamespaceManager.set("testing");
memcacheService = new LocalServiceTestHelper(new
LocalMemcacheServiceTestConfig());
memcacheService.setUp();

Please advice.

Best regards,
Stefan

-- 
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: Many /_ah/warmup - Deadline ExceededException

2011-04-20 Thread Aswath Satrasala
Hello App Engine team,

My app-id : vs-accounting.
There are 320 info log messages in the last 23 hrs of type
/_ah/warmup
There are 59 error log messages in the last 23 hrs of type
/_ah/warmup

The application was last deployed on the server a week ago.  Until 23hrs
there were no issues.
Please suggest

Regards
-Aswath



On Wed, Apr 20, 2011 at 10:47 PM, Nischal  wrote:

> When a new instance is spun, it gets the same 30 second limit that other
> http requests get on the appengine. You should see to it that your app loads
> up in under 30s. These errors are usually a result of the app taking more
> than 30s to load.

-- 
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]: transactional tasks cannot be named ??

2011-04-20 Thread Santosh kumar
Hi,

When i run mapper, i am getting an exception, please can you suggest why it
is throwing exception ??

java.lang.IllegalArgumentException: transactional tasks cannot be named:
TaskOptions[taskName=worker-attempt-1303365412875-0001-m-00-1--45,
headers={}, method=POST,
params=[com.google.appengine.api.labs.taskqueue.TaskOptions$StringValueParam@5d66aca3,
com.google.appengine.api.labs.taskqueue.TaskOptions$StringValueParam@609a998,
com.google.appengine.api.labs.taskqueue.TaskOptions$StringValueParam@58710f7b],
url=/admin/mapreduce/mapperCallback, countdownMillis=null,
etaMillis=nullretryOptions=null]
at
com.google.appengine.api.labs.taskqueue.QueueImpl.fillAddRequest(QueueImpl.java:146)
at
com.google.appengine.api.labs.taskqueue.QueueImpl.add(QueueImpl.java:352)
at
com.google.appengine.api.labs.taskqueue.QueueImpl.add(QueueImpl.java:335)
at
com.google.appengine.api.labs.taskqueue.QueueImpl.add(QueueImpl.java:320)
at
com.google.appengine.tools.mapreduce.MapReduceServlet.scheduleWorker(MapReduceServlet.java:815)
at
com.google.appengine.tools.mapreduce.MapReduceServlet.handleMapperWorker(MapReduceServlet.java:614)
at
com.google.appengine.tools.mapreduce.MapReduceServlet.doPost(MapReduceServlet.java:174)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)
at
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.veersoft.filter.ResetUserMessagesAndErrorsFilter.doFilter(ResetUserMessagesAndErrorsFilter.java:28)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
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
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:349)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Thanks in advance...

-- Santosh

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