[appengine-java] Re: DisplayTag JSP

2009-11-16 Thread Simon
If you have any objects in that resultset which are lazily loaded,
then closing the entity manager before you've looped through the
resultset will produce an exception and the route to the data store to
retrieve the data has been closed.

You have two options:

1) Aggressively fetch the data which you're looping through, so that
all data is retrieved from the data store before you iterate over it.
2) Close the entity manager after you've looped through the required
data.

On Nov 16, 3:51 am, YONG yongkia...@gmail.com wrote:
 Hi, I want to know what is the different of this code when compiling
 and execute in GAE.

 %
         EntityManager em = EMF.getInstance().createEntityManager();
         ListUser users = (ListUser) em.createQuery(
                         SELECT FROM  + 
 User.class.getName()).getResultList();
         request.setAttribute(rs, users);
         em.close();
 %

 display:table requestURI=displaytag.jsp name=rs export=true
         sort=list pagesize=10 class=display
         display:column property=id title=User ID sortable=true
                 headerClass=sortable /
         display:column property=name title=User Name sortable=true
                 headerClass=sortable /
         display:column property=gender title=Gender /
         display:column property=aboutYou title=About You /
         display:column property=country title=Country /
         display:column property=mailingList title=JOIN? /
 /display:table

 The above code is giving error code HTTP 500. However, when I change
 to

 %
         EntityManager em = EMF.getInstance().createEntityManager();
         ListUser users = (ListUser) em.createQuery(
                         SELECT FROM  + 
 User.class.getName()).getResultList();
         request.setAttribute(rs, users);
         // em.close(); // just comment this line and move it down
 %

 display:table requestURI=displaytag.jsp name=rs export=true
         sort=list pagesize=10 class=display
         display:column property=id title=User ID sortable=true
                 headerClass=sortable /
         display:column property=name title=User Name sortable=true
                 headerClass=sortable /
         display:column property=gender title=Gender /
         display:column property=aboutYou title=About You /
         display:column property=country title=Country /
         display:column property=mailingList title=JOIN? /
 /display:table

 %
         em.close();
 %

 Then the JSP is running and show the result in displaytag table.

 Anyone can explain why?

--

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




[appengine-java] Won't get values of an array inside POJO

2009-11-16 Thread Zenon
Hi all, I don't know why for any kind of array (List or Object[])
inside my Pojo app engine fails to get correct values and get always
null.
I already check out at local dataviewer, and as a matter fact values
seems to be saved succesfull.

Anyone can help me?

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




[appengine-java] Email .csv attachment in UTF-8 charset

2009-11-16 Thread rjportier
Hi all,

I am trying to send an email with an attachment having Content-Type
text/comma-separated-values; charset=UTF-8. The attachment is sent,
but it comes out in encoding base64(US-ASCII). I do something like
this:


import javax.mail.Multipart;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMultipart;

// ...
String htmlBody;// ...
String attachmentData;  // ...

Multipart mp = new MimeMultipart();

MimeBodyPart htmlPart = new MimeBodyPart();
htmlPart.setContent(htmlBody, text/html);
mp.addBodyPart(htmlPart);

MimeBodyPart attachment = new MimeBodyPart();
attachment.setFileName(data.csv);
attachment.setContent(attachmentData, text/comma-separated-
values; charset=UTF-8);
mp.addBodyPart(attachment);

message.setContent(mp);


But the attachment comes out in us-ascii. I've als tried with setting
headers, but to no avail. I probably need to approach this
differently. So, any pointers greatly appreciated.

Thanks!
Robert

--

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




[appengine-java] Re: Won't get values of an array inside POJO

2009-11-16 Thread datanucleus
Perhaps you don't have it in the fetch plan? as per the DataNucleus
docs, or many many posts on this forum

--

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




[appengine-java] XMPP and JID

2009-11-16 Thread sahil mahajan
Hello

I am using XMPP API.
It looks that JID of a google account user does not remain constant.

If a user is using gmail, then his JID is mai...@gmail.com/gmail.SOME_NO and
when he is using gtalk JID is mai...@gmail.com/talk.SOME_DIFF_NO. I need to
have something (for example mail id) which remains constant every time a
user uses my website.

I didn't find any function to extract constant part of JID.

I tried using Users Service of Google App engine by including

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;***

*but user remains null.

Is their any way to get constant part from all Types of JID's.
*
*Regards
Sahil*
*

--

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




[appengine-java] case sensitivity

2009-11-16 Thread Kris
Is there any way to perform a JDO query on google app engine using a
case insensitive string comparison? e.g.

For example,
Query query = pm.newQuery(User.class, userName.toLowerCase() ==
user  password == pass);
query.declareParameters(String user, String pass);
query.setUnique(true);
User user = (User) query.execute(userName.toLowerCase(), 
password);

Of course GAE does not support the usage of toLowerCase() in the
filter string.

There's probably a terribly simple way to do this that I'm just not
aware of.

--

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




[appengine-java] Re: updating object doesn't work anymore

2009-11-16 Thread randal
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=.




[appengine-java] Re: Email .csv attachment in UTF-8 charset

2009-11-16 Thread m seleron
Hi,

As an another way.
How about this technique ?

1. import
import javax.mail.util.ByteArrayDataSource;
import javax.activation.DataHandler;
import javax.activation.DataSource;


2.modify
//attachment.setContent(attachmentData, text/comma-separated-values;
charset=UTF-8);
ByteArrayDataSource byteArrayDataSource = new ByteArrayDataSource
(attachmentData, text/comma-separated-values; charset=UTF-8);
attachment.setDataHandler(new DataHandler(byteArrayDataSource));

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




Re: [appengine-java] case sensitivity

2009-11-16 Thread Rusty Wright
The recommended approach is to store the userName in all lower case, as an 
additional field/column, and then do the toLowerCase on the incoming parameter 
user name when you do the query and use that field/column that was stored in 
lower case.


Kris wrote:
 Is there any way to perform a JDO query on google app engine using a
 case insensitive string comparison? e.g.
 
 For example,
   Query query = pm.newQuery(User.class, userName.toLowerCase() ==
 user  password == pass);
   query.declareParameters(String user, String pass);
   query.setUnique(true);
   User user = (User) query.execute(userName.toLowerCase(), 
 password);
 
 Of course GAE does not support the usage of toLowerCase() in the
 filter string.
 
 There's probably a terribly simple way to do this that I'm just not
 aware of.
 
 --
 
 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=.
 
 

--

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




[appengine-java] Embedded objects come back null in unit tests

2009-11-16 Thread Nick Bonatsakis
Hi All,

I have followed the instructions on how to create the appropriate
classes for JUnit testing and have a fairly simple object hierarchy. I
have one class that includes a few embedded objects, they are all
correctly annotated with JDO annotations (i have compared them
directly to the example jdo classes that ship with GAE). I create an
instance of the parent object, set all the fields including the
embedded ones, then used the PersistenceManager to make the instance
persisted. When i query for all instances of the class, I get back the
right number of instances, the non-embedded fields are there, but all
of the embedded fields have null values.

I also tried writing a simple test using the AddressBookEntry class,
and see the same behavior when looking in the debugger, that code is
as follows:

 @Test
public void testAddy(){

AddressBookUtils.insertNew
(John,Doe,Hart,CT,8448445);

PersistenceManager pm = PMF.get().getPersistenceManager();
Query q = pm.newQuery(AddressBookEntry.class);
List l = (List) q.execute();
}

Anyone have any pointers on how to resolve this?

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




[appengine-java] EntityGroup getting all children of a parent

2009-11-16 Thread Bitscorpion
Hello,
I tried to do a little test and wrote two classes:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Tenant {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private String name;

public Tenant(String name){
this.name = name;
}

public String getName(){
return this.name;
}

public void setKey(Key key) {
this.key = key;
}

public Key getKey(){
return this.key;
}
}

and

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

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent
private String name;

@Persistent
private String description;

@Persistent
private String address;
...
}

I generate a set of Accounts, which belong to a tenant with this code:

PersistenceManager pm = PMF.get().getPersistenceManager();
KeyFactory.Builder keyBuilder = new KeyFactory.Builder
(Tenant.class.getSimpleName(), TenantX121); Key key =
keyBuilder.getKey();
Tenant tenant = new Tenant(TenantX121);
tenant.setKey(key);
pm.makePersistent(tenant);

for(int i = 1; i  1001; i++){
 keyBuilder = new 
KeyFactory.Builder(Tenant.class.getSimpleName
(), TenantX121);
 keyBuilder.addChild(Account.class.getSimpleName(), 
acctid+i);
 Key acckey = keyBuilder.getKey();

 Account acct = new Account(name, description,
address, ...);
 acct.setKey(acckey);
 pm.makePersistent(acct);
   }

Now I want to query all Accounts that belong to a tenant:

PersistenceManager pm = PMF.get().getPersistenceManager();
Transaction tx = pm.currentTransaction();

try {
  tx.begin();
   Key k = KeyFactory.createKey(Tenant.class.getSimpleName(),
TenantX121);
   //Tenant e = pm.getObjectById(Tenant.class, k);

  Query query = pm.newQuery(Account.class);
  query.setFilter(Key == keyParam);
  query.declareParameters(Key keyParam);
  ListAccount accounts = (ListAccount)query.execute(k);

But unfortunately this doesn't work. In the documentation
http://code.google.com/appengine/docs/java/datastore/transactions.html
example they query on parent-pk, but it is not clear, what parent-pk
is (is it an attribute or a metadatafield). Of course I also tried to
query on parent-pk, but whatever I do, I receive this error:

javax.jdo.JDOException: Key
at
org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException
(NucleusJDOHelper.java:475)
...
NestedThrowablesStackTrace:
Key
org.datanucleus.exceptions.ClassNotResolvedException: Key
at org.datanucleus.util.Imports.resolveClassDeclaration(Imports.java:
194)

I've also tried to add
@Persistent
@Extension(vendorName=datanucleus, key=gae.parent-pk,
value=true)
private Key customerKey;
to my Accountclass, but this would only be used if I would like
appengine to generate the Primarykey of the child objects itself I
suppose.
What am I doing wrong?

--

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




[appengine-java] How to design data model

2009-11-16 Thread fhucho
Hi,
I am developing the following app: user logs in and see list of items,
e.g. list of cars. Each item has a few parameters, for car item it can
be speed, color and manufacturer. User can add, edit and delete items.
Most importantly, user can change the item type - so for example he
can modify the car type in this way: remove speed parameter and add
price and weight parameters. Users should also be able to filter the
items by parameters.

This should be possible in my app: user creates Books I have read
item type with Title, Date and Rating parameters, adds several books
and then searches (filters) all books with rating greater than 3.

How should I design the datastore data model? Is this even possible in
App Engine?

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




[appengine-java] JDO not saved (commit) when using spring @ModelAttribute

2009-11-16 Thread Ibrahim Hamza
Dear All
I use JDO  with spring
and when i add @ModelAttribute(countries)
All things go fine except the data not saved without any exception
When query from another datastore


@Controller
public class PortController  {

private static final String FORM_MODEL_KEY = ports;

private static final String FORM_UPDATE_KEY = port/Edit;

private static final String REDIRECT_LIST_VIEW_KEY = redirect:/port/
home.htm ;

  @Autowired
  private PortDAO portDAO;
  @Autowired
  private CountryDAO countryDAO;

  public PortController() {}



  @InitBinder
  protected void initBinder(HttpServletRequest request,
  ServletRequestDataBinder binder) throws Exception {
  binder.registerCustomEditor(String.class, new
StringTrimmerEditor(false));
  binder.registerCustomEditor
(com.xesolution.domain.Country.class, new CountryEditor(countryDAO));

  }

  @RequestMapping(value=/port/home.htm)
  public ModelMap list() {
  return new ModelMap(FORM_MODEL_KEY,portDAO.readAll());
  }
  @RequestMapping(value=/port/new.htm)
  public ModelAndView create(){
  Port port = new Port();
  return new ModelAndView(FORM_UPDATE_KEY,FORM_MODEL_KEY,port);
  }
 @RequestMapping(value=/port/update.htm)
  public ModelAndView update(@RequestParam(id) String id) {
  Port result = portDAO.read(id);
  return new ModelAndView(FORM_UPDATE_KEY,FORM_MODEL_KEY, result);
  }


  @RequestMapping(value=/port/save.htm, method = RequestMethod.POST)
  public ModelAndView save(@ModelAttribute(FORM_MODEL_KEY) Port port,
BindingResult result, SessionStatus status) {

  new PortValidator().validate(port, result);
  if (result.hasErrors())
  {
return new ModelAndView(FORM_UPDATE_KEY, FORM_MODEL_KEY,
port);
  }
  else
  {
portDAO.persist(port);
return new ModelAndView(FORM_UPDATE_KEY, FORM_MODEL_KEY, port);
return new ModelAndView(REDIRECT_LIST_VIEW_KEY, list());
  }
  }

@ModelAttribute(countries)
public List? populateCountry() {
//this make data not saved
return countryDAO.readAll();
//But this make the data saved
//return portDAO.readAll();
}

  public void setPortDAO(PortDAO portDAO) {
this.portDAO = portDAO;
  }
}
and this is jsp line which display the form select
form:select path=country items=${countries} itemLabel=name
itemValue=id/

--

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




[appengine-java] how to find list of subscribed users for XMPP service?

2009-11-16 Thread Pratik
Can I get all contacts those subscribed to my application?

--

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




[appengine-java] Datastore: is numeric ID unique for all entities of one type?

2009-11-16 Thread elvin
Good day.

As far as documentation states, The key value includes the key of the
entity group parent (if any) and either the app-assigned string ID or
the system-generated numeric ID. To create the object with an app-
assigned string ID, you create the Key value with the ID and set the
field to the value. To create the object with a system-assigned
numeric ID, you leave the key field null.

Is this the id that can be accessed via Key#getId() call? I assume it
is.

My main question is: is this numeric ID guaranteed to be unique for
all entities of the same type?

If yes, how do you retrieve the entity using this id? I tried using
PersistenceManager#getObjectById(), but it does not find my entity. I
guess this is related to the fact that my entity is child in an entity
group, thus its keys' string representation would not be MyClass
(10) (which is created when I use KeyFactory to create key from an
entity type and a numeric ID) but MyParent(20)/MyClass(10).

Thanks in advance,
Evgeny.

--

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




[appengine-java] Re: batik

2009-11-16 Thread Dan Dubois
I would like to know the answer to this too as I can't seem to make it
work.

Best wishes,
Dan

On Nov 7, 8:53 pm, black_13 jjosb...@gmail.com wrote:
 Can the batik library for svg be used with the GAE java?
 regards,
 black_13

--

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




[appengine-java] Re: case sensitivity

2009-11-16 Thread Kris
I'm more concerned about the proper way to do this generically. I
can't realistically store duplicates of every string based field that
I may want to search for.


On Nov 16, 11:36 am, Rusty Wright rwright.li...@gmail.com wrote:
 The recommended approach is to store the userName in all lower case, as an 
 additional field/column, and then do the toLowerCase on the incoming 
 parameter user name when you do the query and use that field/column that was 
 stored in lower case.



 Kris wrote:
  Is there any way to perform a JDO query on google app engine using a
  case insensitive string comparison? e.g.

  For example,
             Query query = pm.newQuery(User.class, userName.toLowerCase() ==
  user  password == pass);
             query.declareParameters(String user, String pass);
             query.setUnique(true);
             User user = (User) query.execute(userName.toLowerCase(), 
  password);

  Of course GAE does not support the usage of toLowerCase() in the
  filter string.

  There's probably a terribly simple way to do this that I'm just not
  aware of.

  --

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

--

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




Re: [appengine-java] Re: Delete task queue

2009-11-16 Thread Ikai L (Google)
Peter,

File a bug if you can. Even though it's experimental, it's been released to
the public and we can use all the help we can get when prioritizing issues.
Thanks!

On Mon, Nov 16, 2009 at 7:52 AM, Peter Ondruska peter.ondru...@gmail.comwrote:

 OK, seems like a bug to me. Does it make sense to file an issue for
 this as it is experimental feature or shall I wait until it is more
 mature? Peter

 On Nov 13, 9:20 am, Peter Ondruska peter.ondru...@gmail.com wrote:
  Ikai, the application id is kaibo-www
 
  On 11 lis, 22:31, Peter Ondruska peter.ondru...@gmail.com wrote:
 
 
 
   Ikai, I have updated_queues (queue.xml follows) but thequeueis still
   there.
 
   ?xml version=1.0 encoding=UTF-8?
   queue-entries xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:noNamespaceSchemaLocation=http://googleappengine.googlecode.com/
   svn/trunk/java/docs/queue.xsd
 !--queue
   nameipn-queue/name
   rate5/s/rate
   bucket-size5/bucket-size
 /queue--
   /queue-entries
 
   On 10 lis, 23:58, Ikai L (Google) ika...@google.com wrote:
 
Peter,
 
Were you able todeletethe taskqueue? One thing you can try is using
 the
update_queue command line tool with your XML file:
 
./appengine-java-sdk/bin/appcfg.sh update_queues myapp/war
 
This is described here:
 http://code.google.com/appengine/docs/java/config/queue.html
 
This should take a few minutes to propagate.
 
Ikai
 
On Tue, Nov 10, 2009 at 8:24 AM, Peter Ondruska 
 peter.ondru...@gmail.comwrote:
 
 Actually I am not sure, so I deleted the other version. But
 thisqueue
 still exists. I will wait one more day. Thanks
 
 On 9 lis, 23:41, victor victoraco...@gmail.com wrote:
  You might have a previous version of the app that still refers to
 the
  oldqueue.Deletethose versions.
 
  On Nov 9, 7:29 am, Peter Ondruska peter.ondru...@gmail.com
 wrote:
 
   I have defined taskqueueusingqueue.xml but later decided not to
 use
   it. It still appears inqueuelist in app engine. How do
 Ideletethis
   taskqueue? Uploadingqueue.xml with empty queue-entries?
 Thanks,
   Peter
 
--
Ikai Lan
Developer Programs Engineer, Google App Engine

 --

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





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




[appengine-java] Re: EntityGroup getting all children of a parent

2009-11-16 Thread datanucleus
   Query query = pm.newQuery(Account.class);
 org.datanucleus.exceptions.ClassNotResolvedException: Key
         at org.datanucleus.util.Imports.resolveClassDeclaration(Imports.java:

As the message says ... Key is not resolved to be a class. It
certainly isn't a field, but you do have a field with lowercase k if
that is what you meant to type.

--

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




[appengine-java] Re: EntityGroup getting all children of a parent

2009-11-16 Thread Bitscorpion
sorry, was just a typo. of course it is   query.setFilter(key ==
keyParam); but the error is the same

On Nov 16, 10:15 pm, datanucleus andy_jeffer...@yahoo.com wrote:
    Query query = pm.newQuery(Account.class);
  org.datanucleus.exceptions.ClassNotResolvedException: Key
          at 
  org.datanucleus.util.Imports.resolveClassDeclaration(Imports.java:

 As the message says ... Key is not resolved to be a class. It
 certainly isn't a field, but you do have a field with lowercase k if
 that is what you meant to type.

--

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




[appengine-java] Re: Can't send mail with attachment using JavaMail API

2009-11-16 Thread mably
Hi Ikai, thanx for you help.

I've copy pasted your code on my webapp (webwinewatch), I've no error
but the mail isn't correctly relayed, all attachements are removed.

I've just modified the sender, from and recipient lines :

message.setSender(new InternetAddress(myaddress@gmail.com, Relay
account));
message.setFrom(message.getSender());
message.setRecipient(Message.RecipientType.TO, message.getSender());

Do you have any clue ?

You can test it, sending an email to : contact-
t...@webwinewatch.appspotmail.com

Thanx again for your help.

On 16 nov, 21:35, Ikai L (Google) ika...@google.com wrote:
 I couldn't reproduce your exact error, but I was able to put together a
 working example of an inbound email handler to relay messages. I'm going to
 expand the documentation about processing inbound emails. Here's some
 working code:http://pastie.org/701517

 Does this example help any? Code is also pasted below, but it'll be easier
 for you to look at the Pastie.

 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.ServletException;
 import javax.mail.*;
 import javax.mail.util.ByteArrayDataSource;
 import javax.mail.internet.MimeMessage;
 import javax.mail.internet.MimeMultipart;
 import javax.mail.internet.MimeBodyPart;
 import javax.mail.internet.InternetAddress;
 import javax.activation.DataHandler;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.logging.Logger;
 import java.util.Properties;

 public class MailHandlerServlet extends HttpServlet {
     private static final Logger log =
 Logger.getLogger(MailHandlerServlet.class.getName());
     private static final String RECIPIENT = recipi...@gmail.com;
     private static final String SENDER = sen...@google.com;

     protected void doPost(HttpServletRequest request, HttpServletResponse
 response) throws ServletException, IOException {
         Properties props = new Properties();
         Session session = Session.getDefaultInstance(props, null);
         try {
             MimeMessage message = new MimeMessage(session,
 request.getInputStream());

             Object content = message.getContent(); // You could also
 probably just use message.getInputStream() here
                                                    // and avoid the
 conditional type check

             if (content instanceof String) {
                 log.info(Received a string);
             } else if (content instanceof InputStream) {
                 // My somewhat limited testing indicates that this is always
 getting returned as an
                 // InputStream

                 InputStream inputStream = (InputStream) content;
                 ByteArrayDataSource inboundDataSource = new
 ByteArrayDataSource(inputStream, message.getContentType());
                 Multipart inboundMultipart = new
 MimeMultipart(inboundDataSource);

                 // Set the body with whatever text you want
                 Multipart outboundMultipart = new MimeMultipart();
                 MimeBodyPart messageBodyPart = new MimeBodyPart();
                 messageBodyPart.setText(Set your body here);
                 outboundMultipart.addBodyPart(messageBodyPart);

                 // Loop over the multipart message coming in and
                 // append them to the outbound Multipart object
                 for (int i = 0; i  inboundMultipart.getCount(); i++) {
                     BodyPart part = inboundMultipart.getBodyPart(i);
                     /*
                         The content-disposition header is optional:
                        http://www.ietf.org/rfc/rfc1806.txt

                         This header specifies the filename and type of
                         a MIME part.
                     */
                     if(part.getDisposition() == null) {
                         // This is just a plain text email
                     } else {
                         // We have something interesting. Let's parse it.

                         // Create a new ByteArrayDataSource with this part
                         MimeBodyPart inboundMimeBodyPart = (MimeBodyPart)
 part;
                         InputStream is = part.getInputStream();
                         ByteArrayDataSource mimePartDataSource = new
 ByteArrayDataSource(is, inboundMimeBodyPart.getContentType());

                         // Create a new outbound MimeBodyPart and set this
 as the handler
                         MimeBodyPart outboundMimeBodyPart = new
 MimeBodyPart();
                         outboundMimeBodyPart.setDataHandler(new
 DataHandler(mimePartDataSource));

 outboundMimeBodyPart.setFileName(inboundMimeBodyPart.getFileName());
                         outboundMultipart.addBodyPart(outboundMimeBodyPart);

                     }

                 }
                 message.setContent(outboundMultipart);

             }
             message.setFrom(new 

Re: [appengine-java] Problems with large request/response headers

2009-11-16 Thread Ikai L (Google)
Matt,

This looks like it may be a JeTTy issue:
http://jira.codehaus.org/browse/JETTY-336

That being said, I'm curious as to what data you are storing in the cookie.
Less than 1.5% of sites pass cookies larger than 1501 bytes, and there are
performance implications for passing large amounts of cookies:
http://yuiblog.com/blog/2007/03/01/performance-research-part-3

 Is this data you can store in the session instead?

On Fri, Nov 13, 2009 at 12:05 PM, Matthew McGinty mcgin...@gmail.comwrote:

 I'm using the GAE Java Dev Server (i.e. Jetty).
 When I request a page that sends a large amount of cookie data to the
 browser and then re-request the page (so that the browser sends the
 cookies back to the server) I get this stacktrace:

 ==
 Nov 13, 2009 6:35:13 PM com.google.apphosting.utils.jetty.JettyLogger
 warn
 WARNING: handle failed
 java.io.IOException: FULL head
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:276)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run
 (SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
 (BoundedThreadPool.java:442)
 ==

 The behavior I see is that the browser receives what seems to be a
 completely empty response body, and the access log does not show the
 request at all (likely because the request/response protocol was
 halted when the exception occured). If I configure my browser to send
 its requests through a diagnostic proxy tool, I can see that the
 request headers being sent are about 5k total. But the response takes
 2-3 minutes to come. Once it does, the proxy tool shows me only
 response headers (no response body):

 ===
 HTTP/1.1 200 OK
 Content-Type: text/html; charset=utf-8
 Expires: Thu, 01 Jan 1970 00:00:00 GMT
 Set-Cookie: cookie name 1=cookie value 1
 Set-Cookie: cookie name 2=cookie value 2
 Set-Cookie: cookie name 3=cookie value 3
 Transfer-Encoding: chunked
 Server: Jetty(6.1.x)
 ===

 which I suppose explains why the browser renders it as an empty
 response.

 I found a clue here:


 http://mail-archives.apache.org/mod_mbox/geronimo-dev/200711.mbox/%3c8189103.1194033655205.javamail.j...@brutus%3e

 I've confirmed that if I delete the cookies from my browser and re-
 request... the problem does not occur for that request.
 In other words the problem only occurs when the browser is sending a
 large amount of request headers (In my case cookies it already
 received from a previous request to the test page).

 However the solution given is to switch from Jetty to Tomcat, which is
 not something that can be done when using GAE Java Dev server.
 So... does anyone know if the Jetty that's bundled with GAE Java Dev
 Server can be configured to use a larger buffer for the *request*
 headers?
 And if so... how?

 A JVM System property perhaps... passed in the WEB-INF/appengine-
 web.xml file?

 I also ran the same test/request on regular (non-Google App Engine)
 Jetty (v 6.1.16) and get the same observed behavior (empty response
 received) however the stacktrace is quite different suggesting that
 the problem is now with the size of the buffer used for the *response*
 headers:

 =
 java.lang.ArrayIndexOutOfBoundsException: 4096
at org.mortbay.io.ByteArrayBuffer.poke(ByteArrayBuffer.java:
 268)
at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:456)
at org.mortbay.jetty.HttpFields$Field.put(HttpFields.java:
 1384)
at org.mortbay.jetty.HttpGenerator.completeHeader
 (HttpGenerator.java:523
 )
at org.mortbay.jetty.HttpConnection.commitResponse
 (HttpConnection.java:6
 11)
at org.mortbay.jetty.HttpConnection$Output.flush
 (HttpConnection.java:946
 )
at org.mortbay.jetty.AbstractGenerator$OutputWriter.flush
 (AbstractGenera
 tor.java:733)
at java.io.PrintWriter.flush(Unknown Source)
 =

 I once again configured my browser to send all its requests through my
 diagnostic proxy tool.
 The tool shows me that the response that comes from Jetty (after 2-3
 minutes) is:

 
 HTTP/1.1 413 FULL head
 Connection: close
 Server: Jetty(6.1.16)
 

 The 413 Response status code means Request Entity Too Large and the
 HTTP spec says that the server may close the connection in that case.

 Once again I used my proxy tool to confirm that the size of the
 request headers is about 5k.
 In all cases it is a simple GET request so there is no request body
 (i.e. payload).

 Can't Jetty take more than 5k of request headers???

 --

 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
 

Re: [appengine-java] Querying sub objects with JDOQL in GAE/J

2009-11-16 Thread Ikai L (Google)
Can you post the queries you have attempted as well as the errors?

On Tue, Nov 10, 2009 at 10:40 PM, enthusiast itzraj...@gmail.com wrote:


 I have a very basic question about JDOQL with GAE/J. Hope someone can
 shine light on this:

 I have modeled two persistent objects Employee and ContactInfo such
 that Employee contains an instance of ContactInfo, as follows:

 ContactInfo.java

 import com.google.appengine.api.datastore.Key;
 // ... imports ...

 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class ContactInfo {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent
private String city;

// ...
 }


 Employee.java

 import ContactInfo;
 // ... imports ...

 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Employee {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent
private Integer salary;

@Persistent
private ContactInfo contactInfo;

Integer getSalary() {
return salary;
}

void setSalary(Integer salary) {
this.salary = salary;
}

ContactInfo getContactInfo() {
return contactInfo;
}

void setContactInfo(ContactInfo contactInfo) {
this.contactInfo = contactInfo;
}

// ...
 }

 I am able to create instances of Employee with relevant ContactInfo
 objects. However, I am not able to query for Employee which uses a
 field on the ContactInfo object. E.g. If I want to retrieve only those
 employees whose salary  1 AND ContactInfo.city == New York, how
 do I construct such a query?

 If I just want to query on the field in the Employee object, I get the
 results, but when I use a field in the sub-object of Employee (i.e.
 ContactInfo) I get an error.

 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-java@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
 -~--~~~~--~~--~--~---




-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




[appengine-java] Re: jdo autorefer table

2009-11-16 Thread ale
Solved.
I remove the (serialized = true) from the list and add
pm.detacheCopy when I return data from the entity user.
Now it's work fine.





On Nov 16, 11:14 pm, ale aleee...@gmail.com wrote:
 Hello,
 I have an entity and I want to menage some contacts, so I think to
 include a list of contact in the entity, the list of contats are a
 list of PrimiryKey of other User.
 It is all ok eccept whene I try to delete a contact. I don't receive
 error, but the contact will not delete.

 this is the user:

 class UserDAO {

         @Persistent
         @PrimaryKey
         private String emailKey;
         
         @Persistent(serialized = true)
         private ListString contacts;  // in the list other emailKey...

 }

 in the business  class

         @Override
         public void removeContact(User user, User contact) {
                 PersistenceManager pm = PMF.get().getPersistenceManager();
                 try {
                         UserDAO userDao = pm.getObjectById(UserDAO.class, 
 user.getEmailKey
 ());
                         userDao.getContacts().remove(contact.getEmailKey());
                         pm.makePersistent(userDao);
                 } finally {
                         pm.close();
                 }

         }

 I don't understand where is the mistake... (the similar  method
 addContact work fine...)

 thanks!

 Ale

--

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




Re: [appengine-java] Re: case sensitivity

2009-11-16 Thread Rusty Wright
http://groups.google.com/group/google-appengine-java/search?group=google-appengine-javaq=lowercase+queryqt_g=Search+this+group


Kris wrote:
 I'm more concerned about the proper way to do this generically. I
 can't realistically store duplicates of every string based field that
 I may want to search for.
 
 
 On Nov 16, 11:36 am, Rusty Wright rwright.li...@gmail.com wrote:
 The recommended approach is to store the userName in all lower case, as an 
 additional field/column, and then do the toLowerCase on the incoming 
 parameter user name when you do the query and use that field/column that was 
 stored in lower case.



 Kris wrote:
 Is there any way to perform a JDO query on google app engine using a
 case insensitive string comparison? e.g.
 For example,
Query query = pm.newQuery(User.class, userName.toLowerCase() ==
 user  password == pass);
query.declareParameters(String user, String pass);
query.setUnique(true);
User user = (User) query.execute(userName.toLowerCase(), 
 password);
 Of course GAE does not support the usage of toLowerCase() in the
 filter string.
 There's probably a terribly simple way to do this that I'm just not
 aware of.
 --
 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=.
 
 --
 
 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=.
 
 

--

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




Re: [appengine-java] JDO not saved (commit) when using spring @ModelAttribute

2009-11-16 Thread Rusty Wright
Forgot to add; here's how I used it in my web.xml:

filter
filter-name
OpenPersistenceManagerInViewFilter
/filter-name

filter-class

org.springframework.orm.jdo.support.OpenPersistenceManagerInViewFilter
/filter-class
/filter

filter-mapping
filter-name
OpenPersistenceManagerInViewFilter
/filter-name

url-pattern/*/url-pattern
/filter-mapping

The other thing you could do is use the persistenceManager's detachCopy method 
on anything you're sending out to the web view layer.


Ibrahim Hamza wrote:
 Dear All
 I use JDO  with spring
 and when i add @ModelAttribute(countries)
 All things go fine except the data not saved without any exception
 When query from another datastore
 
 
 @Controller
 public class PortController  {
 
 private static final String FORM_MODEL_KEY = ports;
 
 private static final String FORM_UPDATE_KEY = port/Edit;
 
 private static final String REDIRECT_LIST_VIEW_KEY = redirect:/port/
 home.htm ;
 
   @Autowired
   private PortDAO portDAO;
   @Autowired
   private CountryDAO countryDAO;
 
   public PortController() {}
 
 
 
   @InitBinder
   protected void initBinder(HttpServletRequest request,
 ServletRequestDataBinder binder) throws Exception {
   binder.registerCustomEditor(String.class, new
 StringTrimmerEditor(false));
   binder.registerCustomEditor
 (com.xesolution.domain.Country.class, new CountryEditor(countryDAO));
 
   }
 
   @RequestMapping(value=/port/home.htm)
   public ModelMap list() {
   return new ModelMap(FORM_MODEL_KEY,portDAO.readAll());
   }
   @RequestMapping(value=/port/new.htm)
   public ModelAndView create(){
 Port port = new Port();
 return new ModelAndView(FORM_UPDATE_KEY,FORM_MODEL_KEY,port);
 }
  @RequestMapping(value=/port/update.htm)
   public ModelAndView update(@RequestParam(id) String id) {
 Port result = portDAO.read(id);
   return new ModelAndView(FORM_UPDATE_KEY,FORM_MODEL_KEY, result);
   }
 
 
   @RequestMapping(value=/port/save.htm, method = RequestMethod.POST)
   public ModelAndView save(@ModelAttribute(FORM_MODEL_KEY) Port port,
 BindingResult result, SessionStatus status) {
 
   new PortValidator().validate(port, result);
   if (result.hasErrors())
   {
 return new ModelAndView(FORM_UPDATE_KEY, FORM_MODEL_KEY,
 port);
   }
   else
   {
   portDAO.persist(port);
   return new ModelAndView(FORM_UPDATE_KEY, FORM_MODEL_KEY, port);
 return new ModelAndView(REDIRECT_LIST_VIEW_KEY, list());
   }
   }
 
   @ModelAttribute(countries)
   public List? populateCountry() {
   //this make data not saved
   return countryDAO.readAll();
   //But this make the data saved
   //return portDAO.readAll();
   }
 
   public void setPortDAO(PortDAO portDAO) {
 this.portDAO = portDAO;
   }
 }
 and this is jsp line which display the form select
 form:select path=country items=${countries} itemLabel=name
 itemValue=id/
 
 --
 
 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=.
 
 

--

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




[appengine-java] Ancestor queries in JPQL? / Getting Key of parameter value does not have a parent

2009-11-16 Thread Todd Vierling
Test app to reproduce:

http://ancestortest.latest.duh-test.appspot.com/

Source code:

http://ancestortest.latest.duh-test.appspot.com/src/ancestortest/AncestorTestServlet.java
http://ancestortest.latest.duh-test.appspot.com/src/ancestortest/UserAccount.java
http://ancestortest.latest.duh-test.appspot.com/src/ancestortest/UserAccountModification.java

This sample code basically creates two UserAccount objects and
attaches a UserAccountModification to one of them.  Then, a query
(which, unless the datastore is really slow, should return an empty
list):

=
Query q = em.createQuery(select m from
UserAccountModification m where m.modTime  :newest and m.owner
= :owner order by modTime desc);
q.setParameter(newest, System.currentTimeMillis() -
1L);
q.setParameter(owner, user1);
ListUserAccountModification mods = q.getResultList();
=

I get the following exception:

javax.persistence.PersistenceException: SELECT FROM
UserAccountModification m WHERE m.modTime  :newest and m.owner
= :owner ORDER BY modTime desc: Key of parameter value does not have a
parent.
at
org.datanucleus.jpa.NucleusJPAHelper.getJPAExceptionForNucleusException
(NucleusJPAHelper.java:264)
at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:179)
at ancestortest.AncestorTestServlet.doGet(AncestorTestServlet.java:
46)

I must be missing something here.  The docs for GAE talk about
ensuring the use of ancestor filters when inside a transaction, for
instance, and there's the ANCESTOR IS operator in GQL.  However, I
can't seem to figure out how properly to express this in JPQL (as
ANCESTOR IS is a syntax error there), and there's no docs that I can
find on doing this in JPA.

The query is meant to find UserAccountModification objects all
residing under a given owner, which happens to be the ancestor of
those objects.  Is there a proper expression for this using JPQL?

--

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




Re: [appengine-java] 500 Internal Server Error, when update appl

2009-11-16 Thread Jackob
The problem is not fixed , i can't upload update.
The happened only with my account?

On Mon, Nov 16, 2009 at 11:59 PM, Ikai L (Google) ika...@google.com wrote:

 Have you been able to update this application?

 On Wed, Nov 11, 2009 at 11:53 PM, Jackroz jrozn...@gmail.com wrote:

 Hi Team,

 Last two day i can't update  appl, what is wrong?

 Please see detail log:

 Unable to update:
 java.io.IOException: Error posting to URL:

 http://appengine.google.com/api/appversion/cloneblobs?app_id=aapcoreversion=2;
 500 Internal Server Error

 Server Error (500)
 A server error has occurred.

at com.google.appengine.tools.admin.ServerConnection.send
 (ServerConnection.java:143)
at com.google.appengine.tools.admin.ServerConnection.post
 (ServerConnection.java:81)
at com.google.appengine.tools.admin.AppVersionUpload.send
 (AppVersionUpload.java:427)
at com.google.appengine.tools.admin.AppVersionUpload.cloneFiles
 (AppVersionUpload.java:293)
at
 com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
 (AppVersionUpload.java:255)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
 (AppVersionUpload.java:98)
at com.google.appengine.tools.admin.AppAdminImpl.update
 (AppAdminImpl.java:56)
at com.google.appengine.tools.admin.AppCfg$UpdateAction.execute
 (AppCfg.java:521)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:130)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:58)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:54)
 com.google.appengine.tools.admin.AdminException: Unable to update app:
 Error posting to URL:
 http://appengine.google.com/api/appversion/cloneblobs?app_id=aapcoreversion=2;
 500 Internal Server Error

 Server Error (500)
 A server error has occurred.

at com.google.appengine.tools.admin.AppAdminImpl.update
 (AppAdminImpl.java:62)
at com.google.appengine.tools.admin.AppCfg$UpdateAction.execute
 (AppCfg.java:521)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:130)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:58)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:54)
 Caused by: java.io.IOException: Error posting to URL:

 http://appengine.google.com/api/appversion/cloneblobs?app_id=aapcoreversion=2;
 500 Internal Server Error

 Server Error (500)
 A server error has occurred.

at com.google.appengine.tools.admin.ServerConnection.send
 (ServerConnection.java:143)
at com.google.appengine.tools.admin.ServerConnection.post
 (ServerConnection.java:81)
at com.google.appengine.tools.admin.AppVersionUpload.send
 (AppVersionUpload.java:427)
at com.google.appengine.tools.admin.AppVersionUpload.cloneFiles
 (AppVersionUpload.java:293)
at
 com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
 (AppVersionUpload.java:255)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
 (AppVersionUpload.java:98)
at com.google.appengine.tools.admin.AppAdminImpl.update
 (AppAdminImpl.java:56)
... 4 more


 --

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





 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine

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




-- 
Best regards,
Yakov Liskoff

Mobile: 972-54-4512963
Email: jrozn...@gmail.com
Web:  http://www.vcomm.co.nr
IM: jackobl (Skype)

-
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
-

--

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




[google-appengine] Python webapp framework and REST API

2009-11-16 Thread Devraj Mukherjee
Hi all,

We are writing an app with Python AppEngine and Closure. I am trying
to follow a few articles I found on how to write your own REST
services (properly). What I have gathered from reading these documents
is that when using PUT or POST I should send back formed data say in
XML or JSON.

I am sending this as part of the POST or PUT data. The webapp
framework seems to want to parse the input into name value pairs
(which makes sense), how do I access this whole string from the
request?

Thanks for any pointers.

-- 
The secret impresses no-one, the trick you use it for is everything
- Alfred Borden (The Prestiege)

--

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




[google-appengine] Unable to appcfg.py update to my app

2009-11-16 Thread Tom Wu
2009-11-16 17:07:09,967 ERROR appcfg.py:1235 An unexpected error occurred.
Aborting.
Traceback (most recent call last):
  File D:\gae\google\appengine\tools\appcfg.py, line 1213, in DoUpload
missing_files = self.Begin()
  File D:\gae\google\appengine\tools\appcfg.py, line 1009, in Begin
version=self.version, payload=self.config.ToYAML())
  File D:\gae\google\appengine\tools\appengine_rpc.py, line 303, in Send
f = self.opener.open(req)
  File C:\PYTHON25\LIB\urllib2.py, line 387, in open
response = meth(req, response)
  File C:\PYTHON25\LIB\urllib2.py, line 498, in http_response
'http', request, response, code, msg, hdrs)
  File C:\PYTHON25\LIB\urllib2.py, line 425, in error
return self._call_chain(*args)
  File C:\PYTHON25\LIB\urllib2.py, line 360, in _call_chain
result = func(*args)
  File C:\PYTHON25\LIB\urllib2.py, line 506, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
Error 500: --- begin server output ---

htmlhead
meta http-equiv=content-type content=text/html;charset=utf-8
title500 Server Error/title
/head
body text=#00 bgcolor=#ff
h1Error: Server Error/h1
h2The server encountered an error and could not complete your
request.pIf the problem persists, please A HREF=
http://code.google.com/appengine/support/
report/A your problem and mention this error message and the query that
caused it./h2
h2/h2
/body/html
--- end server output ---


Regards
Tom Wu

--

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




[google-appengine] Re: How to design data model

2009-11-16 Thread fhucho
Unfortunately, I'm not using Python... is there a way to make this
work in Java?

On Nov 16, 5:38 am, niklasr nikla...@gmail.com wrote:
 On Nov 15, 5:48 pm, fhucho fhu...@gmail.com wrote: Hi,
  I am developing a web app, where users should be able to (in this
  order):
      1) create their item type (item type can be everything - car,
  book, movie..., item type has some user defined parameters,
  like                                        price, rating)
      2) add items of their type - e.g. they can create book type (with
  title, author, rating parameters) and then add books
      3) view, filter (at least by one parameter), delete, edit their
  items

  How should I design the data model? Is this even posible in App
  Engine?

  Thanks in advance

 django has impressive builtin editor for our models with
 djangoforms.ModelForm seen 
 onhttp://code.google.com/appengine/articles/djangoforms.html
 Theoretically the create CRUD and/or factory 
 patternhttp://en.wikipedia.org/wiki/Factory_method_pattern
 I recommend and use for likewise. The 
 categoryproperty.dbhttp://code.google.com/appengine/docs/python/datastore/typesandproper...
 seems obvious choice which needs documention how it differs from a
 word. app I maintain has similar function, create item, add item,
 edit, view, filter by longitude latitude and/or category
 (www.koolbusiness.com/ai) sourced montao.googlecode.com
 Sincerely
 Nick RTZ

--

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




[google-appengine] Unable to appcfg.py update again !

2009-11-16 Thread Tom Wu
2009-11-16 20:53:09,890 ERROR appcfg.py:1235 An unexpected error occurred.
Aborting.
Traceback (most recent call last):
  File D:\gae\google\appengine\tools\appcfg.py, line 1213, in DoUpload
missing_files = self.Begin()
  File D:\gae\google\appengine\tools\appcfg.py, line 1009, in Begin
version=self.version, payload=self.config.ToYAML())
  File D:\gae\google\appengine\tools\appengine_rpc.py, line 303, in Send
f = self.opener.open(req)
  File C:\PYTHON25\LIB\urllib2.py, line 387, in open
response = meth(req, response)
  File C:\PYTHON25\LIB\urllib2.py, line 498, in http_response
'http', request, response, code, msg, hdrs)
  File C:\PYTHON25\LIB\urllib2.py, line 425, in error
return self._call_chain(*args)
  File C:\PYTHON25\LIB\urllib2.py, line 360, in _call_chain
result = func(*args)
  File C:\PYTHON25\LIB\urllib2.py, line 506, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
Error 500: --- begin server output ---

htmlhead
meta http-equiv=content-type content=text/html;charset=utf-8
title500 Server Error/title
/head
body text=#00 bgcolor=#ff
h1Error: Server Error/h1
h2The server encountered an error and could not complete your
request.pIf the problem persists, please A HREF=
http://code.google.com/appengine/support/
report/A your problem and mention this error message and the query that
caused it./h2
h2/h2
/body/html
--- end server output ---

--

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




[google-appengine] Limit on image size very low

2009-11-16 Thread Bjoern
Hi,

the imaging service limitation of 1MB for the maximum image size seems
very low. Most cameras create bigger images by now.

Any chance of increasing that limit? It would be nice if people could
upload images to my app without having to go through a photo editor
first. In fact avoiding the photo editor was one of the reasons I
started to program the app.

Unfortunately I saw the 1MB only in the midst of coding, as it is not
listed together with the other quotas.

Thanks!


Björn

--

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




[google-appengine] Quota on number of entity types / kinds?

2009-11-16 Thread RyanD
A couple of quota questions:

1)  Mainly:  I'm looking to develop an application that has an
*unbounded* number of entity types / kinds (by using the low level
Java API). Is this possible, or is there some limit to the number of
entity types / kinds that an application may have?

2)  Any limit on the number of entries for a single entity type /
kind?

Thanks,

Ryan

--

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




[google-appengine] ViewDoesNotExist at /join No module named atom.service

2009-11-16 Thread Cage
Hello,

I have been trying to setup jaiku microblogging engine on appengine. I
could successfully load the homepage. However, when I click on 'Join'
button it is giving the below pasted error. I can furnish the complete
stack trace if it would help.

Please help me with this.

Regards,
Cage

Request Method: GET
Request URL:http://inchara01.appspot.com/join
Exception Type: ViewDoesNotExist
Exception Value:

Could not import join.views. Error was: No module named atom.service

Exception Location: /base/data/home/apps/
inchara01/1.337765706044725588/django.zip/django/core/urlresolvers.py
in _get_callback, line 132
Python Executable:  /base/
Python Version: 2.5.2
Python Path:['/base/data/home/apps/inchara01/1.337765706044725588',
'atom.zip', 'cleanliness.zip', 'oauth.zip', 'elementtree.zip',
'beautifulsoup.zip', 'simplejson.zip', 'markdown.zip', 'wsgiref.zip',
'epydoc.zip', 'django.zip', 'gdata.zip', '/base/data/home/apps/
inchara01/1.337765706044725588/django.zip', '/base/python_dist/lib/
python25.zip', '/base/python_lib/versions/third_party/django-0.96', '/
base/python_dist/lib/python2.5/', '/base/python_dist/lib/python2.5/
plat-linux2', '/base/python_dist/lib/python2.5/lib-tk', '/base/
python_dist/lib/python2.5/lib-dynload', '/base/python_lib/versions/1',
'/base/data/home/apps/inchara01/1.337765706044725588/']
Server time:Sun, 15 Nov 2009 08:58:23 +

--

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




[google-appengine] Naked domains: why is it not supported?

2009-11-16 Thread Bart Burkhardt
I'm so disapointed with Google at the moment. I'm about to deploy a
short url service to Google App Engine and find out that naked domains
are not supported.

I really really want to know the reason that this decision was made,
is Google listening in this discussion group? Please tell us why it's
not supported.

Also I would like to know more about the 4 IP addresses that existing
short url services (ur.ly, urlborg.com) use, the IP adresses that are
used are;

216.239.32.21
216.239.34.21
216.239.36.21
216.239.38.21

I've just setup these IP Adresses, but get a The requested URL / was
not found on this server error

--

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




[google-appengine] Naked domains: why is it not supported?

2009-11-16 Thread Bart Burkhardt
I'm so disapointed with Google at the moment. I'm about to deploy a
short url service to Google App Engine and find out that naked domains
are not supported.

I really really want to know the reason that this decision was made,
is Google listening in this discussion group? Please tell us why it's
not supported.

Also I would like to know more about the 4 IP addresses that existing
short url services (ur.ly, urlborg.com) use, the IP adresses that are
used are;

216.239.32.21
216.239.34.21
216.239.36.21
216.239.38.21

I've just setup these IP Adresses, but get a The requested URL / was
not found on this server error

--

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




[google-appengine] Can't get owned relationship working with JDO and subclass

2009-11-16 Thread Rick Horowitz
I'm trying to persist a simple class relationship using JDO. My code
is listed below and here's a brief overview of what I'm trying to do:

I have 3 classes:

Person, Customer (extends Person), and Address (referenced from
Person). If I create a Person instance and an Address instance and
call setAddress() on Person, then call
PersistenceManager.makePersistent(), the objects get saved correctly.

However, if I create a Customer instance and an Address instance, I
get the following error message:

java.lang.IllegalArgumentException: can't operate on multiple entity
groups in a single transaction. found both Element {
  type: Customer
  id: 1
}
 and Element {
  type: Address
  id: 2
}

I am doing this from within a JDO transaction.

Here's the code:

First, the server-side code that attempts to create and persist the
objects:
---

PersistenceManager pm = PMF.get().getPersistenceManager();
Transaction txn = pm.currentTransaction();
try {
txn.begin();
Address a = new Address(15 Post Road, , Anytown, 
New York,
USA, 03801);
Customer c = new Customer();
c.setAddress(a);
c.setFirstName(John);
c.setLastName(Doe);
pm.makePersistent(c);
txn.commit();
} finally {
if (txn.isActive()) {
txn.rollback();
}
pm.close();
}

Person:
---

@PersistenceCapable(identityType = IdentityType.APPLICATION)
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class Person implements Serializable {

public static enum PERSON_KEYS {
firstName,
lastName,
workEmail,
phoneNbr
}
static final long serialVersionUID = 100L;

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName = datanucleus, key = gae.encoded-pk,
value=true)
private String key;
private String firstName;
private String lastName;
private String middleInitial;
private String workEmail;
private String homeEmail;
private String phoneNbr;
@Persistent
private Address address = new Address();
private String salutation;

public Person() {
}

public String getKey() {
return key;
}

public void setKey(String key) {
this.key = key;
}

public String getWorkEmail() {
return (this.workEmail);
}

public void setWorkEmail(String workEmail) {
this.workEmail = workEmail;
}

public String getHomeEmail() {
return homeEmail;
}

public void setHomeEmail(String homeEmail) {
this.homeEmail = homeEmail;
}

@NotPersistent
public String getEmailAddress() {
String emailAddr = getWorkEmail();
if ((emailAddr == null) || (emailAddr.length() ==0))
emailAddr = getHomeEmail();
return emailAddr;
}

public void setEmailAddress(String emailAddress) {
setWorkEmail(emailAddress);
}

@NotPersistent
public String getFullName() {
StringBuffer sb = new StringBuffer();
if (getFirstName() != null) {
sb.append(getFirstName());
sb.append( );
}
if ((getMiddleInitial() != null)  
(getMiddleInitial().length() 
0)) {
sb.append(getMiddleInitial());
sb.append( );
}
if (getLastName() != null) {
sb.append(getLastName());
}
return sb.toString();
}

public String getFirstName() {
return (this.firstName);
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getLastName() {
return (this.lastName);
}

public void setLastName(String lastName) {
this.lastName = lastName;
}

public Address getAddress() {


public void setAddress(Address address) {
this.address = address;
}

public String getMiddleInitial() {
return middleInitial;
}

public void setMiddleInitial(String middleInitial) {
this.middleInitial = middleInitial;
}

public String getPhoneNbr() {
return 

[google-appengine] Struggling to Upload a CSV file to AppEngine Datastore

2009-11-16 Thread Benjamin Mayo
Bear with me here. I have never used python at the *commandline*
before. Ever.

I have a .CSV file containing the database I would like to upload to
my GAE datastore. I have followed the documentation provided, but the
python shell keeps returning errors (syntax: update_data). Please can
someone step me through how to import the CSV file into AppEngine.

Thankyou for any help you can give, which - I promise - is greatly
appreciated.

--

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




[google-appengine] Re: Upload data to development server

2009-11-16 Thread Conchi
Next worked for me:

- removing the line

login:admin

from app.yaml

- Updating app cofig:

appcfg.py update [app-id]

- (Re)starting local server:

appserver [app-id]

- Upload data:

appcfg.py upload_data --config_file=album_loader.py --filename
album_data.csv --kind Album --url=http://localhost:8080/remote_api ../
[app-id]

When ask for mail and password type anything

--

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




[google-appengine] Re: Problem with SMS verification

2009-11-16 Thread Matt Passell
Hi Ikai,

I added myself to the waitlist.  Do you know how long it takes to hear
back?  I'm going to be participating in a Google Wave hackathon on
Saturday (Nov. 21) and was hoping to be able to deploy at least one
robot to App Engine.

Thanks,
Matt

On Nov 11, 1:33 pm, Ikai L (Google) ika...@google.com wrote:
 Barna,

 If you are having issues with SMS, you can add yourself to the verification
 waitlist:

 http://appengine.google.com/waitlist/sms_issues

 On Wed, Nov 11, 2009 at 5:36 AM, barnix2001 barnix2...@gmail.com wrote:

  Hi,
  I am also having problems with SMS account verification.
  Best regards,
  Barna Otvos
  barnix2...@gmail.com

 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine

--

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




[google-appengine] Re: Possible to download code once uploaded?

2009-11-16 Thread Peter Recore
You should look into Git or Subversion or Sourcesafe or CVS or some
other revision control systems.

On Nov 9, 3:34 am, Martin Shaw mshaw1...@googlemail.com wrote:
 Hi,

 After I have uploaded my code for my appengine, by using the appcfg.py
 update myapp/ command, is it then possible to download the myapp/
 directory?

 I work on projects from several locations and it is a hassle to send
 my project to myself every time i want to work on it.

 Thanks in advance,

 Martin Shaw

--

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




[google-appengine] Can I be the owner-proprietary but not the person who pay?

2009-11-16 Thread frankabel
Hi all?

I'm just wandering if exist a way that someone pay my the rent of the
App Engine but I keep the ownership of the application. I mean,
somebody pay, but I have full control so when I want change the person
who is paying or pay my selft, no problem.

Cheers
Frank Abel

--

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




Re: [google-appengine] Limit on image size very low

2009-11-16 Thread Eli Jones
I haven't used the Image api.. but.. do you mean the limit of 1MB for
storing entities in the Datastore?  Or, does it just throw errors if you try
to manipulate an image in memory that is over 1MB?

If you're just trying to get a 1MB image into the datastore, you could break
it up into 1mb chunks before sticking it in the datastore.

On Sun, Nov 15, 2009 at 8:58 PM, Bjoern bjoer...@googlemail.com wrote:

 Hi,

 the imaging service limitation of 1MB for the maximum image size seems
 very low. Most cameras create bigger images by now.

 Any chance of increasing that limit? It would be nice if people could
 upload images to my app without having to go through a photo editor
 first. In fact avoiding the photo editor was one of the reasons I
 started to program the app.

 Unfortunately I saw the 1MB only in the midst of coding, as it is not
 listed together with the other quotas.

 Thanks!


 Björn

 --

 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=.




--

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




Re: [google-appengine] Python webapp framework and REST API

2009-11-16 Thread 风笑雪
POST  PUT data is in request body:
http://code.google.com/intl/en/appengine/docs/python/tools/webapp/requestclass.html#Request_body

2009/11/16 Devraj Mukherjee dev...@gmail.com:
 Hi all,

 We are writing an app with Python AppEngine and Closure. I am trying
 to follow a few articles I found on how to write your own REST
 services (properly). What I have gathered from reading these documents
 is that when using PUT or POST I should send back formed data say in
 XML or JSON.

 I am sending this as part of the POST or PUT data. The webapp
 framework seems to want to parse the input into name value pairs
 (which makes sense), how do I access this whole string from the
 request?

 Thanks for any pointers.

 --
 The secret impresses no-one, the trick you use it for is everything
 - Alfred Borden (The Prestiege)

 --

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




--

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




Re: [google-appengine] Panama App Engine Developers Shut Out?

2009-11-16 Thread Ikai L (Google)
It looks like Panama is not in the list of supported carriers:

http://code.google.com/appengine/kb/supported_carriers.html

If you required SMS verification, please add yourself to the SMS waitlist
here: https://appengine.google.com/waitlist/sms_issues. We'll go through
this and enable you manually.

Ikai

On Fri, Nov 13, 2009 at 5:42 AM, Dunster gregory.corco...@gmail.com wrote:

 Hi,

 I was very excited about Google App Engine but I could not verify my
 account because I live in Panama and its not supported for
 verification.

 We have the +507 country code here. There are four main cell phone
 providers:

 Cable  Wireless
 Movistar
 Digicel
 Clarocom

 Can somebody at Google please enable this country?

 Thanks,

 Dunster

 --

 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=.





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




[google-appengine] Re: Struggling to Upload a CSV file to AppEngine Datastore

2009-11-16 Thread Greg Tracy

what was the exact error or symptom? i'm reluctant to repeat the how-
to guide.

http://code.google.com/appengine/docs/python/tools/uploadingdata.html

i've uploaded bulk elements via csv multiple times and the
instructions worked perfectly. the sections you actually have to
implement are:

1. setting up remote_api
2. creating loader classes
3. preparing your data

then issue the following from the command line...

appcfg.py upload_data --config_file=your loader script from step
2.py --filename=your CSV file.csv --kind=your db.Model class name
app-directory


On Nov 16, 11:43 am, Benjamin Mayo wondersofthebr...@googlemail.com
wrote:
 Bear with me here. I have never used python at the *commandline*
 before. Ever.

 I have a .CSV file containing the database I would like to upload to
 my GAE datastore. I have followed the documentation provided, but the
 python shell keeps returning errors (syntax: update_data). Please can
 someone step me through how to import the CSV file into AppEngine.

 Thankyou for any help you can give, which - I promise - is greatly
 appreciated.

--

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




[google-appengine] Re: property value is not multi-line

2009-11-16 Thread Guri


On Nov 16, 9:00 am, SivaTumma sivatu...@gmail.com wrote:
 You need to declare the property 'url_title' in your model class like
 this:
     url_property = db.StringProperty(multiline=True)

 It indicates that a multilne string ( when copied and pasted from html
 pages, it happens some times. )
 should also be stored in the datastore.

Thanks, for you  reply SivaTumma. It helped.
Guri



 On Nov 14, 9:00 am, Guri sgurmin...@gmail.com wrote:

  Hi,
  I am using Beautiful soupwww.crummy.com/software/BeautifulSoupto
  fetch title of a url and storing it in datastore as StringProperty .
  It works with most of them but likewww.code.google.com/itthrows an
  exception while storing in datastore.
  Exception BadValueError:
  Property value url_title is not multilne

  Any pointers please.

  Thanks,
  Guri

--

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




[google-appengine] Re: Problem with SMS verification

2009-11-16 Thread Matt Passell
Hi Ikai,

I'm not sure if you helped expedite the process, but I've now been
manually verified.  If you did help it along, thanks very much!

Thanks,
Matt

On Nov 16, 12:08 pm, Matt Passell mpass...@grovehillsoftware.com
wrote:
 Hi Ikai,

 I added myself to the waitlist.  Do you know how long it takes to hear
 back?  I'm going to be participating in a Google Wave hackathon on
 Saturday (Nov. 21) and was hoping to be able to deploy at least one
 robot to App Engine.

 Thanks,
 Matt

 On Nov 11, 1:33 pm, Ikai L (Google) ika...@google.com wrote:



  Barna,

  If you are having issues withSMS, you can add yourself to the verification
  waitlist:

 http://appengine.google.com/waitlist/sms_issues

  On Wed, Nov 11, 2009 at 5:36 AM, barnix2001 barnix2...@gmail.com wrote:

   Hi,
   I am also having problems withSMSaccount verification.
   Best regards,
   Barna Otvos
   barnix2...@gmail.com

  --
  Ikai Lan
  Developer Programs Engineer, Google App Engine

--

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




Re: [google-appengine] ApiProxy$UnknownException

2009-11-16 Thread Ikai L (Google)
Lucian, what environment are you getting this in? I'm assuming this is on
your development machine. Can you post your OS, Java and SDK versions?

On Thu, Nov 12, 2009 at 6:10 AM, Lucian Baciu lucianba...@gmail.com wrote:

 I keep getting this error:

 com.google.apphosting.api.ApiProxy$UnknownException: An error occurred
 for the API request datastore_v3.RunQuery().
at com.google.apphosting.runtime.ApiProxyImpl.doSyncCall
 (ApiProxyImpl.java:198)
at com.google.apphosting.runtime.ApiProxyImpl.access$000
 (ApiProxyImpl.java:37)
at
 com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:
 75)
at
 com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:
 71)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall
 (ApiProxyImpl.java:71)
at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall
 (ApiProxyImpl.java:37)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:79)
at
 com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall
 (DatastoreApiHelper.java:52)
at com.google.appengine.api.datastore.DatastoreServiceImpl
 $PreparedQueryImpl.runQuery(DatastoreServiceImpl.java:346)
at com.google.appengine.api.datastore.DatastoreServiceImpl
 $PreparedQueryImpl.access$100(DatastoreServiceImpl.java:272)
at com.google.appengine.api.datastore.DatastoreServiceImpl
 $PreparedQueryImpl$1.iterator(DatastoreServiceImpl.java:306)
at

 org.datanucleus.store.appengine.DatastoreElementContainerStoreSpecialization.getChildren
 (DatastoreElementContainerStoreSpecialization.java:99)
at org.datanucleus.store.appengine.DatastoreFKListStore.listIterator
 (DatastoreFKListStore.java:47)
at
 org.datanucleus.store.mapped.scostore.AbstractListStore.listIterator
 (AbstractListStore.java:84)
at org.datanucleus.store.mapped.scostore.AbstractListStore.iterator
 (AbstractListStore.java:74)
at org.datanucleus.sco.backed.List.loadFromStore(List.java:241)
at org.datanucleus.sco.backed.List.toArray(List.java:591)
at org.datanucleus.store.mapped.mapping.CollectionMapping.postInsert
 (CollectionMapping.java:106)
at

 org.datanucleus.store.appengine.DatastoreRelationFieldManager.runPostInsertMappingCallbacks
 (DatastoreRelationFieldManager.java:225)
at
 org.datanucleus.store.appengine.DatastoreRelationFieldManager.access
 $300(DatastoreRelationFieldManager.java:49)
at org.datanucleus.store.appengine.DatastoreRelationFieldManager
 $1.apply(DatastoreRelationFieldManager.java:112)
at

 org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations
 (DatastoreRelationFieldManager.java:80)
at
 org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations
 (DatastoreFieldManager.java:795)
at

 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPostProcess
 (DatastorePersistenceHandler.java:288)
at
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects
 (DatastorePersistenceHandler.java:241)
at
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject
 (DatastorePersistenceHandler.java:225)
at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent
 (JDOStateManagerImpl.java:3185)
at org.datanucleus.state.JDOStateManagerImpl.makePersistent
 (JDOStateManagerImpl.java:3161)
at org.datanucleus.ObjectManagerImpl.persistObjectInternal
 (ObjectManagerImpl.java:1298)
at org.datanucleus.ObjectManagerImpl.persistObject
 (ObjectManagerImpl.java:1175)
at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent
 (JDOPersistenceManager.java:669)
at org.datanucleus.jdo.JDOPersistenceManager.makePersistent
 (JDOPersistenceManager.java:694)
at com.timetonote.server.services.ContactsServiceImpl.addPerson
 (ContactsServiceImpl.java:254)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at

 com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_
 $3.run(Method_.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at

 com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke
 (Method_.java:162)
at

 com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke_
 (Method_.java:131)
at

 com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke
 (Method_.java:40)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
 (RPC.java:527)
at 

Re: [google-appengine] Re: Application Timeouts - More than usual

2009-11-16 Thread Ikai L (Google)
Arun,

Which actions are triggering the DeadlineExceededError? What are you trying
to do in these actions?

On Fri, Nov 13, 2009 at 5:43 AM, Arun Shanker Prasad 
arunshankerpra...@gmail.com wrote:

 Hi Ikai,

 I had replied with the application id.

 I am still getting these errors at random, were you able to have a
 look.

 class 'google.appengine.runtime.DeadlineExceededError'

 Thanks,
 Arun Shanker Prasad.

 On Nov 11, 3:52 am, Ikai L (Google) ika...@google.com wrote:
  Arun,
 
  Are you still seeing these issues? Please let us know your application ID
 if
  you are.
 
  On Mon, Nov 9, 2009 at 7:30 AM, Arun Shanker Prasad 
 
  arunshankerpra...@gmail.com wrote:
 
   Hi,
 
   My application seems to be throwing a lot of DeadLine exceeded errors
   this morning. There was no changes uploaded. This seems to have
   cropped up suddenly this morning. Anyone else facing this? Or is it
   just me?
 
   Thanks,
   Arun Shanker Prasad.
 
  --
  Ikai Lan
  Developer Programs Engineer, Google App Engine

 --

 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=.





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




Re: [google-appengine] Keyword search in TextProperty

2009-11-16 Thread Ikai L (Google)
There are a few projects that do this. Here's one on Github called Whoosh:

http://github.com/tallstreet/Whoosh-AppEngine

There's also an open ticket for this under our issue tracker. You'll want to
star this so that we can prioritize it for a future release:
http://code.google.com/p/googleappengine/issues/detail?id=217

On Mon, Nov 16, 2009 at 2:56 PM, bvelasquez bvelasq...@gmail.com wrote:

 Hello,

 I have an existing TextProperty, and I would like to implement keyword
 search.  Can anyone suggest a method or point me to an article on the
 best way to achieve this using GAE.  Thanks in advance.

 Barry

 --

 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=.





-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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




Re: [google-appengine] Re: Only ancestor queries are allowed inside transactions

2009-11-16 Thread Will
Thanks Eli. Your solution solves one issue. But ideally, I want the 2nd
concurrent request, after waiting, pick up the next item in queue and
process, without complicating the code. After all, that's what a transaction
is designed for.

Reading another post, it seems one has to create a dummy parent entity for
those entities you want to query in a transaction. What I'm looking for is a
guide with good examples for querying (otherwise) root entities in a
transaction.

Will

On Sun, Nov 15, 2009 at 1:57 PM, Eli Jones eli.jo...@gmail.com wrote:

 Nevermind, I see what you mean.

 So you want a lock on the entity once you know it exists (and satisfies
 your where clause).

 ..since something might have come along and updated the p1 column from None
 to Something before your transaction began.. and thus the key would refer to
 an entity that does not satisfy your where clause anymore.

 If you were willing to let whoever got to it first to update the p1
 column.. you could have your transaction verify that p1 was still None once
 it got the entity inside of the transaction.

 If p1 had changed.. then just do nothing since another transaction already
 won the race.

 I think that would work just the same.  Because, assume you have two
 processes looking for an entity where p1 = None and p2 = Today.. and they
 each really, really want to update p1 to some value.

 One of the processes must win in your scenario.. you just don't want the
 other one to re-update the entity since it has already been updated.. and p1
  None.  Now, you still need the transaction of course.. but just add a
 check after grabbing the entity to verify that p1 = None before doing any
 updates.


 On Sun, Nov 15, 2009 at 12:20 AM, Eli Jones eli.jo...@gmail.com wrote:

 you should read the section here:


 http://code.google.com/appengine/docs/python/datastore/functions.html#run_in_transaction

 where they show an example of iterating a counter in a transaction.

 If you don't already know the key for the object... then you sort of need
 to get it to run your transaction.  In the decrement example, they grab the
 entity first so that they can send the entity key to the decrement function.

 Now, if you want to modify their decrement function to see if it works by
 getting the key inside of the transaction..  then just try that.. it's only
 a few lines of code.

 On Sat, Nov 14, 2009 at 10:29 PM, Will vocalster@gmail.com wrote:

 I want to find that particular entity, change it and save it back. When
 one request is doing this, I don't want another request pick up the same
 entity and modify it again. In short, I want the 'seek-change-save' to be
 serialized, as one reason the GAE transaction is designed for. Finding out
 the key of the entity first out of a transaction and then using the key
 inside the transaction defeats the purpose.

 Will


 On Sat, Nov 14, 2009 at 1:24 PM, 风笑雪 kea...@gmail.com wrote:

 Why you need a transaction to update just one entity? Just save it and
 you may get an exception when update failed.

 BTW, DateTimeProperty has an parameter auto_now, you can use it to
 automatic update its time by datastore.

 And if you really want a transaction, you need fetch it before start
 the transaction:

 item = C1.gql(WHERE p1 = :a AND p2  :b ORDER BY p2, a = None, b =
 today).get()
 if item:
  key = item.key()
  def update_time(key)
item = C1.get(key)
if item:
   item.p1 = now
  item.put()
   db.run_in_transaction(update_time, key)

 2009/11/14 Will vocalster@gmail.com:
  Yes, I've read the document. I'm looking for some examples.
 
  As I said, I have a class, C1, whose entities have no ancestors. I
 want to
  query a particular entity from it, modify, and put it back, for
 example,
 
  item = C1.gql(WHERE p1 = :a AND p2  :b ORDER BY p2, a = None, b =
  today).fetch(1)
  item.p1 = now
  item.put()
 
  Both p1 and p2 are datetime. How can I build this into a transaction?
 Is
  there a way I can give the entities a 'place holder' ancestor so I can
 later
  use an 'ancestor filter' in the query to satisfy the requirement?
 
  Thanks,
 
  Will
 
 
  On Fri, Nov 13, 2009 at 9:44 PM, Stephen sdea...@gmail.com wrote:
 
  On Nov 13, 2:27 am, Will vocalster@gmail.com wrote:
  
   Can you give me some examples of 'ancestor queries'? If possible,
 I'd
   like
   to change the existing ones into 'ancestor queries' and fit the
 whole
   into a
   transaction, because that is exactly what a transaction designed
 for.
 
 
 
 
 http://code.google.com/appengine/docs/python/datastore/transactions.html#What_Can_Be_Done_In_a_Transaction
 
  --
 
  You received this message because you are subscribed to the Google
 Groups
  Google App Engine group.
  To post to this group, send email to
 google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  

[google-appengine] Re: Is it possible to obtain list of all users or groups of Google Apps domain?

2009-11-16 Thread Spider-Men
Hi,Wooble!

Thanks a lot for teaching!

Sincerely.

--

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