Re: [appengine-java] Problem integrating the App Engine with Eclipse

2010-08-23 Thread Hariharan Anantharaman
Hi,
Check if you  java jre path and app engine sdk path are correct in eclipse.

~hari

On Aug 23, 2010 10:02 PM, "TacB0sS"  wrote:

Hey, I have tried to install the App Engine with both Eclipse 3.5 and
3.6, I've tried to download the EclipseEE + the plugins I wanted,
which included the GWT 2.0.4 and the App Engine 1.3.6, from Yoxo's,
but for some reason when I try to create a Google web project, I get
an error in the project wizard:
unable to initialize App engine at: "and the path to the folder", I
tried setting to any one of the main folders in the App installation,
but the error persists.

What am I doing wrong?

Thanks,
Adam.

--
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: Reusing GWT Localization on Server Side

2010-08-23 Thread Casey
It looks promising but open issue list indicates that it doesn't work
with GAE. Thanks though. I'll apply the patch from the open issue and
everything should be fine.

On Aug 22, 1:54 pm, Uwe Maurer  wrote:
> Maybe this project can help
>
> http://code.google.com/p/gwt-i18n-server/
>
> It provides aGWTI18N.create which replaces the GWT.create
>
> FooMessages msg =GWTI18N.create(FooMessages.class);
> msg.fooBar(...);
>
> Uwe
>
> On Aug 16, 9:18 pm, Casey  wrote:
>
>
>
> > I figured that I was going to have to write my own parser for the
> > properties file but I was hoping that I might have missed a new GWT or
> > GAE feature. Thanks for your response and I"ll ask the same question
> > in the GWT group.
>
> > On Aug 16, 12:42 pm, "Ikai L (Google)"  wrote:
>
> > > Since they're just properties files, you should be able to use the same
> > > messages as a shared resource in your local project, but I doubt you'd be
> > > able to use the same code. Have you also asked this question in the GWT
> > > groups?
>
> > >http://groups.google.com/group/Google-Web-Toolkit
>
> > > On Sun, Aug 15, 2010 at 10:36 PM, Casey  wrote:
> > > > Does anyone know if with Google App Engine there is an easy way to
> > > > reuse your client size localization files (constants and messages)
> > > > from GWT? I think in GWT 1.6 or 1.8 you could actually call the same
> > > > GWT localization code on the server side that you called on the client
> > > > side. I just upgraded from 1.6 to 2.0 and all of a sudden I'm
> > > > receiving the following message: ERROR: GWT.create() is only usable in
> > > > client code! That makes sense to me but there must be an easy way to
> > > > reuse your Constant and Message files on the server. It's been awhile
> > > > since I've opened this project but I'm pretty sure that this was
> > > > working before. 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-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.
>
> > > --
> > > Ikai Lan
> > > Developer Programs Engineer, Google App Engine
> > > Blog:http://googleappengine.blogspot.com
> > > Twitter:http://twitter.com/app_engine
> > > Reddit:http://www.reddit.com/r/appengine

-- 
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] HtmlUnit support on GAE for GWT crawlability

2010-08-23 Thread Christian Goudreau
We're actually working on that feature for
Gwt-Platform
.

You can see the discussion about this here:
http://code.google.com/p/gwt-platform/issues/detail?id=1

Cheers,

On Mon, Aug 23, 2010 at 5:43 PM, Gal Dolber  wrote:

> Thats why he needs htmlunit
>
> 2010/8/23 Arthur Kalmenson 
>
> The Google bot can crawl Javascript based sites, why not follow their
>> guidelines?
>> http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html
>>
>> --
>> Arthur Kalmenson
>>
>>
>>
>> On Sat, Aug 21, 2010 at 9:46 PM, Matt H  wrote:
>> > Hello.
>> >
>> > I'm wanting to make my GWT app on App Engine crawlable by using
>> > HtmlUnit to serve up the page content to the Googlebot.
>> >
>> > Has anyone been able to successfully use HtmlUnit 2.8 on GAE?
>> >
>> > --
>> > 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.
>>
>>
>
>
> --
> Guit: Elegant, beautiful, modular and *production ready* gwt applications.
>
> http://code.google.com/p/guit/
>
>
>
>  --
> 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.
>



-- 
Christian Goudreau
www.arcbees.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-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] HtmlUnit support on GAE for GWT crawlability

2010-08-23 Thread Gal Dolber
Thats why he needs htmlunit

2010/8/23 Arthur Kalmenson 

> The Google bot can crawl Javascript based sites, why not follow their
> guidelines?
> http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html
>
> --
> Arthur Kalmenson
>
>
>
> On Sat, Aug 21, 2010 at 9:46 PM, Matt H  wrote:
> > Hello.
> >
> > I'm wanting to make my GWT app on App Engine crawlable by using
> > HtmlUnit to serve up the page content to the Googlebot.
> >
> > Has anyone been able to successfully use HtmlUnit 2.8 on GAE?
> >
> > --
> > 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.
>
>


-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

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

-- 
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] HtmlUnit support on GAE for GWT crawlability

2010-08-23 Thread Arthur Kalmenson
The Google bot can crawl Javascript based sites, why not follow their
guidelines? 
http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html

--
Arthur Kalmenson



On Sat, Aug 21, 2010 at 9:46 PM, Matt H  wrote:
> Hello.
>
> I'm wanting to make my GWT app on App Engine crawlable by using
> HtmlUnit to serve up the page content to the Googlebot.
>
> Has anyone been able to successfully use HtmlUnit 2.8 on GAE?
>
> --
> 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] GWT and GAE: Uploading Files to Blobstore

2010-08-23 Thread rapher
Hey Folks,

i try to upload files using GWT and GAE (Blobstore). Adding data to
the Datastore works fine already. When i click "Upload/Submit" it
opens a new Browser Window and it tries to open

http://xy.appspot.com/_ah/upload/saufdsgfdsfd98gdf89gfdgzfdg9fd78zf8f89fh3hhf938fj37f4

After a few seconds it ends with HTTP ERROR 500 with a Java Heap
Exception.


Here is my Code:

com.xy.client.MyProject.java
(...)
final FormPanel form = new FormPanel();
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
fileService.getUploadURL(new AsyncCallback() {
   public void onFailure(Throwable error) {
   }
   public void onSuccess(String url) {
form.setAction(url);// <<<-   
BLOBSTORE.REQUESTUPLOADURL HERE!
   }
});
(...)
myButton.addClickHandler(new ClickHandler() {
  @Override
  public void onClick(ClickEvent event) {
  form.submit();
}
(...)


com.xy.server.FileServerImpl.java
(...)
private BlobstoreService blobstoreService =
BlobstoreServiceFactory.getBlobstoreService();
public String getUploadURL() {
String url = new String();
url = blobstoreService.createUploadUrl("/xy/upload");
return url;
}
(...)


com.xy.server.UploadFileServlet.java
(...)
public class UploadFileServlet extends HttpServlet {
private BlobstoreService blobstoreService =
BlobstoreServiceFactory.getBlobstoreService();

public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
Map blobs =
blobstoreService.getUploadedBlobs(req);
BlobKey blobKey = blobs.get("pdfFile");
}
}
(...)


web.xml
(...)
  
fileService
com.gcx.gcpub.server.FileServiceImpl
  

  
uploadFileServlet
com.gcx.gcpub.server.UploadFileServlet
  

  
fileService
/gcpub/pdf
  

  
uploadFileServlet
/gcpub/upload
  
(...)

I tried everything and I think I nearly read every thread on the web
handling this topic. Without GWT (if i use a JSP instead) it perfectly
works, it opens no new browser window and i even don't see the upload
URL generated by blobstoreService.createUploadUrl("/xy/upload").

Is it not possible to use a HttpServlet here to save the file to the
Blobstore? Can you tell me where is my mistake? I'm very thankful for
any help!

The docs for GWT and GAE are very good, doing some tutorials directly
pushes you the right way. Sadly there isn't as much good stuff for
combining GWT and GAE (don't even books).



-- 
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: NPE when deploying error handlers

2010-08-23 Thread Nacho Coloma
> If works as expected.

Sorry, it should say "It works as expected".

It's late :)

-- 
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] NPE when deploying error handlers

2010-08-23 Thread Nacho Coloma
Just a heads-up. I am getting a NPE while trying to deploy this with
1.3.6:








Caused by: java.lang.NullPointerException
at java.net.URLEncoder.encode(URLEncoder.java:188)
at
com.google.appengine.tools.admin.ServerConnection.buildQuery(ServerConnection.java:
195)
at
com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:
117)
at
com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:
96)
at
com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:
584)
at
com.google.appengine.tools.admin.AppVersionUpload.uploadErrorHandlers(AppVersionUpload.java:
154)
at
com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:
125)
at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
56)

Adding this to the first handler:
error-code="default"

If works as expected.

-- 
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] Adobe air support in GAE

2010-08-23 Thread Ikai L (Google)
Yes, AIR is a client side technology. Communicate with your App Engine app
via HTTP or XMPP.

On Mon, Aug 23, 2010 at 3:54 AM, aptest1 actiprocess wrote:

> HI,
>
> Is it possible to use adobe air in GAE.
>
> Thanks
> Mahesh
>
> --
> 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.
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

-- 
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] Is process time cumulative?

2010-08-23 Thread Don Schwarz
Please respond privately with your application ID and how I can trigger this
(assuming it happens reproducibly) and we will take a closer look.

Thanks,
Don

On Sun, Aug 22, 2010 at 9:38 PM, gpeev  wrote:

> I have been doing some test with my app and there is no way 40 seconds
> lapse since i click process but i always get this error. i am
> persisting a file - then on the next req i put the processing in the
> task queue. At this point the site locks up and the following is in
> the log. the actual time lapsed is about 10 sec. Please tell me what
> the serious problem is if not going beyond the 30sec limit.
>
>   1.
>  08-22 07:25PM 47.648 /task/process 500 40401ms 470cpu_ms
> 470api_cpu_ms 0kb AppEngine-Google; (+http://code.google.com/
> appengine)
>  See details
>
>  0.1.0.2 - - [22/Aug/2010:19:26:28 -0700] "POST /task/process
> HTTP/1.1" 500 0 "http://www.xxx.com/processLog?id=f1282529101121";
> "AppEngine-Google; (+http://code.google.com/appengine)"
> "www.xxx.com" ms=40402 cpu_ms=470 api_cpu_ms=470 cpm_usd=0.013099
> queue_name=processLog task_name=5918060884013985830 exit_code=203
>
>   2.
>  W 08-22 07:26PM 28.003
>
>  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 should contact the App Engine team.
> (Error code 203)
>
> --
> 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: Determine in runtime (Java) who deployed app

2010-08-23 Thread andrew
Our use case in general is:
We plan to allow users to openly login (which creates their initial
account) to our app using google account, google apps domain account
or openid.

We plan to allow some users to be given "super-user" permissions for
the application instance. They in turn will be able to give other
users super-user permissions for a given area of the app.

How to start the process of allowing super-user permissions?
i.e. who is the first super-user, or the root user who starts that
process, but in a secure and controlled fashion (not just the first
person to log-in!).

Our idea was to have the application deployer be detected on first
login to the application (via google account, open id or other) via
their e-mail address and be give "first super-user" or "root"
permissions. They can then convert other users to super-users and
everything if off and running.

Just becase a Google Apps Domain user is the admin for the domain
doesn't necessarily mean they should be able to admin any/all deployed
instances of the application in that domain
Conversely, to allow someone to admin the app we'd prefer to NOT give
them admin permissions for the whole Google Apps Domain
This made us look for alternatives to just checking if the user is an
admin using the Users API.

We want to have the app deployed on multiple different application
IDs, and on different Google App Domains, and to have control over who
is the "root" user on each independently, without hard-coding user
names and passwords into the code or config files, so that the same
"war" could be deployed to multiple appID/domains without change.

If there is another recommended way of doing this, or similar, then
we'd be interested to hear more about ir (and especially see sample
code in Java :-) ).

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] Problem integrating the App Engine with Eclipse

2010-08-23 Thread TacB0sS
Hey, I have tried to install the App Engine with both Eclipse 3.5 and
3.6, I've tried to download the EclipseEE + the plugins I wanted,
which included the GWT 2.0.4 and the App Engine 1.3.6, from Yoxo's,
but for some reason when I try to create a Google web project, I get
an error in the project wizard:
unable to initialize App engine at: "and the path to the folder", I
tried setting to any one of the main folders in the App installation,
but the error persists.

What am I doing wrong?

Thanks,
Adam.

-- 
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] Is process time cumulative?

2010-08-23 Thread gpeev
I have been doing some test with my app and there is no way 40 seconds
lapse since i click process but i always get this error. i am
persisting a file - then on the next req i put the processing in the
task queue. At this point the site locks up and the following is in
the log. the actual time lapsed is about 10 sec. Please tell me what
the serious problem is if not going beyond the 30sec limit.

   1.
  08-22 07:25PM 47.648 /task/process 500 40401ms 470cpu_ms
470api_cpu_ms 0kb AppEngine-Google; (+http://code.google.com/
appengine)
  See details

  0.1.0.2 - - [22/Aug/2010:19:26:28 -0700] "POST /task/process
HTTP/1.1" 500 0 "http://www.xxx.com/processLog?id=f1282529101121";
"AppEngine-Google; (+http://code.google.com/appengine)"
"www.xxx.com" ms=40402 cpu_ms=470 api_cpu_ms=470 cpm_usd=0.013099
queue_name=processLog task_name=5918060884013985830 exit_code=203

   2.
  W 08-22 07:26PM 28.003

  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 should contact the App Engine team.
(Error code 203)

-- 
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] Query on Many to Many Relation

2010-08-23 Thread Raghu
Hi All,

I just want to reopen the existing challenge. I'm trying hard to think
query on 2 tables with m-m relation.

Tags{
List  items;
}
Item{
List  tags;
}

Please suggest me how to find all the items with given tag. is there
any trick here.

thanks

raghu

-- 
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] Problem with GData Authsub in App Engine (was working with previous SDKs)

2010-08-23 Thread leo
Hi,
I´m facing a problem with GData Authsub authentication in App Engine.
It was working before so I´m not sure if it´s because a change in GAE
production code, similar to these issues:
http://code.google.com/p/gdata-issues/issues/detail?id=2245
http://www.google.com/support/forum/p/apps-apis/thread?tid=16306d02c282e8d3&hl=en

(although my problem is not about getting a session token from a one-
time token, that works fine for me)


This is working fine in local server (and was working previously in
production):

svc.setAuthSubToken(gdataToken, privateKey);(for GData Document
List API and Spreadsheets API)

but I´m getting this error in production:

com.google.gdata.util.AuthenticationException: OK


Authorization required


Authorization required
Error 401


at
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:
596) ...
at com.google.gdata.client.Service.getFeed(Service.java:1001)

(If it may help, sending credentials with
"docsService.setUserCredentials(email, password)" works fine in
production but I don´t want to ask for user/password to the user)

I´ve tried with and without this line in appengine-web.xml:



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] Aplications always timeout on first access.

2010-08-23 Thread Rodrigo Teixo
Hello everybody.

My aplication is throwing javax.servlet.UnavailableException:
Initialization failed
on first access... when the session is created. After that if I call
it again. It creates normaly and speed goes good also.

Can someone give me a tip on what must I doing wrong.

Application Id: horariofacil

The function that handle every call follows:

public void doFilter(ServletRequest request, ServletResponse
response, FilterChain chain)

throws IOException, ServletException {

String uri = ((HttpServletRequest)request).getRequestURI();
System.out.println("Controle chamado!");
System.out.println("Request:[" + uri + "]");
if (uri.equals("/")) {
uri = "main/historico";
}
if (uri.indexOf("/") == 0) {
uri = uri.substring(1, uri.length());
}
System.out.println("Url:[" + uri + "]");

HttpSession session =
((HttpServletRequest)request).getSession(true);
session.setMaxInactiveInterval(3600);
Usuario u = null;

if (session.getAttribute("UsuarioAtual") == null && 
!uri.equals("/
indexDiv.jsp") && request.getParameter("pagina") != null) {
System.out.println("UsuarioAtual perdeu o login 
(nulo)...");
((HttpServletResponse)response).sendRedirect("/main/
login&posLogin=" + uri);
return;
} else {
u = (Usuario)session.getAttribute("UsuarioAtual");

if (u != null) {
if (session.getAttribute("ListHorarios") == 
null) {
if 
(!u.getEmail().equals("convid...@convidado.com.br")) {
PersistenceManager pm = 
PMF.get().getPersistenceManager();
Query qry = 
pm.newQuery(Horotimo.class);
if (!u.getAdmin()) {

qry.setFilter("idUsuario == " + u.getId());

qry.setOrdering("idUsuario desc, date desc");
List listHor 
= (List)qry.execute();
pm.flush();

System.out.println("listHor.size() em Controle = " +
listHor.size());
pm.close();
List 
newListHor = new ArrayList(0);

newListHor.addAll(listHor);

session.setAttribute("ListHorarios", newListHor);
} else {

session.setAttribute("ListHorarios", null);
}
}
}
}
}

Horotimo hor = null;
String idHorotimo = "";

String[] pagina = separaUri(uri);
System.out.println("pagina[0] = " + pagina[0]);
System.out.println("pagina[1] = " + pagina[1]);

RequestDispatcher d = null;

if (pagina[0].equals("main")) {

pagina[1] = pagina[1].substring(0, pagina[1].length() - 
1);
System.out.println("Redirecionando para 
[/indexDiv.jsp?pagina=" +
pagina[1] + "]");
d = 
request.getRequestDispatcher("/indexDiv.jsp?pagina=" +
pagina[1]);
session.setAttribute("tituloAtual", pagina[1]);

} else if (pagina[0].equals("sistema")) {

if (pagina[1].indexOf("etapa") != -1) {
String etapa[] = separaUri(pagina[1]);
System.out.println("etapa[0] = " + etapa[0]);
System.out.println("etapa[1] = " + etapa[1]);
session.setAttribute("paginaAtual", etapa[0] + 
".jsp");
session.setAttribute("tituloAtual", etapa[0]);
if (etapa[1].indexOf("idHorotimo") == 0) {
String[] horotimo = separaUri(etapa[1]);
System.out.println("horotimo[0] = " + 
horotimo[0]);
System.out.println("horotimo[1] = " + 
horotimo[1]);
idHorotimo = horotim

[appengine-java] Error in deployment

2010-08-23 Thread Raghu
Hi

I'm trying to deploy my sample db application  in appspot.  But it's
failing with following log. Im using eclipse+java gae setup. Can I get
some help please


Unable to update:
java.io.IOException: Error writing to server
at sun.reflect.GeneratedConstructorAccessor25.newInstance(Unknown
Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown
Source)
at
com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:
135)
at
com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:
96)
at
com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:
563)
at
com.google.appengine.tools.admin.AppVersionUpload.uploadFile(AppVersionUpload.java:
467)
at
com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:
118)
at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
56)
at
com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:
271)
at
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:
145)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.io.IOException: Error writing to server
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at
sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(Unknown
Source)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderFieldKey(Unknown
Source)
at
com.google.appengine.tools.util.ClientCookieManager.readCookies(ClientCookieManager.java:
123)
at
com.google.appengine.tools.admin.ServerConnection.connect(ServerConnection.java:
347)
at
com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:
133)
... 9 more

-raghu

-- 
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] HtmlUnit support on GAE for GWT crawlability

2010-08-23 Thread Matt H
Hello.

I'm wanting to make my GWT app on App Engine crawlable by using
HtmlUnit to serve up the page content to the Googlebot.

Has anyone been able to successfully use HtmlUnit 2.8 on GAE?

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



[appengine-java] Re: Problem in sending out UTF-8 POST data (only in production, works fine in development)

2010-08-23 Thread Alok
The problem is resolved. We were trying to (1) read some POSTed data,
(2) converting it and then (3) POSTing it again.
setting the HttpServletRequest.setCharacterEncoding("UTF-8") before
(1) solved the issue.

But this brings us to two more questions.

1. Even when the setCharacterEncoding() was not set, the payload in
(1) has the encoding set to UTF-8 already. Why, then, was the encoding
not used by the app engine by default?

2. How does one set the default encoding for the jvm instance in app
engine?

Regards
Alok

On 19 अग, 15:33, आलोक (Alok)  wrote:
> I am having trouble with sending out a POST request that contains
> UTF-8 data.
>
> Here's what I'm doing:
>
> ...
> 01                       String s =  containing non-ascii (devanagari) data>;
> 02                       URL u = new URL();
> 03
> 04                       HttpURLConnection c = (HttpURLConnection)
> u.openConnection();
> 05                       c.setRequestProperty("Content-Type",
> "application/json; charset=UTF-8");
> 06                       c.setDoOutput(true);
> 07                       c.setRequestMethod("POST");
> 08                       OutputStreamWriter w = new
> OutputStreamWriter(c.getOutputStream());
> 09                       w.write(s);
> 10                       w.close();
> 11                       int r = c.getResponseCode();
> 12                       if(r == HttpURLConnection.HTTP_OK) {
> 13                               //SUCCESS
> 14                       }
> 15                       else {
> 16                              //FAILURE
> 17                       }
> ...
>
> Now, when I test this snippet via the development server (http://
> localhost:) the post data is written properly to the url u.
> However when I deploy this to the production server (http://
> myapp.appspot.com) the non-ascii data is converted to question marks
> (?).
>
> I understand that setting the Content-Type as above should be
> sufficient to dispatch the data to the url u.
> I could understand this to be a problem at the url u end if both the
> developement and production side behavior was the same. However that
> is not the case, the problem occurs only in the production server.
>
> Does anyone have a similar experience? Is there a setting in web.xml/
> appengine-web.xml that is missing?
>
> I could see a similar post 
> here:http://groups.google.com/group/google-appengine-java/browse_thread/th...
>
> I am not sure if the query was resolved, but that question mentions a
> difference in the behavior between development and production too.
>
> This is on GAE 1.3.5. I could upgrade to GAE 1.3.6 if that helps (I
> would upgrade today anyway and check if there is a difference in
> behavior but none is mentioned in the release notes.)
>
> Any pointers/workarounds would be appreciated.
>
> Regards
>
> Alok

-- 
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] JDO: How to obtain the key of an object

2010-08-23 Thread Albin Vlc
I'm absolutly new in JDO. I'm trying to relate houses and counties.

For counties I have this class:

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

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private String idCounty;

@Persistent private String name;

public Prov(String id, String name) {
this.idCounty = id;
this.name = name;
}
...
}

For houses I have this class:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class House {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long idHouse;

@Persistent private String title;
@Persistent private Integer price;
@Persistent private Key county;   this is how the gae tutorial
recomends to do it

...

public void setCounty(County county) {
this.prov = KeyFactory.stringToKey(prov.getCodProv());  this
is how I thought I could get the key AND this is the point where it
throws the exception
}
...
}

And thats the code that throws the
County county = new County("46", "Valencia");
pm.makePersistent(county);

House house = ...
house.setCounty(county);
pm.makePersistent(house);

That's what I get:
java.lang.IllegalArgumentException: Invalid Key PB: no elements.

Thank you 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-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] Adobe air support in GAE

2010-08-23 Thread aptest1 actiprocess
HI,

Is it possible to use adobe air in GAE.

Thanks
Mahesh

-- 
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] can we use Web-services in Gooogle app engine

2010-08-23 Thread aptest1 actiprocess
Hi,

We are planning to use web-services in Google app to communicate with
SAP-system.

1.Is Google app engine supports the Web-services?
2.can we use web-services in Google app engine?

Thanks in advance
Chandrashaker Gattu

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