Re: [appengine-java] Unable to deploy app to GAE

2010-10-07 Thread imlangzi
I'm always go the same error when I try to upload app via google
eclipse plugin.

I have to reinstall jre. It will temporarily fix this issue. But, it
will be came in future

-- 
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] OpenID Development server

2010-10-07 Thread Fabrizio
Hello, I'm testing OpenID (SDK 1.3.7). My env is: Eclipse + GAE Plugin.
Question: is OpenID supported by local development server?


I have a protected area. I force users to login with:
security-constraint
web-resource-collection
url-pattern/protected/*/url-pattern
/web-resource-collection
auth-constraint
role-name*/role-name
/auth-constraint

/security-constraint


When I try to access the protected area from production I get correctly
redirect to:
http://MYAPP.appspot.com/_ah/login_required?continue=http://MYAPP.appspot.com/protected/



But on local development server I
get:http://localhost:/_ah/login?continue=http://localhost:/protected/




Why?


fabrizio

-- 
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] Remove properties from existing data

2010-10-07 Thread arny
Hello,

I've been looking for a way to remove unused properties from existing
data for a while but could not find the right information yet.
Everyone is talking about what should not be done, but no one is
giving any ideas how to remove.

So I can't set NULL, since it's a value as well and gets stored.
So how to get rid of unused properties then?

On python there is delattr to remove a property completely.
On Java there is ... ?

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: Web Hook - Asynchronous - Where is my response?

2010-10-07 Thread Andy
Sorry I don't quite understand your answer, what do you mean
by DataStore Operation?

-- 
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: Many to many relation ship

2010-10-07 Thread Andy
Hi Hadf,


This is how I did it. Basically in RDBMS, it has a running thread that
does the cascaded update/delete and so there is an option for you to
tell the RDBMS to do that automatically for you or not.


In GDataStore, it doesn't have such automation. Instead, you have to
retrieve the associated Key, and delete the associated object. You may
think this is manual process by yourself but it is considerably very
quick since Key is all cached in Google, and if you try to find the Key
(even at root Entity Group), it will return you the associated Object
in lightning short period of time, and then you can perform Update or
Delete yourself.


Having such cascade update/delete automation is good except that you
don't have much control where manual gives you full power to control
the flow such as retrieving external information from web services just
right before you do the cascade update.


Syntax wise, you can use the following if you are using Java:

Employee e = pm.getObjectById(Employee.class, k);

k is the Key object. Assuming you put this key onto web, make sure you
use keyToString and stringToKey methods to encode/decode the key before
you store/retrieve the Key.


hope this helps,


Andy

-- 
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: Web Hook - Asynchronous - Where is my response?

2010-10-07 Thread John Patterson
There is no public API for checking the status of tasks.  A task is  
really nothing more than a normal http request which is monitored by  
GAE to retry it if it fails.  The real brains is in the task queue  
which is simply a queue of URL's that app engine will fire off at a  
given rate and retry failed requests.


The only public method to check tasks (http requests) in this queue is  
the console webpage.  Its up to you to monitor your tasks yourself by  
storing some kind of status data in memcache or the datastore.


On 7 Oct 2010, at 20:13, Andy wrote:

Sorry I don't quite understand your answer, what do you mean by  
DataStore Operation?


--
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: Web Hook - Asynchronous - Where is my response?

2010-10-07 Thread Andy Leung
gotcha, thank you.

On Thu, Oct 7, 2010 at 10:37 AM, John Patterson jdpatter...@gmail.comwrote:

 There is no public API for checking the status of tasks.  A task is really
 nothing more than a normal http request which is monitored by GAE to retry
 it if it fails.  The real brains is in the task queue which is simply a
 queue of URL's that app engine will fire off at a given rate and retry
 failed requests.

 The only public method to check tasks (http requests) in this queue is the
 console webpage.  Its up to you to monitor your tasks yourself by storing
 some kind of status data in memcache or the datastore.


 On 7 Oct 2010, at 20:13, Andy wrote:

  Sorry I don't quite understand your answer, what do you mean by DataStore
 Operation?

 --
 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.comgoogle-appengine-java%2bunsubscr...@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.comgoogle-appengine-java%2bunsubscr...@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: Spring MVC on GAE: Slow Load Time

2010-10-07 Thread Marcelo Madeira
Vladimir,

I am using the cron job solutions... i know that it´s not the best
solutions but it´s working perfectly.
I don´t recommend you to use spring in GAE. The spring´s load time is
not acceptable in GAE.

I am using VRaptor + Objectify and the startup time is not a problem
for me.

Sorry about some english mistakes.

Marcelo Madeira
Brazil


On Oct 6, 4:44 pm, Vladimir odess...@gmail.com wrote:
 Hello All!

 I recently deployed a Spring MVC application to google app engine, and
 the intial load time is about 7sec. Once the application is loaded,
 the app is quite responsive. But, if the app is idle for more than 1
 minute (there isn't ANY traffic to it) the app needs to be again
 reloaded by GAE, which, takes about 7sec as well. For a PRD-level
 application this is unacceptable. (The app is empty -- I'm not even
 using JPA, Sitemesh, Spring Security, etc yet. It just loads a jsp
 page with some text.)

 The only best practice to fix the 'load time' I've seen so far is to
 set up a cron job that hits the url every minute, therefore keeping
 the app 'loaded'. Obviously this is a terrible solution.

 So here are the questions:
 Are there any best practices for Spring on GAE in terms of
 responsiveness?
 Since google and spring are working on developing better integration
 between the two of them, has there been any news/progress on this
 problem? I can't find anything concrete, that's why I'm asking it here

 Thanks!
 Vladimir

-- 
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] Font Rendering possible..? Maybe via Batik?

2010-10-07 Thread Richard
Hi,

the complete rendering pipeline in GAE for Java is on the blacklist,
cannot be used.

Is there a way to render Fonts and simple Shapes nonetheless? Maybe
via a complete non-native implementation? Maybe from Apache Harmony?

Is the Apache Batik Project compatible with Google Appengine? Could it
be used to do simple rendering (output PNG or SVG)? Did somebody ever
try this?

Thanks,
Richard

-- 
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] Google App Engine MUD

2010-10-07 Thread Nick Johnson (Google)
Hi MLS,

Sounds like an interesting project!

On Sat, Oct 2, 2010 at 4:02 AM, MLS mlsjunkm...@gmail.com wrote:

 My friend and I are looking to rewrite an old BBS MUD.

 The game is a few thousand rooms and purely text based with commands
 issued by individual players and the game responding and updating
 players stats based on the results of their commands.

 I do not have a programming background, and I'm wondering about the
 best way to approach writing it for GAE.

 Attempting to translate the game to objects, I have the following
 layout:

 World object holds all of the zone objects, zone objects hold rooms,
 room objects hold players, player objects hold inventory objects,
 spellbook objects, and attributes. Then write appropriate methods for
 manipulating the objects appropriately and returning the results.


If by 'A holds B', you mean 'B has a reference to A', then yes, this sounds
sensible. You only want to use parent/child relationships when you need to
be able to update multiple entities in a single transaction. If you need
this support, consider reducing the scope - eg, each zone could have an
entity group containing all its rooms, and each player can form an entity
group holding all their items.


 I have a few questions though:

 1. Is this a technically correct way of approaching the problem? If
 not, what would be better? (keep in mind, I am not a professional
 programmer by any means. I can find my way if I have something already
 written to make changes, but I've never written anything from scratch
 before). Would I populate all these objects, then write world to the
 db and retrieve it for each player action?


Yes, that's right. You wouldn't generally write the whole world at once,
though - just the modified bits!


 I have no idea how servlets
 work to store state, or really how they work in general really.


App servers are expected to be stateless on App Engine. All your state
should be stored in the datastore or memcache.

Basically, how would I be storing and retrieving stored player
 statistics which are constantly changing many times a second as
 players play the game.


This is another reason to limit the size of your transaction (entity)
groups. A single entity group can be updated at most a few times a second.



 2. A key issue is the ability to push updates to players in real time,
 and track individuals who are connected. For example, I would like the
 ability to be able to call something like
 room[someroomnum].sendtoall(Some message here); to push a message to
 all players in that room, or player[someplayernum].send(some message
 here); to send replies to players directly.


 I understand this is a complex issue with the stateless http protocol,
 but I have read some about the upcoming channel API which sounds like
 it may offer this ability but I don't know enough to be certain.


Yes, the channels API is exactly what you need for this.



 Overall I'm looking to avoid devoting countless hours to this project
 if it is going to be beyond my abilities to complete successfully.


Have you considered language? Your mention of servlets implies you're
considering using Java. If you're already familiar with Java, by all means
use it, but if you're new to both Java and Python, I'd highly recommend
starting with Python - you'll find a lot less boilerplate to deal with. Of
course, I'm partisan. ;)

-Nick Johnson




 Thanks very much for your time and consideration,

 MLS

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




-- 
Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
Registered in Dublin, Ireland, Registration Number: 368047
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

-- 
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: Spring MVC on GAE: Slow Load Time

2010-10-07 Thread Roberto Saccon
another non-Spring but fast-loading choice: slim3

--
Roberto

On Oct 7, 8:41 am, Marcelo Madeira celodem...@gmail.com wrote:
 Vladimir,

 I am using the cron job solutions... i know that it´s not the best
 solutions but it´s working perfectly.
 I don´t recommend you to use spring in GAE. The spring´s load time is
 not acceptable in GAE.

 I am using VRaptor + Objectify and the startup time is not a problem
 for me.

 Sorry about some english mistakes.

 Marcelo Madeira
 Brazil

 On Oct 6, 4:44 pm, Vladimir odess...@gmail.com wrote:







  Hello All!

  I recently deployed a Spring MVC application to google app engine, and
  the intial load time is about 7sec. Once the application is loaded,
  the app is quite responsive. But, if the app is idle for more than 1
  minute (there isn't ANY traffic to it) the app needs to be again
  reloaded by GAE, which, takes about 7sec as well. For a PRD-level
  application this is unacceptable. (The app is empty -- I'm not even
  using JPA, Sitemesh, Spring Security, etc yet. It just loads a jsp
  page with some text.)

  The only best practice to fix the 'load time' I've seen so far is to
  set up a cron job that hits the url every minute, therefore keeping
  the app 'loaded'. Obviously this is a terrible solution.

  So here are the questions:
  Are there any best practices for Spring on GAE in terms of
  responsiveness?
  Since google and spring are working on developing better integration
  between the two of them, has there been any news/progress on this
  problem? I can't find anything concrete, that's why I'm asking it here

  Thanks!
  Vladimir

-- 
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: Remove properties from existing data

2010-10-07 Thread Didier Durand
Hello,

You have to go down to low-level datastore api to do that: see
Entity.removeProperty()

See 
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Entity.html

didier

On Oct 7, 2:06 pm, arny arny...@googlemail.com wrote:
 Hello,

 I've been looking for a way to remove unused properties from existing
 data for a while but could not find the right information yet.
 Everyone is talking about what should not be done, but no one is
 giving any ideas how to remove.

 So I can't set NULL, since it's a value as well and gets stored.
 So how to get rid of unused properties then?

 On python there is delattr to remove a property completely.
 On Java there is ... ?

 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] Re: Remove properties from existing data

2010-10-07 Thread Ikai Lan (Google)
An easy way to iterate over all your entities is with the Mapper API:

http://googleappengine.blogspot.com/2010/07/introducing-mapper-api.html

--
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 Thu, Oct 7, 2010 at 10:11 AM, Didier Durand durand.did...@gmail.comwrote:

 Hello,

 You have to go down to low-level datastore api to do that: see
 Entity.removeProperty()

 See
 http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Entity.html

 didier

 On Oct 7, 2:06 pm, arny arny...@googlemail.com wrote:
  Hello,
 
  I've been looking for a way to remove unused properties from existing
  data for a while but could not find the right information yet.
  Everyone is talking about what should not be done, but no one is
  giving any ideas how to remove.
 
  So I can't set NULL, since it's a value as well and gets stored.
  So how to get rid of unused properties then?
 
  On python there is delattr to remove a property completely.
  On Java there is ... ?
 
  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.comgoogle-appengine-java%2bunsubscr...@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] Font Rendering possible..? Maybe via Batik?

2010-10-07 Thread Ikai Lan (Google)
Have you looked into the Google Font API?

http://code.google.com/apis/webfonts/

This solution is more inline with HTML5.

--
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 Thu, Oct 7, 2010 at 9:09 AM, Richard richardcur...@googlemail.comwrote:

 Hi,

 the complete rendering pipeline in GAE for Java is on the blacklist,
 cannot be used.

 Is there a way to render Fonts and simple Shapes nonetheless? Maybe
 via a complete non-native implementation? Maybe from Apache Harmony?

 Is the Apache Batik Project compatible with Google Appengine? Could it
 be used to do simple rendering (output PNG or SVG)? Did somebody ever
 try this?

 Thanks,
 Richard

 --
 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.comgoogle-appengine-java%2bunsubscr...@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: Font Rendering possible..? Maybe via Batik?

2010-10-07 Thread dovm
Hi,

It is possible using TinyLine 2.4 SDK at http://tinyline.com

Read more about TinyLine for Google App Engine (PDF)
http://tinyline.com/tinylineforgae.pdf

See the Basic Demos online http://tinylinegae.appspot.com/

Thanks,
Dov


On Oct 7, 6:09 pm, Richard richardcur...@googlemail.com wrote:
 Hi,

 the complete rendering pipeline in GAE for Java is on the blacklist,
 cannot be used.

 Is there a way to render Fonts and simple Shapes nonetheless? Maybe
 via a complete non-native implementation? Maybe from Apache Harmony?

 Is the Apache Batik Project compatible with Google Appengine? Could it
 be used to do simple rendering (output PNG or SVG)? Did somebody ever
 try this?

 Thanks,
 Richard

-- 
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] failure in simple JDO query

2010-10-07 Thread x_maras
Hi,

I was trying to do some simple JDO queries in order to find my way in
java google app engine.
I have an persistent object where I store information about users,
called UserData
I also have made a class DAO where I have methods for creating new
users for checking if a user exist and to show data for users.
I created 2 records successfully but I can't read them.
The error that I get is
HTTP ERROR 500

Problem accessing /. Reason:

com.awt.oat.dao.UserDao.showUserData()V
Caused by:

java.lang.NoSuchMethodError: com.awt.oat.dao.UserDao.showUserData()V
at org.apache.jsp.auction_jsp._jspService(auction_jsp.java:89)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

 and a lot more


I'm sure that I 'm doing something really stupid. Please someone to
help me...

Here is my DAO class code:

package com.awt.oat.dao;

import javax.jdo.PersistenceManager;
import com.awt.oat.PMF;
import com.awt.oat.model.UserData;
import com.google.appengine.api.users.User;
import javax.jdo.Query;
import java.util.List;
import java.util.Date;
import javax.jdo.JDOObjectNotFoundException;


public class UserDao {
public void createUser(String uniqueID, String userName, String email)
{
Date date = new Date();
UserData newUser = new UserData(uniqueID, userName, email, 
date);

PersistenceManager pm = PMF.get().getPersistenceManager();
try {
pm.makePersistent(newUser);
}finally {
pm.close();
}
}

public void showUserData(){

PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(UserData.class);

try{
ListUserData results = (ListUserData)query.execute();

if (results.iterator().hasNext()) {
for(UserData u : results){
System.out.println(table border='1' +
trtdusername/tdtd + 
u.getUserName() + /tr
+ trtdemail/tdtd + 
u.getEmail() + /td/tr/
table);
}
} else {
System.out.printf(pNo results in the datastore/p);
}
}finally{
query.closeAll();
}
}
}

and here my jsp file

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ page import=java.util.List %
%@ page import=javax.jdo.PersistenceManager %
%@ page import=com.google.appengine.api.users.User %
%@ page import=com.google.appengine.api.users.UserService %
%@ page import=com.google.appengine.api.users.UserServiceFactory %
%@ page import=com.awt.oat.dao.UserDao %
%@ page import=java.io.* %

html
  head
link type=text/css rel=stylesheet href=/stylesheets/
main.css /
  /head
  body
%
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
if (user != null) {
%
pHello, %= user.getNickname() %! (You can
a href=%= userService.createLogoutURL(request.getRequestURI())
%sign out/a.)/p
%
} else {
%
a href=%= userService.createLoginURL(request.getRequestURI())
%Sign in/a
%
}
UserDao dao = new UserDao();
//dao.createUser(user.getUserId(), user.getNickname(),
user.getEmail()); this one works creates new users in the database
dao.showUserData(); //this gives me error
%
  /body
/html

-- 
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] Need to include com.google.gdata.client in the deployment for GAE?

2010-10-07 Thread Saqib Ali
Hello All,

I am working on a GAE App that will talk using Google Spreadsheet API
w/ OAuth. Do I need to include com.google.gdata.client in the
deployment package, or is it already available on GAE?

Thanks,
Saqib

-- 
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: Spring MVC on GAE: Slow Load Time

2010-10-07 Thread Starman
I have a Spring app with a pretty full stack currently being developed
on gae. I quickly hit the 30 seconds limit at startup, hence the app
would no longer even boot. I removed jpa in favor of Objectify,
removed all the transaction management as I don't use entity groups,
removed some features that were doing classpath scanning and other
byte code injection, used as much lazy initializtion as possible. I
got my startup time back to 20 seconds. Until I can pay to keep a jvm
up, this is unnacceptable.

I haven't profile Spring Security yet, which is still the biggest
bottleneck. But even with more optimization work, I will be lucky to
get a 10 seconds startup.

We'll see where this all goes.

-- 
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: failure in simple JDO query

2010-10-07 Thread Arnold
May be try restarting the development mode server.

On Oct 7, 8:42 pm, x_maras dinost...@gmail.com wrote:
 Hi,

 I was trying to do some simple JDO queries in order to find my way in
 java google app engine.
 I have an persistent object where I store information about users,
 called UserData
 I also have made a class DAO where I have methods for creating new
 users for checking if a user exist and to show data for users.
 I created 2 records successfully but I can't read them.
 The error that I get is
 HTTP ERROR 500

 Problem accessing /. Reason:

     com.awt.oat.dao.UserDao.showUserData()V
 Caused by:

 java.lang.NoSuchMethodError: com.awt.oat.dao.UserDao.showUserData()V
         at org.apache.jsp.auction_jsp._jspService(auction_jsp.java:89)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
 
  and a lot more
 

 I'm sure that I 'm doing something really stupid. Please someone to
 help me...

 Here is my DAO class code:

 package com.awt.oat.dao;

 import javax.jdo.PersistenceManager;
 import com.awt.oat.PMF;
 import com.awt.oat.model.UserData;
 import com.google.appengine.api.users.User;
 import javax.jdo.Query;
 import java.util.List;
 import java.util.Date;
 import javax.jdo.JDOObjectNotFoundException;

 public class UserDao {
         public void createUser(String uniqueID, String userName, String email)
 {
                 Date date = new Date();
                 UserData newUser = new UserData(uniqueID, userName, email, 
 date);

                 PersistenceManager pm = PMF.get().getPersistenceManager();
         try {
             pm.makePersistent(newUser);
         }finally {
             pm.close();
         }
         }

         public void showUserData(){

                 PersistenceManager pm = PMF.get().getPersistenceManager();
                 Query query = pm.newQuery(UserData.class);

             try{
                 ListUserData results = (ListUserData)query.execute();

                 if (results.iterator().hasNext()) {
                         for(UserData u : results){
                                 System.out.println(table border='1' +
                                                 trtdusername/tdtd + 
 u.getUserName() + /tr
                                                 + trtdemail/tdtd + 
 u.getEmail() + /td/tr/
 table);
                         }
                 } else {
                         System.out.printf(pNo results in the 
 datastore/p);
                 }
             }finally{
                 query.closeAll();
             }
         }

 }

 and here my jsp file

 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ page import=java.util.List %
 %@ page import=javax.jdo.PersistenceManager %
 %@ page import=com.google.appengine.api.users.User %
 %@ page import=com.google.appengine.api.users.UserService %
 %@ page import=com.google.appengine.api.users.UserServiceFactory %
 %@ page import=com.awt.oat.dao.UserDao %
 %@ page import=java.io.* %

 html
   head
     link type=text/css rel=stylesheet href=/stylesheets/
 main.css /
   /head
   body
 %
     UserService userService = UserServiceFactory.getUserService();
     User user = userService.getCurrentUser();
     if (user != null) {
 %
 pHello, %= user.getNickname() %! (You can
 a href=%= userService.createLogoutURL(request.getRequestURI())
 %sign out/a.)/p
 %
     } else {
 %
 a href=%= userService.createLoginURL(request.getRequestURI())
 %Sign in/a
 %
     }
         UserDao dao = new UserDao();
         //dao.createUser(user.getUserId(), user.getNickname(),
 user.getEmail()); this one works creates new users in the database
         dao.showUserData(); //this gives me error
 %
   /body
 /html

-- 
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] Integration with OpenJPA

2010-10-07 Thread Kevin
Hi,
I'm trying to get GAE to integrate with OpenJPA (instead of the built-
in DataNucleus) for various reasons.  From the Setting Up JPA section
on the Using JPA with GAE page [1], it sounded like this might be
doable by replacing the DataNucleus binaries with the OpenJPA binaries
in the war/WEB-INF/lib directory and doing the necessary enhancement
steps (also required by OpenJPA).

But, I have not had any luck.  The DataNucleus version in GAE seems to
be limited to JPA 1.0 functionality, although I found some references
to the JPA 2.0 APIs...  So, I have removed all 3 jars related to
DataNucleus along with the Geronimo spec jars, and inserted the
openjpa-all jar.  I get a little further, but now I am hitting
classloader issues.  I'm working with the simple Guestbook sample.

I also just noticed that Hibernate is not compatible with GAE either,
so at least we're in good company...  :-)

Are there any plans to open up GAE to alternate JPA providers?  Is
there anybody interested in the GAE development community to help with
this endeavor?  I like the GAE development and deployment environment,
but I would like to use OpenJPA instead of DataNucleus.

(I can provide more details (stack traces, test projects, etc) if I
get some indication that there is interest in this exercise.)

Thanks for any information,
Kevin
Apache OpenJPA PMC

[1]  
http://code.google.com/appengine/docs/java/datastore/usingjpa.html#Setting_Up_JPA

-- 
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] SSL for localhost

2010-10-07 Thread Danial
Is it possible to access my application using https://localhost
when I run my web application with google app engine from eclipse.
I know that if I upload it to *.appspot.com I would be able to access
it through SSL but can I test it on my local server for development?

-- 
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] Disable Development Console

2010-10-07 Thread Ikai Lan (Google)
You should be able to write a servlet filter that catches all incoming URLs.

You really shouldn't use the dev app server locally, though. It's not meant
to be any kind of production server. For instance: it's single threaded,
transactions lock globally (so if something goes wrong a server restart is
required).

--
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 Thu, Oct 7, 2010 at 12:25 AM, Mohit Arora mohit.ar...@gmail.com wrote:

 How to disable Dev console?
 I am hosting an app on my dev machine  want to give out the link to
 intranet users.
 Also, don't want them to look into the datastore, which is freely
 accessible at /_ah/admin for everyone.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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] Need to include com.google.gdata.client in the deployment for GAE?

2010-10-07 Thread Ikai Lan (Google)
You have to include it. The gdata client is not available server side.

--
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 Thu, Oct 7, 2010 at 1:42 PM, Saqib Ali docbook@gmail.com wrote:

 Hello All,

 I am working on a GAE App that will talk using Google Spreadsheet API
 w/ OAuth. Do I need to include com.google.gdata.client in the
 deployment package, or is it already available on GAE?

 Thanks,
 Saqib

 --
 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.comgoogle-appengine-java%2bunsubscr...@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: Spring MVC on GAE: Slow Load Time

2010-10-07 Thread Guillermo Schwarz
I would remove Spring entirely.

Usually proxies are enough for transaction management.

Also instead of Spring MVC you could use jquery or echo2.

Cheers,
Guillermo.

On Thu, 2010-10-07 at 17:32 -0700, Starman wrote:
 I have a Spring app with a pretty full stack currently being developed
 on gae. I quickly hit the 30 seconds limit at startup, hence the app
 would no longer even boot. I removed jpa in favor of Objectify,
 removed all the transaction management as I don't use entity groups,
 removed some features that were doing classpath scanning and other
 byte code injection, used as much lazy initializtion as possible. I
 got my startup time back to 20 seconds. Until I can pay to keep a jvm
 up, this is unnacceptable.
 
 I haven't profile Spring Security yet, which is still the biggest
 bottleneck. But even with more optimization work, I will be lucky to
 get a 10 seconds startup.
 
 We'll see where this all goes.
 

-- 
Simplex Veri Sigillum

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