Limit on length of characters in Text property

1,152 views
Skip to first unread message

Nicky

unread,
Jan 7, 2011, 5:13:05 PM1/7/11
to google-a...@googlegroups.com
It seems that the Text property is limited to 1000000 characters. I can't find this in the documentation but I hit this exception below. Can anyone confirm this?

  1. Caused by: java.lang.IllegalArgumentException: string property contents is too long.  It cannot exceed 1000000 characters.
    	at com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java:36)
    	at com.google.appengine.api.datastore.DatastoreApiHelper$1.convertException(DatastoreApiHelper.java:98)
    	at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:69)
    	at com.google.appengine.api.datastore.FutureHelper$CumulativeAggregateFuture.get(FutureHelper.java:136)
    	at com.google.appengine.api.datastore.FutureHelper.getInternal(FutureHelper.java:71)
    	at com.google.appengine.api.datastore.FutureHelper.quietGet(FutureHelper.java:32)
    	at com.google.appengine.api.datastore.DatastoreServiceImpl$2.runInternal(DatastoreServiceImpl.java:113)
    	at com.google.appengine.api.datastore.DatastoreServiceImpl$2.runInternal(DatastoreServiceImpl.java:110)
    	at com.google.appengine.api.datastore.TransactionRunner.runInTransaction(TransactionRunner.java:31)
    	at com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java:110)
    	at com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java:94)
    <continued in next message>
  2. E01-07 02:00PM 13.585
    <continued from previous message>
    at org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.put(RuntimeExceptionWrappingDatastoreService.java:93)
    	at org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:180)
    	at org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:139)
    	at org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:134)
    	at org.datanucleus.store.appengine.DatastorePersistenceHandler.updateObject(DatastorePersistenceHandler.java:536)
    	at org.datanucleus.state.JDOStateManagerImpl.flush(JDOStateManagerImpl.java:4576)
    	at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:2814)
    	at org.datanucleus.ObjectManagerImpl.flush(ObjectManagerImpl.java:2754)
    	at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:2893)
    	at org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java:369)
    	at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:256)
    	at org.datanucleus.ObjectManagerImpl.close(ObjectManagerImpl.java:801)
    	at org.datanucleus.jdo.JDOPersistenceManager.close(JDOPersistenceManager.java:271)
    	... 39 more

风笑雪

unread,
Jan 7, 2011, 11:05:54 PM1/7/11
to google-a...@googlegroups.com
Hi Nicky,

The max size of an entity is 1MB, so all of its properties cannot exceed 1000000 bytes.

----------
keakon

My blog(Chinese): www.keakon.net



--
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-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

A. Stevko

unread,
Jan 8, 2011, 12:09:23 AM1/8/11
to google-a...@googlegroups.com
I can't say for sure but I believe I've stored more than 1 MB into a Text data member.

According to the javadoc Text types are not limited to the 1MB max Entity size limit.

Text wraps around a string of unlimited size. Ordinary Java strings stored as properties in Entity objects are limited to 500 characters. However, Text objects can also be stored in properties, and are unlimited in size. However, they will not be indexed for query purposes.



--
-- A. Stevko
===========
"If everything seems under control, you're just not going fast enough." M. Andretti





Robert Kluin

unread,
Jan 8, 2011, 1:54:32 PM1/8/11
to google-a...@googlegroups.com
Entities are limited to 1MB, so a text property is implicitly limited
too. The limit will be something under 1MB to account for the
metadata's overhead.
http://code.google.com/appengine/docs/java/datastore/overview.html#Quotas_and_Limits


Robert

A. Stevko

unread,
Jan 8, 2011, 3:29:40 PM1/8/11
to google-a...@googlegroups.com
So much for trusting the javadocs "Text wraps around a string of unlimited size" statement.

Nicky

unread,
Jan 8, 2011, 5:30:07 PM1/8/11
to google-a...@googlegroups.com
I read too much into the javadocs and assumed they were somehow using chaining to work around that limit. Thanks guys, i'll have to do that myself i guess.
Reply all
Reply to author
Forward
0 new messages