[appengine-java] Re: Memory based application, static field, data lost

2010-10-27 Thread Ian Marshall
Indeed.

Don't rely on the mem cache to keep your pictures for a long time,
since they will eventually be removed from the cache. The datastore is
GAE's sole persistent data store (except queued tasks in a non-
databasey way), and GAE give us a free amount of storage.


On Oct 26, 5:03 pm, nischalshetty  wrote:
> GAE runs multiple instances which means your code would be run on
> multiple JVMs as well which means the static field will be multiple as
> well. A lot of "as wells" here but I hope you get the point.
>
> Use statics for constants that do not change. For everything else
> persist either in memcache or datastore.
>
> -N
>
> On Oct 26, 4:17 pm, yoyo  wrote:
>
> > Thanks for your answear.
>
> > So, GOE discard instances in cases of low usage. I didn't know.
>
> > My app is an image board, like 4chan.org.
>
> > The blowstore api in only available for billing account.
> > I can't use the blowstore because my app isn't commercial. I write it
> > only for fun and i don't want to pay for it.
>
> > I'll use the memcache service. It's not important if some of pictures
> > are lost. There is no guarantee, but I hope keep most of pictures into
> > it.
> > Else... well I'll see.
>
> > I've some refactoring to do. Thanks again for your answear.
>
>

-- 
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: Sharing a PersistenceManagerFactory instance between web application instances

2010-10-27 Thread Ian Marshall
Thanks, Ikai. I'll bear the low-level API in mind, but I try to avoid
this to make my application as portable as possible.


On Oct 26, 8:09 pm, "Ikai Lan (Google)" 
wrote:
> No, you can't share a PMF instance between app instances. Constructing this
> is slow because it has to do classpath scanning. Note that if you use the
> low-level API, application startup time is greatly reduced:
>
> http://code.google.com/appengine/docs/java/javadoc/com/google/appengi...
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger:http://googleappengine.blogspot.com
> Reddit:http://www.reddit.com/r/appengine
> Twitter:http://twitter.com/app_engine
>
> On Tue, Oct 26, 2010 at 3:32 AM, Ian Marshall wrote:
>
> > As we all know, the construction of a PersistenceManagerFactory (PMF)
> > instance that is needed for exchanging data with the datastore is
> > slow.
>
> > To speed up the showing of my home page (which does not need data from
> > the datastore), my application creates a queued task at launch-time,
> > which constructs its singleton PMF instance asynchronously. This way,
> > the creation of my PMF does not add to spin-up (and other?) delays to
> > app start-up.
>
> > Can a PMF instance be shared between application instances?
>
> > If so, I could hasten app initialisation by getting an already-
> > existing PMF instance from the memory cache and only construct one if
> > it is no longer in the memory cache.
>
> > --
> > 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: Memory based application, static field, data lost

2010-10-27 Thread Simon
Yoyo, you are aware that you only have to enable your account as
billable and that it doesn't actually cost anything as long as you
stay within the free quota?  See the Quota page for more info (http://
code.google.com/appengine/docs/quotas.html#Blobstore)

On Oct 27, 9:12 am, Ian Marshall  wrote:
> Indeed.
>
> Don't rely on the mem cache to keep your pictures for a long time,
> since they will eventually be removed from the cache. The datastore is
> GAE's sole persistent data store (except queued tasks in a non-
> databasey way), and GAE give us a free amount of storage.
>
> On Oct 26, 5:03 pm, nischalshetty  wrote:
>
> > GAE runs multiple instances which means your code would be run on
> > multiple JVMs as well which means the static field will be multiple as
> > well. A lot of "as wells" here but I hope you get the point.
>
> > Use statics for constants that do not change. For everything else
> > persist either in memcache or datastore.
>
> > -N
>
> > On Oct 26, 4:17 pm, yoyo  wrote:
>
> > > Thanks for your answear.
>
> > > So, GOE discard instances in cases of low usage. I didn't know.
>
> > > My app is an image board, like 4chan.org.
>
> > > The blowstore api in only available for billing account.
> > > I can't use the blowstore because my app isn't commercial. I write it
> > > only for fun and i don't want to pay for it.
>
> > > I'll use the memcache service. It's not important if some of pictures
> > > are lost. There is no guarantee, but I hope keep most of pictures into
> > > it.
> > > Else... well I'll see.
>
> > > I've some refactoring to do. Thanks again for your answear.

-- 
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: JSF 2.0 MyFaces problem with Ajax and Command Button

2010-10-27 Thread Daniel
First of all what version of mojarra you use?

In case you using the modified jar that was done by Josh for Google
App Engine SDK 1.2.6 you should using the original mojarra jars.

I wrote a short tutorial on how one can use the original mojarra jars

You can find it here:

[url]http://www.neverslair-blog.net/daniels-tips-and-tutorials/[/url]


Daniel.

On Oct 26, 11:06 am, "powell...@gmail.com" 
wrote:
> I cannot get Ajax to allow navigation to another page when a
> h:commandButton is clicked. I use the classic command given in texts
> as shown below but Ajax will always display the current page. In the
> example below, I want to transition to the page2.xhtml page when I
> click but I only get the current page redisplayed. I tried giving ajax
> attributes of execute="@form" and even render="@form" without success.
> Is this a known bug.
>
> 
> ...
> 
>    
> 
> 
>
> Dave

-- 
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: Channel API still not live...

2010-10-27 Thread stole
Thanks for the answer Ikai. I have another question which perhaps is a
bit off topic but I hope You will answer nevertheless. Will it be
possible to use the Channel API on Java clients (like Android) and not
only from within browsers? It would be awesome.

Thanks again.

On Oct 26, 7:26 pm, "Ikai Lan (Google)" 
wrote:
> Very slim. We want to ship it as soon as possible.
>
> In the meantime, there are plenty of services that offer this type of
> functionality:
>
> http://beaconpush.comhttp://pubnub.com
>
> ... and so forth
>
> Don't let this feature block you if your application needs it. Build it
> using another tool and port it over when we are ready to release the Channel
> API for everyone.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger:http://googleappengine.blogspot.com
> Reddit:http://www.reddit.com/r/appengine
> Twitter:http://twitter.com/app_engine
>
>
>
>
>
>
>
> On Tue, Oct 26, 2010 at 12:41 AM, stole  wrote:
> > Thanks everybody for the info. I just needed to see what are the
> > chances for getting the API activated soon (this week). From Your
> > answers I'd say very slim.
>
> > On Oct 26, 8:16 am, Heiko Roth  wrote:
> > > No activation yet.
> > > I'm waiting, too.
>
> > > Right now, we pull status every 5 minutes, but that's not the best
> > > way.
> > > Other APIs like Pushlet don't work on 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 > 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.



Re: [appengine-java] Re: Memory based application, static field, data lost

2010-10-27 Thread yoyo
Thanks for your advices.

I'll use the datastore and the blobstore.

When I first write my app, I supposed my static field will probably be drop
by GAE, because of the non-use of API like memcache or datastore.
I try it, for fun and curiosity. It was interesting to understand WHY it was
a bad idea to do this.

Thanks again for your answear, and have a nice day.

2010/10/27 Simon 

> Yoyo, you are aware that you only have to enable your account as
> billable and that it doesn't actually cost anything as long as you
> stay within the free quota?  See the Quota page for more info (http://
> code.google.com/appengine/docs/quotas.html#Blobstore)
>
> On Oct 27, 9:12 am, Ian Marshall  wrote:
> > Indeed.
> >
> > Don't rely on the mem cache to keep your pictures for a long time,
> > since they will eventually be removed from the cache. The datastore is
> > GAE's sole persistent data store (except queued tasks in a non-
> > databasey way), and GAE give us a free amount of storage.
> >
> > On Oct 26, 5:03 pm, nischalshetty  wrote:
> >
> > > GAE runs multiple instances which means your code would be run on
> > > multiple JVMs as well which means the static field will be multiple as
> > > well. A lot of "as wells" here but I hope you get the point.
> >
> > > Use statics for constants that do not change. For everything else
> > > persist either in memcache or datastore.
> >
> > > -N
> >
> > > On Oct 26, 4:17 pm, yoyo  wrote:
> >
> > > > Thanks for your answear.
> >
> > > > So, GOE discard instances in cases of low usage. I didn't know.
> >
> > > > My app is an image board, like 4chan.org.
> >
> > > > The blowstore api in only available for billing account.
> > > > I can't use the blowstore because my app isn't commercial. I write it
> > > > only for fun and i don't want to pay for it.
> >
> > > > I'll use the memcache service. It's not important if some of pictures
> > > > are lost. There is no guarantee, but I hope keep most of pictures
> into
> > > > it.
> > > > Else... well I'll see.
> >
> > > > I've some refactoring to do. Thanks again for your answear.
>
> --
> 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.



Re: [appengine-java] Re: Java while statement bug on GAE server?

2010-10-27 Thread hirokazu usui
Wow Thank you Don

you have a very keen eye.



On Wed, Oct 27, 2010 at 12:53 AM, l.denardo wrote:

> I need a good pair of glasses :-)
>
> On Oct 26, 5:42 pm, Don Schwarz  wrote:
> > Yes, it's a bug in your code:
> >
> > > while(tempFlag == true);
> >
> > Note the semicolon.  Try removing it.
> >
> > On Tue, Oct 26, 2010 at 10:22 AM, doc123  wrote:
> > > Sorry to use specific sample code.  So I tried more basic following
> code.
> >
> > > try
> > > {
> >
> > > int i =0;
> >
> > > boolean tempFlag = false;
> >
> > > while(tempFlag == true);
> >
> > > {
> >
> > > i++;
> >
> > > out.println("tempFlag" + i + ":=" + tempFlag);
> >
> > > tempFlag = false;
> >
> > > }
> >
> > > }
> > > catch(Exception e)
> > > {
> >
> > > out.println("Error" + e.toString());
> >
> > > }
> >
> > > what I got is  "tempFlag1:=false"  but out.print is within
> a while(tempFlag
> > > == true) bock.
> > > I think this is bug.
> >
> > > --
> > > 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.
>
>

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



[appengine-java] How can I keep the data saved in JDO datastore?

2010-10-27 Thread qiwawa
I wanted to keep the data when upgrading my app to a new version. How
can I do this?

Each time I upgrade it it looks like my data was lost. There is no way
in admin area that i can back up my data before upgrade.

Thanks.

Q

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



[appengine-java] Re: 1.3.8 Console Logging Issue

2010-10-27 Thread Raymond
I'm facing the same issue too.

On Oct 26, 11:47 am, Dan Dubois  wrote:
> I am getting the same problem but still on GWT 2.0.3. It must be an
> app engine java dev server problem.
>
> On Oct 25, 6:04 am, vvorski  wrote:
>
>
>
>
>
>
>
> > Same here with python on a Mac. Have heard reports of same with Java
> > on windows. Seems to be a global1.3.8problem?
>
> > V/.
>
> > On Oct 24, 9:04 pm, jt  wrote:
>
> > > Hello,
>
> > > I upgraded my project from 1.3.4 to1.3.8. After the upgrade, the
> > > console fails to log. If I switch back to 1.3.4, the console logs
> > > properly.
>
> > > I am on a 64-bit Windows Vista environment, running Eclipse 3.4.2 w/
> > > (MyEclipse and Instantiations GWT tools)
>
> > > Thanks

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



Re: [appengine-java] blobstore - map returned empty

2010-10-27 Thread Ikai Lan (Google)
What does your upload page look like? Can you post the full servlet?

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



On Tue, Oct 26, 2010 at 4:12 PM, pac  wrote:

> I am trying to use  BlobstoreService locally.
> But map is returned empty by following line in servlet:
> Map blobs = blobstoreService.getUploadedBlobs(req);
>
> I was following post from  http://ikaisays.com/  (also using gwt as
> front end)  but I guess I might have missed something, any thoughts?
> 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.
>
>

-- 
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] Re: recommendation on using maxmind geoip

2010-10-27 Thread Ikai Lan (Google)
It's not required to use mapreduce. It's just easier to manage the jobs.
You'll hit the 30 second deadline if you don't, and you'll end up building
your own task queue management logic anyway.

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



On Tue, Oct 26, 2010 at 10:00 PM, asianCoolz  wrote:

> hello @Ikai, is it required to use mapreduce . why not get the byte
> stream from blockstore and create  new file(..) ? there is no limit on
> new file(..) and byte[] array in gae right?
>
> --
> 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.



Re: [appengine-java] Re: Channel API still not live...

2010-10-27 Thread Ikai Lan (Google)
I'm not sure about that. It's my understanding that the Channel API depends
on generated Javascript, so if you can interpret that, why not? I haven't
looked much into how comet is being implemented in the Channel API - I know
there's a long-polling implementation as a fallback. Using a non-browser
client would be an undocumented use case, but I don't see why it couldn't be
done.

When you have a mobile client or a Java client, can't you use XMPP?

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



On Wed, Oct 27, 2010 at 3:02 AM, stole  wrote:

> Thanks for the answer Ikai. I have another question which perhaps is a
> bit off topic but I hope You will answer nevertheless. Will it be
> possible to use the Channel API on Java clients (like Android) and not
> only from within browsers? It would be awesome.
>
> Thanks again.
>
> On Oct 26, 7:26 pm, "Ikai Lan (Google)" 
> 
> >
> wrote:
> > Very slim. We want to ship it as soon as possible.
> >
> > In the meantime, there are plenty of services that offer this type of
> > functionality:
> >
> > http://beaconpush.comhttp://pubnub.com
> >
> > ... and so forth
> >
> > Don't let this feature block you if your application needs it. Build it
> > using another tool and port it over when we are ready to release the
> Channel
> > API for everyone.
> >
> > --
> > Ikai Lan
> > Developer Programs Engineer, Google App Engine
> > Blogger:http://googleappengine.blogspot.com
> > Reddit:http://www.reddit.com/r/appengine
> > Twitter:http://twitter.com/app_engine
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Oct 26, 2010 at 12:41 AM, stole  wrote:
> > > Thanks everybody for the info. I just needed to see what are the
> > > chances for getting the API activated soon (this week). From Your
> > > answers I'd say very slim.
> >
> > > On Oct 26, 8:16 am, Heiko Roth  wrote:
> > > > No activation yet.
> > > > I'm waiting, too.
> >
> > > > Right now, we pull status every 5 minutes, but that's not the best
> > > > way.
> > > > Other APIs like Pushlet don't work on 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 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.
>
>

-- 
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: JSF 2.0 MyFaces problem with Ajax and Command Button

2010-10-27 Thread Daniel
1) You sure that page2.xhtml is exists?
2) have you tried 

does it work for you?

3) I tried your code on latest mojarra implementation.. and it works
fine...
If i were you, i would try to build a dynamic project in eclipse
and use the latest myfaces jars instead of which you use now... and if
it will work... than blame the jars you use (maybe they out dated),
and you can always switch to the mojarraimplementation

Regards.

Daniel

On Oct 27, 11:40 am, Daniel  wrote:
> First of all what version of mojarra you use?
>
> In case you using the modified jar that was done by Josh for Google
> App Engine SDK 1.2.6 you should using the original mojarra jars.
>
> I wrote a short tutorial on how one can use the original mojarra jars
>
> You can find it here:
>
> [url]http://www.neverslair-blog.net/daniels-tips-and-tutorials/[/url]
>
> Daniel.
>
> On Oct 26, 11:06 am, "powell...@gmail.com" 
> wrote:
>
> > I cannot get Ajax to allow navigation to another page when a
> > h:commandButton is clicked. I use the classic command given in texts
> > as shown below but Ajax will always display the current page. In the
> > example below, I want to transition to the page2.xhtml page when I
> > click but I only get the current page redisplayed. I tried giving ajax
> > attributes of execute="@form" and even render="@form" without success.
> > Is this a known bug.
>
> > 
> > ...
> > 
> >    
> > 
> > 
>
> > Dave

-- 
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: blobstore - map returned empty

2010-10-27 Thread pac
Hi Ikai,

Upload page is a composite, in which I have a decorator panel which
contains another composite which has FormPanel (Upload field)

As for servlet code:


public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
String userIdStr = req.getParameter(IAppConstants.PARAM_UserId);

Map blobs = 
blobstoreService.getUploadedBlobs(req);

BlobKey blobKey = blobs.get(IAppConstants.PARAM_MyFile);
.
.
.

blobs returned  is empty and so blobKey is null.

IAppConstants.PARAM_MyFile is name of upload field at client side
i.e.

uploadField.setName(IAppConstants.PARAM_MyFile);

In servlet if I do

String myFile = req.getParameter(IAppConstants.PARAM_MyFile);
then myFile is also null.

Upload form at client does have

uploadForm.setEncoding(FormPanel.ENCODING_MULTIPART);
uploadForm.setMethod(FormPanel.METHOD_POST);

Any suggestions?
Thanks.

On Oct 27, 7:28 pm, "Ikai Lan (Google)" 
wrote:
> What does your upload page look like? Can you post the full servlet?
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger:http://googleappengine.blogspot.com
> Reddit:http://www.reddit.com/r/appengine
> Twitter:http://twitter.com/app_engine
>
> On Tue, Oct 26, 2010 at 4:12 PM, pac  wrote:
> > I am trying to use  BlobstoreService locally.
> > But map is returned empty by following line in servlet:
> > Map blobs = blobstoreService.getUploadedBlobs(req);
>
> > I was following post from  http://ikaisays.com/ (also using gwt as
> > front end)  but I guess I might have missed something, any thoughts?
> > 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.

-- 
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] Re: blobstore - map returned empty

2010-10-27 Thread Ikai Lan (Google)
That looks right to me. Strange ... can you compare your code against this
project? It's some sample code I whipped up a while ago. Here's the GWT
upload widget:

http://github.com/ikai/gwt-gae-image-gallery/blob/master/src/com/ikai/photosharing/client/widgets/UploadPhoto.java

Here's the servlet that handles uploads:

http://github.com/ikai/gwt-gae-image-gallery/blob/master/src/com/ikai/photosharing/server/UploadServlet.java

I've seen this happen before when the name isn't set correctly. Can you look
into the generated source using a tool like Firebug to see if the form is
being generated correctly?


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



On Wed, Oct 27, 2010 at 3:51 PM, pac  wrote:

> Hi Ikai,
>
> Upload page is a composite, in which I have a decorator panel which
> contains another composite which has FormPanel (Upload field)
>
> As for servlet code:
>
>
>public void doPost(HttpServletRequest req, HttpServletResponse res)
>throws ServletException, IOException
>{
>String userIdStr =
> req.getParameter(IAppConstants.PARAM_UserId);
>
>Map blobs =
> blobstoreService.getUploadedBlobs(req);
>
> BlobKey blobKey = blobs.get(IAppConstants.PARAM_MyFile);
>.
>.
>.
>
> blobs returned  is empty and so blobKey is null.
>
> IAppConstants.PARAM_MyFile is name of upload field at client side
> i.e.
>
> uploadField.setName(IAppConstants.PARAM_MyFile);
>
> In servlet if I do
>
>String myFile =
> req.getParameter(IAppConstants.PARAM_MyFile);
> then myFile is also null.
>
> Upload form at client does have
>
>  uploadForm.setEncoding(FormPanel.ENCODING_MULTIPART);
>uploadForm.setMethod(FormPanel.METHOD_POST);
>
> Any suggestions?
> Thanks.
>
> On Oct 27, 7:28 pm, "Ikai Lan (Google)" 
> 
> >
> wrote:
> > What does your upload page look like? Can you post the full servlet?
> >
> > --
> > Ikai Lan
> > Developer Programs Engineer, Google App Engine
> > Blogger:http://googleappengine.blogspot.com
> > Reddit:http://www.reddit.com/r/appengine
> > Twitter:http://twitter.com/app_engine
> >
> > On Tue, Oct 26, 2010 at 4:12 PM, pac  wrote:
> > > I am trying to use  BlobstoreService locally.
> > > But map is returned empty by following line in servlet:
> > > Map blobs = blobstoreService.getUploadedBlobs(req);
> >
> > > I was following post from  http://ikaisays.com/ (also using gwt as
> > > front end)  but I guess I might have missed something, any thoughts?
> > > 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.
>
> --
> 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: How can I keep the data saved in JDO datastore?

2010-10-27 Thread qiwawa
Is this a non-issue at all? Anyone?
Thank you.

On Oct 26, 7:37 pm, qiwawa  wrote:
> I wanted to keep the data when upgrading my app to a new version. How
> can I do this?
>
> Each time I upgrade it it looks like my data was lost. There is no way
> in admin area that i can back up my data before upgrade.
>
> Thanks.
>
> Q

-- 
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] Text enclosed with

2010-10-27 Thread Michael Boswell
I have a com.google.appengine.api.datastore.Text object stored in the
datastore, when examined through the datastore viewer, it reads as it
should e.g. 'this is a test'


I retrieve it with a


public Text getData() {
return data;
}


then write it out with getWriter, however I'm getting  instead of just 'this is a test'


Sure I'm doing something daft! I'm rather new to java.


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.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Eclipse plugin insists on copying DataNucleus jars to war/WEB-INF/lib

2010-10-27 Thread Peter Liu
Hi Max,

Does it copy on startup or build?

I am using Eclipse 3.5 , 3.6 and it doesn't copy to lib always. It
happens when SDK is changed or maybe on startup.

Regardless, I wanted to do the same thing and what I did is write an
ANT task that runs every build.
The ANT task removed the libs that I don't want, including the JDO
classes.

Looking at the list of libs, how do you get rid of:

> geronimo-jpa_3.0_spec-1.1.1.jar
> geronimo-jta_1.1_spec-1.1.1.jar
> jsr107cache-1.1.jar

I remember when I remove those, something won't work. Maybe I need to
try again, but those files are very small anyway.

I also remove the MapReduce libs when I don't need to run data
migration task. One of those libs are huge.


On Oct 26, 9:45 am, Maxim Veksler  wrote:
> Hello,
>
> My project needs only 2 jars from GAE/J:
> appengine-api-1.0-sdk-1.3.8.jar
> appengine-api-labs-1.3.8.jar
>
> The rest of the jars supplied by the plugin are API's that are not used by
> our application and thus not required as part of the deployment:
> appengine-jsr107cache-1.3.8.jar
> datanucleus-appengine-1.0.7.final.jar
> datanucleus-core-1.1.5.jar
> datanucleus-jpa-1.1.5.jar
> geronimo-jpa_3.0_spec-1.1.1.jar
> geronimo-jta_1.1_spec-1.1.1.jar
> jdo2-api-2.3-eb.jar
> jsr107cache-1.1.jar
>
> I've tried to delete these jars and deployed the app to GAE/J -- It works
> great and the application is running happily ever after.
>
> The thing is GAE Eclipse plugin insists on recopying the jars to the project
> war/WEB-INF/lib folder (* it's unclear the when it decides to do so).
> I even tried to edit the values of filesCopiedToWebInfLib from the settings
> file .settings/com.google.appengine.eclipse.core.prefs which also did not
> help (further more -- The plugin just updated this entry back to it's
> original state... why put a configuration option if you ignore it?)
>
> I want these jars removed for 2 reasons:
> - 1. It makes the project lighter, removes clutter and is generally better
> to pull small project over wire.
> - 2. I remember reading in the mailing list that fewer jars help improve the
> application cold start times. I'm not talking about projects like spring
> that have large startup penalty but simply having "jar flles" in the
> classpath. Don't know if this is true and I haven't done any benchmarks to
> verify this. OTOH to be on the safe side -- Why test if I can simply not
> upload the unwanted jars and be done with it?
>
> So, in conclusion - What is the proper method (if any) to instruct GAE
> Eclipse Plugin to skip checking and copying of jar's that are "basic GAE sdk
> jars" into my WEB-LIB/lib folder?
>
> Thanks for reading,
> Maxim.

-- 
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] datastore viewer's GQL

2010-10-27 Thread pman
i have following record in the datastore.

datastore ABC
===
ID/Name title   message user
===

and the user is the object.


how to run GQL to filter a particular user's record - user
(ag1udW1iZXJzaaD9wejAxcgsLEgRVc2VyGOkHKK
User: id=100100)

??

select * from ABC where user = User(100100) (not working).


any help?

-- 
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: uploaded file how to view in browser

2010-10-27 Thread prabu
Hi..
  Thanks for ur reply.
Content Type "application/octet-stream is working fine but same
operation doing for Content Type  "application/pdf.

i want view pdf in browser like image view in browser.

If have any idea help me.

-- 
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] mapreduce job is not aborted

2010-10-27 Thread aswath satrasala
Hello,
On my app-id vs-accounting.appspot.com, I started a mapreduce job.  It did
not run, because the Entity did not had decreasing index.  The status is now
showing with the link abort
After clicking on the abort, the job is not aborted.  I look at the logs,
and it is continuously performing something every minute.
Can you help me in aborting the job.

Regards
Aswath
http://vs-accounting.appspot.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.



[appengine-java] Re: Channel API still not live...

2010-10-27 Thread stole
Thanks for the tip. It hadn't cross my mind to use XMPP. I'll
investigate that. However it would be nice to use one kind of push
service for all my clients and not to have to learn another API.

Thanks again.

On Oct 27, 8:40 pm, "Ikai Lan (Google)" 
wrote:
> I'm not sure about that. It's my understanding that the Channel API depends
> on generated Javascript, so if you can interpret that, why not? I haven't
> looked much into how comet is being implemented in the Channel API - I know
> there's a long-polling implementation as a fallback. Using a non-browser
> client would be an undocumented use case, but I don't see why it couldn't be
> done.
>
> When you have a mobile client or a Java client, can't you use XMPP?
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger:http://googleappengine.blogspot.com
> Reddit:http://www.reddit.com/r/appengine
> Twitter:http://twitter.com/app_engine
>
>
>
>
>
>
>
> On Wed, Oct 27, 2010 at 3:02 AM, stole  wrote:
> > Thanks for the answer Ikai. I have another question which perhaps is a
> > bit off topic but I hope You will answer nevertheless. Will it be
> > possible to use the Channel API on Java clients (like Android) and not
> > only from within browsers? It would be awesome.
>
> > Thanks again.
>
> > On Oct 26, 7:26 pm, "Ikai Lan (Google)" 
> > 
>
> > wrote:
> > > Very slim. We want to ship it as soon as possible.
>
> > > In the meantime, there are plenty of services that offer this type of
> > > functionality:
>
> > >http://beaconpush.comhttp://pubnub.com
>
> > > ... and so forth
>
> > > Don't let this feature block you if your application needs it. Build it
> > > using another tool and port it over when we are ready to release the
> > Channel
> > > API for everyone.
>
> > > --
> > > Ikai Lan
> > > Developer Programs Engineer, Google App Engine
> > > Blogger:http://googleappengine.blogspot.com
> > > Reddit:http://www.reddit.com/r/appengine
> > > Twitter:http://twitter.com/app_engine
>
> > > On Tue, Oct 26, 2010 at 12:41 AM, stole  wrote:
> > > > Thanks everybody for the info. I just needed to see what are the
> > > > chances for getting the API activated soon (this week). From Your
> > > > answers I'd say very slim.
>
> > > > On Oct 26, 8:16 am, Heiko Roth  wrote:
> > > > > No activation yet.
> > > > > I'm waiting, too.
>
> > > > > Right now, we pull status every 5 minutes, but that's not the best
> > > > > way.
> > > > > Other APIs like Pushlet don't work on 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 > > >  unsubscr...@googlegroups.com> > unsubscr...@googlegroups.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-appengine-java?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com > 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.