[appengine-java] Re: cron job fails but there are no errors

2010-05-31 Thread RockyWolf
The problem was solved. Making the version as default solved the
problem.

On May 31, 2:51 pm, RockyWolf  wrote:
> I checked it out again and this time there were some warnings in the
> Logs that said," No handlers matched this URL" . But the web.xml andcron.xml 
> seem to be okay.So I don't understand what the issue is.
>
> On May 28, 2:26 pm, RockyWolf  wrote:
>
>
>
> > I am testing acronjob. It gets uploaded fine,butfailson the
> > dashboard. Can't really figure out what the problem is.
>
> > I created acron.xml file in WEB-INF and put this in :
> > 
> >         
> >         /cron/mycronjob
> >         SimpleCronJobthat announces that it got invoked > description>
> >         every 1 minutes
> >         
> > 
>
> > In the web.xml  I included this:
>
> >         
> >                 ScrapCronServlet
> >                 
> > com.scrapbook.ScrapCronServlet
> >                
> >         
> >                 ScrapCronServlet
> >                 /cron/mycronjob
> >         
>
> > And in thecronservlet:
> > public class ScrapCronServlet extends HttpServlet{
> >          public void doGet(HttpServletRequest req, HttpServletResponse resp)
> > throws IOException {
>
> >           try {
> >          // _logger.info("CronJobhas been executed");
> >           String mesg="Cronjobwas executed ";
> >           ScrapMailServlet.sendEmail(mesg);
> >             //Put your logic here
> >           //BEGIN
> >           //END
> >             }
> >           catch (Exception ex) {
> >           //Log any exceptions in yourCronJob
> >                   //_logger.info("Cronjobhasnt worked");
> >                   }
> >          }
>
> >   @Override
> >   public void doPost(HttpServletRequest req, HttpServletResponse resp)
> > throws ServletException, IOException {
> >   doGet(req, resp);
> >   }
>
> > }
>
> > Has anyone else had this problem?- Hide quoted text -
>
> - Show quoted text -

-- 
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 to use Key as filter

2010-05-31 Thread ylmz
first of all you cannot use two set filter parameter

qry2.setFilter("key == keyParam");
qry2.setFilter("initialVersion <= version");

this is invalid.
qry2.setFilter("key == keyParam && initialVersion <= version");
combine them in one like that
and you cannot use two declare paramether either.

here is an example
http://openimageserver.svn.sourceforge.net/viewvc/openimageserver/OpenImageServer/tags/0.2.94%20beta/src/ois/model/impl/ModelManagerImpl.java?revision=98&view=markup
in line 188 you can see the query you are looking for (in
getImageFileByName method)

On May 30, 5:47 pm, Dormand  wrote:
> Hi, I have a persistance class. now i want to query with its key and
> other one field.
> I have tried in this waya
>
> Query qry2 = pm.newQuery(File.class);
> qry2.setFilter("key == keyParam");
> qry2.setFilter("initialVersion <= version");
> qry2.declareParameters("com.google.appengine.api.datastore.Key
> keyParam, long version");
>
> fileList = (List) qry2.execute(key, version);
>
> but it do not show any result

-- 
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] problems serializing 'java.lang.Long'

2010-05-31 Thread John Patterson
Your Long object was probably not found from examining your remote  
interface.  You can even put "dummy" methods or parameters on your  
remote interfaces (or classes directly referenced by them) just so the  
compiler picks up the fact that you need to be able to serialize them.


Also, you should avoid long or Long if possible because they are  
emulated on GWT (because there is no native Javascript long) and very  
slow.  Use int instead where ever you can.


On 26 May 2010, at 01:57, Iván Navarro wrote:


hi,
as I read in the Docs it must be no problem serializing Long values,
but anyway I have one.


com.google.gwt.user.client.rpc.SerializationException: Type
'java.lang.Long' was not included in the set of types which can be
serialized by this SerializationPolicy or its Class object could not
be loaded. For security purposes, this type will not be serialized.:
instance = 18
at
com 
.google 
.gwt 
.user 
.server 
.rpc 
.impl 
.ServerSerializationStreamWriter 
.serialize(ServerSerializationStreamWriter.java:

610)
at
com 
.google 
.gwt 
.user 
.client 
.rpc 
.impl 
.AbstractSerializationStreamWriter 
.writeObject(AbstractSerializationStreamWriter.java:

129)
	at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter

$ValueWriter$8.write(ServerSerializationStreamWriter.java:152)

This is is the servlet where I have the problem:

public class UserGServiceImpl extends RemoteServiceServlet implements
UserGService{

private static final long serialVersionUID = 7846225142061604894L;

public TrackerUser getCurrentUser(String requestUri) throws
IllegalArgumentException {
UserService userService = UserServiceFactory.getUserService();
   User user = userService.getCurrentUser();
   TrackerUser theTrackerUser = new TrackerUser();

   if (user != null){
theTrackerUser.setLoggedIn(true);

theTrackerUser.setLogoutUrl(userService.createLogoutURL(requestUri));
theTrackerUser.setMail(user.getEmail());
theTrackerUser.setNickName(user.getNickname());
DBTrackerUser theDBUser =
PrettyStorage.getTrackerUser(user.getEmail());
if (theDBUser == null){
Long userId =
PrettyStorage.insertTrackerUser(user.getEmail(), user.getNickname());
theTrackerUser.setUserId(userId.longValue());
}
else{
theTrackerUser.setUserId(theDBUser.getId());
}
   }
   else{
theTrackerUser.setLoggedIn(false);

theTrackerUser.setLoginUrl(userService.createLoginURL(requestUri));
   }

   return theTrackerUser;
}

}

And part of the TrackerUser class:

public class TrackerUser implements IsSerializable{

private boolean loggedIn = false;
private String loginUrl;
private String logoutUrl;
private Long userId;
private String mail;
private String nickName;

The most strange thing is that the problem only appears when the
DBUser == null and I have to insert a new one in the database.
For the moment I solve the issue changing type Long by long but I
still have the doubt of why it doesn't work.

Thanks,

Iván

--
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-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: problems serializing 'java.lang.Long'

2010-05-31 Thread Iván Navarro
Hi,
the same problem is still there, I just solve it changing Long for long, but
it is still a mistery.

Iván

2010/5/26 timwhunt 

> Try cleaning and rebuilding the project.  I had a similar error in a
> GAE + GWT project, and I think that's what solved it for me.  But I'm
> not sure I'm remembering right, so please report back if that or what
> else solves it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-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: node allocation

2010-05-31 Thread Tristan
Can you elaborate on what you mean by "node" in the context of Google
App Engine?

On May 30, 7:49 am, theresia freska  wrote:
> Hi list,
>
> Is there any way to control how many nodes we want to use? I want to
> compare request time of using n nodes to run my app. 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] How to use Key as filter

2010-05-31 Thread Chau Huynh
Check this out
http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html
Key is special datatype and you will need to use help API by Google to
re-create the key before passing it in.

On Sun, May 30, 2010 at 9:47 PM, Dormand  wrote:

> Hi, I have a persistance class. now i want to query with its key and
> other one field.
> I have tried in this waya
>
> Query qry2 = pm.newQuery(File.class);
> qry2.setFilter("key == keyParam");
> qry2.setFilter("initialVersion <= version");
> qry2.declareParameters("com.google.appengine.api.datastore.Key
> keyParam, long version");
>
> fileList = (List) qry2.execute(key, version);
>
> but it do not show any result
>
> --
> 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 Uploader

2010-05-31 Thread nicolas melendez
gmail use a trick with a hidden flash uploader, because the default file
upload of browser is awful, and very difficult to style.

see YUI uploader  - it is the same idea

NM

On Sun, May 30, 2010 at 5:49 AM, Vishal Singh  wrote:

> It will be good to have a official Java Uploader.
>
> On May 18, 10:19 pm, "Ikai L (Google)"  wrote:
> > Also, I should mention that in general, use HTTP POST for anything
> > destructive. An HTTP GET should not change data. It's too easy for a user
> to
> > reload a page without a warning or a web crawler to accidentally invoke
> some
> > action.
> >
> >
> >
> >
> >
> > On Tue, May 18, 2010 at 8:59 AM, Erich  wrote:
> > > Thanks for the tips Ikai! I'll try stuffing the parameters into a post
> > > and I'll make it a servlet instead.
> >
> > > When I've made the changes I'll post my work for others to inspect and
> > > use as they wish.
> >
> > > Thanks,
> > > Erich
> >
> > > On May 17, 2:04 pm, "Ikai L (Google)"  wrote:
> > > > Use a POST - the 2000 character limit is there because some browsers
> > > can't
> > > > handle URLs that long. It might also be easier to write your code in
> a
> > > > servlet and not a JSP. Can you post it for people to look at?
> >
> > > > On Sun, May 16, 2010 at 2:11 PM, Erich 
> wrote:
> > > > > Hi All.
> >
> > > > > I'm completely illiterate in Python, so I've created a workaround
> in
> > > > > Java to upload Java Object to the datastore.
> >
> > > > > I have a deployed JSP which receives data and uses reflection and
> > > > > various magic to take the incoming URL, create the objects
> dynamically
> > > > > and add them to the store. I've built my uploader and receiver to
> take
> > > > > advantage of bulk operations to save URL and datastore calls.
> >
> > > > > There are some serious drawbacks to this method:
> > > > > 1 - The maximum URL length before a 414 error is 2000. This really
> > > > > limits how many objects can be passed per URL.
> > > > > 2 - I haven't figure out a way to do this using securely. (without
> > > > > exposing the JSP publicly)
> >
> > > > > The good things about it:
> > > > > 1 - All Java (no installing a second google app program and mucking
> > > > > around in Python)
> > > > > 2 - No need to create intermediate files on your system. Plain
> Object -
> > > > > > Datastore
> >
> > > > > I would like to improve this if possible. Does anyone know how the
> > > > > python uploader works? Is a special URL or connection I can make to
> > > > > pass more data or do it securely?
> >
> > > > > Thanks,
> > > > > Erich
> >
> > > > > --
> > > > > 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>
> > >  %252bunsubscr...@googlegroups.com>
> >
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/google-appengine-java?hl=en.
> >
> > > > --
> > > > Ikai Lan
> > > > Developer Relations, Google App Engine
> > > > Twitter:http://twitter.com/ikai
> > > > Delicious:http://delicious.com/ikailan
> >
> > > > 
> > > > Google App Engine links:
> > > > 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 unsubscr...@googlegroups.com>
> > > .
> > > > For more options, visit this group athttp://
> > > 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.
> >
> > --
> > Ikai Lan
> > Developer Relations, Google App Engine
> > Twitter:http://twitter.com/ikai
> > Delicious:http://delicious.com/ikailan
> >
> > 
> > Google App Engine links:
> > 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...@googlegroup

Re: [appengine-java] API to search for available services

2010-05-31 Thread sreenidhi b.s
Hi
What kind of services do you want to be able to search with java code?
please be more clear.

On Mon, May 31, 2010 at 4:37 PM, Murali  wrote:

> Hi everyone,
>
> I am new to google app engine. I would like to search the services
> available from my java code - is there an API for this?
>
> thanks, murali.
>
> --
> 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 to use Key as filter

2010-05-31 Thread Ronmell (VDKiT)
Hi Dormand.

I've tried using this:
//previous declaration.
private static final PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory("transactions-optional");
PersistenceManager pm =
getPersistanceManagerFactory().getPersistenceManager();

Object foundObject=null;
try {
// the getObjectById metho receives your key to make 
the search.
Key k=;
foundObject = pm.getObjectById(classType, k);
}
finally{
pm.close();
return return foundObject;
}

in the other hand, I've tried to make the query just the same as
you've, but, somewhy, it didn't work out. So I decide to do it by the
given method by the Persistent Manager Object.

Hope this helps.

Rgds.

R

On May 30, 8:47 am, Dormand  wrote:
> Hi, I have a persistance class. now i want to query with its key and
> other one field.
> I have tried in this waya
>
> Query qry2 = pm.newQuery(File.class);
> qry2.setFilter("key == keyParam");
> qry2.setFilter("initialVersion <= version");
> qry2.declareParameters("com.google.appengine.api.datastore.Key
> keyParam, long version");
>
> fileList = (List) qry2.execute(key, version);
>
> but it do not show any result

-- 
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] Local log

2010-05-31 Thread sreenidhi b.s
Does it compile at all? because you have an error in second import
statement.
you can also try the below code.
import java.util.logging.Level;
log.log(Level.WARNING,"Your log text");


On Sun, May 30, 2010 at 1:48 PM, salvatore wrote:

> Hi,
> I've a problem
> I've tried to see local log ,but nothing was showed at concole when i
> try to debug .
> I 've tried with all SDK, from 1.2.5 to 1.3.4nothing appear.
> I start a wizard, so i've default loggin.proprieties file
> and here there is my code,
> 
> package test;
> import java.io.IOException;
> i'smport java.util.logging.Logger;
>
> import javax.servlet.http.*;
>
>
> public class TestServlet extends HttpServlet {
>private static final Logger log =
> Logger.getLogger(TestServlet.class.getName());
>
>public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws IOException {
>resp.setContentType("text/plain");
>resp.getWriter().println("Hello, world");
>
> log.info("An informational message.");
> log.warning("A warning message.");
> log.severe("An error message.");
>
>}
> }
> ___-
> can someone help me?
> thank's to all.
>
> --
> 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: Billing is enabled but still NoClassDefFoundError with BlobstoreService

2010-05-31 Thread Dimedrol
John, you was absolutely right!
I hadn't needed JARs in my /lib directory.

Thanks for 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] Local log

2010-05-31 Thread salvatore
Hi,
I've a problem
I've tried to see local log ,but nothing was showed at concole when i
try to debug .
I 've tried with all SDK, from 1.2.5 to 1.3.4nothing appear.
I start a wizard, so i've default loggin.proprieties file
and here there is my code,

package test;
import java.io.IOException;
i'smport java.util.logging.Logger;

import javax.servlet.http.*;


public class TestServlet extends HttpServlet {
private static final Logger log =
Logger.getLogger(TestServlet.class.getName());

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
resp.setContentType("text/plain");
resp.getWriter().println("Hello, world");

 log.info("An informational message.");
 log.warning("A warning message.");
 log.severe("An error message.");

}
}
___-
can someone help me?
thank's to all.

-- 
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] node allocation

2010-05-31 Thread theresia freska
Hi list,

Is there any way to control how many nodes we want to use? I want to
compare request time of using n nodes to run my app. 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] Eclipse Help Needed

2010-05-31 Thread guymac
I'm a long-time Java web-app developer and Eclipse user, but first
time Google App Engine user.
In debug mode with the Eclipse plugin (1.3.4), my servlets are not
being loaded, and I have no idea why.
Logging shows that appengine-web.xml and web.xml are being read, which
has proper definitions for my servlets and servlet mappings, but the
servlet init methods are never called and requests return 404. Please
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: Java Uploader

2010-05-31 Thread Vishal Singh
It will be good to have a official Java Uploader.

On May 18, 10:19 pm, "Ikai L (Google)"  wrote:
> Also, I should mention that in general, use HTTP POST for anything
> destructive. An HTTP GET should not change data. It's too easy for a user to
> reload a page without a warning or a web crawler to accidentally invoke some
> action.
>
>
>
>
>
> On Tue, May 18, 2010 at 8:59 AM, Erich  wrote:
> > Thanks for the tips Ikai! I'll try stuffing the parameters into a post
> > and I'll make it a servlet instead.
>
> > When I've made the changes I'll post my work for others to inspect and
> > use as they wish.
>
> > Thanks,
> > Erich
>
> > On May 17, 2:04 pm, "Ikai L (Google)"  wrote:
> > > Use a POST - the 2000 character limit is there because some browsers
> > can't
> > > handle URLs that long. It might also be easier to write your code in a
> > > servlet and not a JSP. Can you post it for people to look at?
>
> > > On Sun, May 16, 2010 at 2:11 PM, Erich  wrote:
> > > > Hi All.
>
> > > > I'm completely illiterate in Python, so I've created a workaround in
> > > > Java to upload Java Object to the datastore.
>
> > > > I have a deployed JSP which receives data and uses reflection and
> > > > various magic to take the incoming URL, create the objects dynamically
> > > > and add them to the store. I've built my uploader and receiver to take
> > > > advantage of bulk operations to save URL and datastore calls.
>
> > > > There are some serious drawbacks to this method:
> > > > 1 - The maximum URL length before a 414 error is 2000. This really
> > > > limits how many objects can be passed per URL.
> > > > 2 - I haven't figure out a way to do this using securely. (without
> > > > exposing the JSP publicly)
>
> > > > The good things about it:
> > > > 1 - All Java (no installing a second google app program and mucking
> > > > around in Python)
> > > > 2 - No need to create intermediate files on your system. Plain Object -
> > > > > Datastore
>
> > > > I would like to improve this if possible. Does anyone know how the
> > > > python uploader works? Is a special URL or connection I can make to
> > > > pass more data or do it securely?
>
> > > > Thanks,
> > > > Erich
>
> > > > --
> > > > 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>
> >  > %252bunsubscr...@googlegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-appengine-java?hl=en.
>
> > > --
> > > Ikai Lan
> > > Developer Relations, Google App Engine
> > > Twitter:http://twitter.com/ikai
> > > Delicious:http://delicious.com/ikailan
>
> > > 
> > > Google App Engine links:
> > > 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 > unsubscr...@googlegroups.com>
> > .
> > > For more options, visit this group athttp://
> > 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.
>
> --
> Ikai Lan
> Developer Relations, Google App Engine
> Twitter:http://twitter.com/ikai
> Delicious:http://delicious.com/ikailan
>
> 
> Google App Engine links:
> 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 
> athttp://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+unsubs

[appengine-java] How to use Key as filter

2010-05-31 Thread Dormand
Hi, I have a persistance class. now i want to query with its key and
other one field.
I have tried in this waya

Query qry2 = pm.newQuery(File.class);
qry2.setFilter("key == keyParam");
qry2.setFilter("initialVersion <= version");
qry2.declareParameters("com.google.appengine.api.datastore.Key
keyParam, long version");

fileList = (List) qry2.execute(key, version);

but it do not show any result

-- 
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] API to search for available services

2010-05-31 Thread Murali
Hi everyone,

I am new to google app engine. I would like to search the services
available from my java code - is there an API for this?

thanks, murali.

-- 
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 to login to gdata in GWT application deployed on GAE?

2010-05-31 Thread Raffo
I want to use the Google account login to retrieve the informations to
be used for Google's gdata api so that when I start the application
deployed on Google App Engine the user is asked for its login and I
can then use this information on the server side to specify the
credentials for Google Calendar login (through gdata api). How can I
do that? I tried using Client login but it seems that there's no way
to get password information from che Client object on the server side.
Obviously, I want to let the user login just once..

thank you.

-- 
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] Question about security of my data on AppEngine and Guarentee.

2010-05-31 Thread Christian Goudreau
I want to understand exactly how data that I send into data store are
secured, the limitation and what is the guarantee if someone brakes in and
steel some personnal informations about a member ?

I want to build a small a application for a small business that store a lot
of informations about their members. Those informations are sensitive and I
was wondering how am I protected.

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] Re: AppEngine session advice

2010-05-31 Thread Alexandru Farcas
I found that similar behavior to my application as well. Any ideas
anyone ?

On May 28, 12:58 am, Andrei Cosmin Fifiiţă 
wrote:
> Well the sequence described was run a few times... enough to say that i can
> recreate it: as u said, this pb appears after 3-4 maybe 5 min of not using
> the app.
>
> But if what you said is happening... how can I resolve this issue ?
>
> On 28 May 2010 00:37, Mike  wrote:
>
> > It might be helpful to see the entire trace for a series of runs.
>
> > Is the app only slow after a period of not being used?  If so, have
> > you looked into the possibility that the app is being swapped out, and
> > so the JVM is being re-created and spun up for the next call?
>
> > On May 27, 4:20 am, Ice13ill  wrote:
> > > Well, for me it's kinda strange, because i think i don't really
> > > understand what's going on...
> > > Let's say I want to get all my documents using gdata for docs list
> > > (just an example). So, first I call getUserCredentials() (which makes
> > > a query to datastore to get parameters: 31 ms) then an url_fetch (for
> > > gdata: 50ms) and then another query to get other docs from datastore
> > > (40ms) (app stats).
> > > What i don't understand is this:
> > >  - first query is made after about 2500 ms
> > >  - between first call (first datastore query) and the second call (url
> > > fetch) there are about 900 ms, 500ms between second and third
> > >  - RPC total: 121 ms (sum of those 3 calls), Grand total : 4000 ms
>
> > > I don't understand those large gaps. Am I reading it wrong ?
>
> > > So I don't think the call to UserServiceFactory.getUserService() is
> > > long taking... It's like the my session enters a sleep state if i
> > > don't use the app for about 2-3 minutes (can this be related to
> > >  ?).
>
> > > On May 26, 11:36 pm, Mike  wrote:
>
> > > > Some questions:
>
> > > > 1) Did you run the server trace on your code to see what was slow?
>
> > > > 2) One idea -- rather than calling UserServiceFactory.getUserService()
> > > > every time in the servlet -- why not hang onto that in the Servlet
> > > > (say, by doing that once in the constructor) and using it over and
> > > > over (so long as the Servlet is long-lived, all subsequent calls will
> > > > be much faster).
>
> > > > 3) What have you tried, and what are you seeing?
>
> > > > Cheers
> > > > Mike
>
> > > > On May 25, 5:18 am, Ice13ill  wrote:
>
> > > > > I'm building an app that uses Google account auth.
> > > > > The application also uses a custom persistent entity (UserProfile)
> > for
> > > > > users that are registered (so basically there are functionalities
> > that
> > > > > can be used for free and others by registering).
> > > > > At the beginning, the app was simple, so at every request the user
> > was
> > > > > checked by calling .getUserService().getCurrentUser() (including at
> > > > > first login obviously). But it seams that a call to that method can
> > > > > sometimes take about 3-5 seconds and also, clearly it is not he best
> > > > > way.
> > > > > So I need some advice implementing the session part, using what is
> > > > > described in the appengine documentation (session-enable + memcache +
> > > > > etc) . It does'n seem hard, but I know that some hints&tips could
> > help
> > > > > me at the beginning.
> > > > > 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 athttp://
> > 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: cron job fails but there are no errors

2010-05-31 Thread RockyWolf
I checked it out again and this time there were some warnings in the
Logs that said," No handlers matched this URL" . But the web.xml and
cron.xml seem to be okay.So I don't understand what the issue is.

On May 28, 2:26 pm, RockyWolf  wrote:
> I am testing acronjob. It gets uploaded fine,butfailson the
> dashboard. Can't really figure out what the problem is.
>
> I created acron.xml file in WEB-INF and put this in :
> 
>         
>         /cron/mycronjob
>         SimpleCronJobthat announces that it got invoked description>
>         every 1 minutes
>         
> 
>
> In the web.xml  I included this:
>
>         
>                 ScrapCronServlet
>                 com.scrapbook.ScrapCronServlet
>                
>         
>                 ScrapCronServlet
>                 /cron/mycronjob
>         
>
> And in thecronservlet:
> public class ScrapCronServlet extends HttpServlet{
>          public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws IOException {
>
>           try {
>          // _logger.info("CronJobhas been executed");
>           String mesg="Cronjobwas executed ";
>           ScrapMailServlet.sendEmail(mesg);
>             //Put your logic here
>           //BEGIN
>           //END
>             }
>           catch (Exception ex) {
>           //Log any exceptions in yourCronJob
>                   //_logger.info("Cronjobhasnt worked");
>                   }
>          }
>
>   @Override
>   public void doPost(HttpServletRequest req, HttpServletResponse resp)
> throws ServletException, IOException {
>   doGet(req, resp);
>   }
>
> }
>
> Has anyone else had this problem?

-- 
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: Google App Engine for Business

2010-05-31 Thread Marcel Overdijk
It would be more interesting to talk about the actual limitations of
the provided Google sql db

On May 24, 9:57 pm, "Ikai L (Google)"  wrote:
> Yep. Distributed datastores wouldn't exist if we had figured out a way to do
> scalable, cheap and fast horizontally scalable SQL that could preserve ACID
> transactions, foreign key constraints and table scans.
>
>
>
>
>
> On Mon, May 24, 2010 at 1:43 AM, asianCoolz  wrote:
> > i saw the roadmap for the possibility to use sql directly on GAE. in
> > that case, i curious to know what is the scability of using sql? there
> > will be limitation compared to using gae bigtable 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 > unsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> Ikai Lan
> Developer Relations, Google App Engine
> Twitter:http://twitter.com/ikai
> Delicious:http://delicious.com/ikailan
>
> 
> Google App Engine links:
> 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 
> athttp://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: session management

2010-05-31 Thread Stephan Hartmann
Normally, session cookies are created non-persistent on the browser side,
but you could try to re-set the session cookie in a filter and use
Cookie.setMaxAge(int) to make it persistent, like lembas did with GWT in his
initial post.

For plain Servlet API it could look like:

String sessionId = req.getSession().getId();
Cookie persistentSessionCookie = new Cookie("SESSIONID", sessionId);
persistentSessionCookie.setMaxAge(Integer.MAX_VALUE);
resp.addCookie(persistentSessionCookie);


2010/5/28 romesh soni 

> Hi Stephan,
>  Is that possible that a client had closed the browser and opens a new
> browser and we can still identify the client using session cookies?
>
> Thanks
> Romesh
>
> On Thu, May 27, 2010 at 10:42 PM, Stephan Hartmann 
> wrote:
>
>> Keep in mind that sessions managed by the servlet container expire after a
>> specific time of inactivity on the server side, so if a user comes back
>> after a while with his old session cookie, he will still get a new session.
>> According to the servlet spec, you can obtain this value with
>> HttpSession.getMaxInactiveInterval() and change it with
>> HttpSession.setMaxInactiveInterval(int), with a value of -1 meaning never to
>> expire.
>>
>> Regards,
>> Stephan
>>
>>
>> 2010/5/27 lembas 
>>
>> thanks romesh. I was on vacation did not see your message. sorry for a
>>> late answer.
>>>
>>> I do not "use cookies for managing session". Google does. JESSIONID
>>> cookies is created on server by App Engine anyway. I just extend its
>>> expiration date.
>>> Is it possible to implement "remember me" functionality without
>>> cookies?
>>>
>>> On May 3, 11:22 am, romesh soni  wrote:
>>> > Hey Ikai, sorry I referred you by mistake.. My msg was for lembas
>>> >
>>> >
>>> >
>>> > On Mon, May 3, 2010 at 1:23 PM, romesh soni 
>>> wrote:
>>> > > Hi Ikai,
>>> >
>>> > > the way you are managing session is not good. actually you are using
>>> > > cookies for managing session, which is not a good thing.
>>> > > instead session management is done at server side, not client side.
>>> >
>>> > > On Mon, May 3, 2010 at 1:18 PM, Ikai L (Google) 
>>> wrote:
>>> >
>>> > >> I'm not sure how this mitigates use of the _ah_session records that
>>> are
>>> > >> created. Anytime you set an attribute, it will use this. If you're
>>> worried
>>> > >> about _ah_session getting out of control, a better way would be to
>>> use
>>> > >> Memcache for session data and associate it with a cookie. Stale,
>>> unused
>>> > >> session data will be automatically expired. The advantage of using
>>> the built
>>> > >> in sessions is that since they are backed by both Memcache and the
>>> > >> datastore, they're going to be less volatile.
>>> >
>>> > >> On Sun, May 2, 2010 at 8:46 AM, lembas  wrote:
>>> >
>>> > >>> I have couple of questions about session management. I use GWT+GAE.
>>> I
>>> > >>> do not want my _ah_sessions table to be out of control. I do not
>>> want
>>> > >>> to generate unnecessary sessions.
>>> >
>>> > >>> I have true in my appengine-
>>> > >>> web.xml.
>>> >
>>> > >>> 1.I have the following code at the beginning of my onModuleLoad()
>>> > >>> method, is it ok?
>>> > >>> String sessionid = Cookies.getCookie("JSESSIONID");
>>> > >>> if (sessionid != null) {
>>> > >>>Date now = new Date();
>>> > >>>Date expires = new Date(now.getTime() + (long) 1000 * 60 *
>>> 60 * 24
>>> > >>> *
>>> > >>> 365);
>>> > >>>Cookies.setCookie("JSESSIONID", sessionid, expires);
>>> > >>> }
>>> >
>>> > >>> 2.After the user sends his/her username&password to the server for
>>> the
>>> > >>> first time (i.e. with a new JSESSIONID cookie), I get that "user"
>>> > >>> object from database and if I have it, I save it using:
>>> > >>> getThreadLocalRequest().getSession().setAttribute("user", user);
>>> > >>> and send it to the client as a sign of a succesful login.
>>> >
>>> > >>> So next time client visits the site with the same JSESSIONID I can
>>> get
>>> > >>> the user object directly by:
>>> > >>> getThreadLocalRequest().getSession().getAttribute("user");
>>> >
>>> > >>> ---
>>> >
>>> > >>> Is it ok how I use the sesssion management? Is it true that every
>>> > >>> request comes with the same JSESSIONID (unless client deleted it
>>> > >>> deliberately), no new session is created on server and server do
>>> not
>>> > >>> need to access database to get the user object?
>>> >
>>> > >>> --
>>> > >>> 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 Relations, Google App Engine
>>> > >> Twitter:http://twitter.com/ikai
>

Re: [appengine-java] Re: Billing is enabled but still NoClassDefFoundError with BlobstoreService

2010-05-31 Thread John Patterson
Also, make sure that the GAE jars are not old versions.  e.g. you  
could have 1.3.4 on your build path but the war dir might have 1.2.8


On 31 May 2010, at 14:19, Dimedrol wrote:


Anyone?

--
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-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: Billing is enabled but still NoClassDefFoundError with BlobstoreService

2010-05-31 Thread John Patterson
Your problem would not be due to billing.  The classes are either  
available or not.


It sounds like you are missing the GAE jars in your war/WEB-INF/lib  
directory.  Normally if you use Eclipse they are added automatically  
by the Google plugin.  But double check that they are there.



On 31 May 2010, at 14:19, Dimedrol wrote:


Anyone?

--
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-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: Delete all Datastore entries locally

2010-05-31 Thread Gaurav Munjal
Thanks a lot.

On May 28, 4:57 pm, jnizet  wrote:
> http://code.google.com/intl/fr/appengine/docs/java/tools/devserver.ht...
>
> On 28 mai, 13:07, Gaurav Munjal  wrote:
>
>
>
> > I have made some changes in the class file, whose objects were
> > persisted... Now I need to empty the local datastore. Is there a way?

-- 
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: Billing is enabled but still NoClassDefFoundError with BlobstoreService

2010-05-31 Thread Dimedrol
Anyone?

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