[appengine-java] Re: How to HTTP Request a public Google Doc from GAE Java?

2011-09-15 Thread Slaine
Hi all,
Apparently this issue is no longer taking place. I guess this was a
defect and solved in the meantime.

BR

On Aug 16, 4:58 pm, Lennart Benoot  wrote:
> Thanks for your feedback.
> Correct me if I'm wrong but I believe what you are referring to is
> authenticated access to these documents. That's what I want to avoid and why
> these documents are web published and accessible to all.
>
> Or is it possible tot retreive these documents with gdata client without
> being authenticated when document is published on the web?
>
> If so, do you happen to have some example code?
>
> BR
>
> On 16 August 2011 16:07, Aswath Satrasala wrote:
>
>
>
>
>
>
>
> > Hi,
> > You can use gdata-java-client
> >http://code.google.com/p/gdata-java-client/
>
> > Also, look at
> >http://code.google.com/appengine/articles/java/retrieving_gdata_feeds...
>
> > -Aswath
> >www.AccountingGuru.in.
>
> > On Tue, Aug 16, 2011 at 1:38 AM, Slaine  wrote:
>
> >> Hi all,
>
> >> Does anyone know how a public (web published) Google doc can be
> >> requested with HTTP from GAE Java?
>
> >> I used to do this with this very straight forward code but for some
> >> reason, it does not work anymore.
>
> >> URL url = new URL(requestUrl.toString());
> >> BufferedReader in = new BufferedReader(new
> >> InputStreamReader(   url.openStream()));
> >> String inputLine;
> >>  while ((inputLine = in.readLine()) != null) {
> >>  str = str +  inputLine + "\n";
> >>  }
> >> in.close();
> >> return str;
>
> >> I have done a similar post but with rather cryptic title so I
> >> rephrased here.
>
> >>http://groups.google.com/group/google-appengine-java/browse_thread/th...
>
> >> BR & All help really appreciated!
>
> >> --
> >> 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] Re: Channel Javascript exception: CustomError: Service for "ea" is not registered

2011-09-15 Thread Ami Ganguli
Now it's working again, with no changes whatsoever, and no indication of 
anything amiss in my logs.

I wish I knew what to make of this.  If I have mysterious outages during 
testing then it doesn't lend much confidence that this will work in 
production with real load.


-- 
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/-/XD_47SvgKCEJ.
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] Channel Javascript exception: CustomError: Service for "ea" is not registered

2011-09-15 Thread Ami Ganguli
Hi all,

I've been testing a small app that uses the Channel service.  As of this 
morning, my client is unable to connect to the channel.  Instead I get a 
'Service for "ea" is not registered' exception.  This has previously been 
working for a few days without incident.

The rest of the application seems to be functioning properly.  There are no 
errors in the log and none of my quotas are anywhere close to being used up.

Does anybody have any ideas on what the problem might be, or how I can 
proceed to debugging it?  As near as I can tell the Channel Service is a bit 
of a black box - great if it works, but no obvious way to dig deeper if 
something goes wrong.

Regards,
Ami.

-- 
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/-/veRaUP0FsVAJ.
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] Developing Multilingual Web Applications Using JavaServer Pages Technology

2011-09-15 Thread Jesper Nyqvist
I have a web page which has 3 different languages, Swedish, English and 
Russian! In my old java page i set this up with WebTexts_en.properties, 
WebTexts_sv.properties and WebTexts_ry.properties files together with 
LangSupport.jsp to chose the Locale for the browser. All my jsp pages has 
UTF-8 encoding so this should be correct as well i think.

Now i have moved my page to Google APP Engine and i wonder if there is 
anybody who have some input on how to make this here? Should is use the same 
principal or do Google have some other ideas on how to make this work for 
me? My old setup is taken from sun, oracle today but i would like to know if 
Goole have any other ideas or if i should follow the old concept for this?

Oracle

-- 
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/-/qtY1VhmfBQkJ.
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] You do not have permission to modify this app

2011-09-15 Thread Ken Bowen
I've got a problem trying to upload to a newly created application
named 'wnaccess' in the applications for applied-logic-systems.com;
I'm in the role of application Owner.

Based on some searches, I ensured that the file .appcfg_cookies is not
present in my home directory.

I also ensured that:
Google Apps Manager Dashboard login was successful as
ken.bo...@applied-logic-systems.com

Google App Engine My Applications login was successful as
ken.bo...@applied-logic-systems.com at
https://appengine.google.com/a/applied-logic-systems.com

I'm currently running SDK version 1.5.0 in the Eclipse plugin.
With the two logins above currently active in different browser tabs,
I attempted to upload to the new application 'wnaccess' for the first
time.  The result on the console was this:

Created staging directory at: '/var/folders/EM/EMFo-6hIHsqSzUcUq--t1E++
+TI/-Tmp-/appcfg1791187681661511906.tmp'
Scanning for jsp files.
Scanning files on local disk.
Scanned 250 files.
Scanned 500 files.
Initiating update.
java.io.IOException: Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=wnaccess&version=1&;
403 Forbidden
You do not have permission to modify this app (app_id=u'wnaccess').

Note that it did not ask me for an email or password.
I've worked on GAE applications for another company for a couple of
years, and I can't see what I'm doing differently here.
Can anyone help me figure out what is going wrong here or what my
mistake is?
Thanks in advance,
Ken

-- 
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: Set password for appcfg.sh update

2011-09-15 Thread Fábio Uechi
You can use an expect script  like 
this:

*set username [lrange $argv 0 0]*
*set password [lrange $argv 1 1]*
*set warDir [lrange $argv 2 2]*
*set gaeHome [lrange $argv 3 3]*
*set timeout -1*
*
*
*# spawns appcfg.sh*
*spawn $gaeHome/bin/appcfg.sh --passin --email=$username update $warDir*
*match_max 10*
*
*
*expect {*
*   default {exit 0}*
*   # Look for passwod prompt*
*   "*?assword*"*
*}*
*
*
*# Send password aka $password*
*send -- "$password\r"*
*
*
*# send blank line (\r) to make sure we get back to gui*
*send -- "\r"*
*expect eof*

-- 
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/-/73r9YlZjy6gJ.
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] How to efficiently retrieve all the keys of a particular entity

2011-09-15 Thread Ravi Sharma
Did u try Cursors?
http://code.google.com/appengine/docs/java/datastore/queries.html#Query_Cursors


On Thu, Sep 15, 2011 at 1:20 PM, cghersi  wrote:

> Hi all,
>
> I'm facing a little problem of scalability. I'm using JDO to query my
> datastore.
> I need to retrieve all the keys of a given entity (such keys are of
> type Long). Given that in my datastore such entity has 1.000.000 of
> records, I need to get them in a very efficient way, in order to loop
> over this set in a background task.
>
> Which is the most efficient way to do this?
>
> And what if I need not only the key, but also another field? Let's say
> I've got an entity called TPImage:
> Long idPic; //this is my key
> String title; //this is the field I want to retrieve together with the
> key
> ... // other properties
>
> How may I retrieve both idPic and title in a single efficient query?
> Something like
> Query q = new Query("select idPic, title from " +
> TPImage.class.getName());
> but more efficient?
>
> Thank you very much!
>
> Bye
> cghersi
>
> --
> 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 efficiently retrieve all the keys of a particular entity

2011-09-15 Thread cghersi
Hi all,

I'm facing a little problem of scalability. I'm using JDO to query my
datastore.
I need to retrieve all the keys of a given entity (such keys are of
type Long). Given that in my datastore such entity has 1.000.000 of
records, I need to get them in a very efficient way, in order to loop
over this set in a background task.

Which is the most efficient way to do this?

And what if I need not only the key, but also another field? Let's say
I've got an entity called TPImage:
Long idPic; //this is my key
String title; //this is the field I want to retrieve together with the
key
... // other properties

How may I retrieve both idPic and title in a single efficient query?
Something like
Query q = new Query("select idPic, title from " +
TPImage.class.getName());
but more efficient?

Thank you very much!

Bye
cghersi

-- 
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] Why is a new entity persisted to the default namespace despite NamespaceManager.get() returning "foo"?

2011-09-15 Thread Jens Stoltenberg
*I'm trying to save the `foo` entity to the `foo` namespace. But it always
ends up in the default namespace even though `NamespaceManager.get()` always
returns `foo`.*

*Steps:*

*1. The namespace is set to `foo` before the `storeModel` method is called.*
*
*
*2. At each step of this method, `NamespaceManager.get()` is called to
verify that the namespace is still set to `foo`.*



public Foo storeModel(Foo foo) {
>
>
> logit.warn("namespace:" + NamespaceManager.get()); // namespace =
> "foo"
>
> PersistenceManager pm = getPersistenceManager();
>
> logit.warn("namespace:" + NamespaceManager.get()); // namespace =
> "foo"
>
> pm.makePersistent(foo);
>
> logit.warn("namespace:" + NamespaceManager.get()); // namespace =
> "foo"
>
> pm.close();
>
> logit.warn("namespace:" + NamespaceManager.get()); // namespace =
> "foo"
>
> return foo;
>
> }


How is it possible that this entity is persisted *to the default
namespace*every time even though
*NamespaceManager.get()* returns *foo*?

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