Could you post your trace from the log?
Is the problem intermittent?
How much memory is your app running?
Do you have other errors in the trace?
Does it init fine on your dev?
Brandon
http://gwt-examples.googlecode.com
--
You received this message because you are subscribed to the Google
Yes. I've done it with a java app. You'll have to setup a servlet to get a
blob url, and then post to it.
http://code.google.com/p/gwt-examples/source/browse/trunk/#trunk%2FGAE_FileUpload%2Fsrc%2Fcom%2Fgonevertical%2Fupload
- my java app source
I agree, the image service is thin. I've been asking for more features too.
http://code.google.com/p/googleappengine/issues/detail?id=2990
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this message because you are subscribed to the Google Groups
Google App Engine for
BlobKey blobKey = FileServiceFactory.getFileService().getBlobKey(file); -
this is returning null even though the file object is legit.
I've found that the blobkey exists in the file object.
here are the file object parts trace -:
fileSystem: BLOBSTORE
It doesn't look like this happens every time, but something is not
parsing correctly when trying to read the blobkey out of the file object.
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
My code snippet that procured the above trace:
public long uploadBlob_ByFile(long fileThingId, String fileName, String
contentType, byte[] filebytes) {
if (filebytes == null || filebytes.length == 0) {
log.warning(uploadBlob_ByFile(): Warn: filebytes is null or length=0);
return
I'd like to note related bugs on GAE side not dev side:
- FileReadChannel won't read all the bytes of a blob.
- BlobInfo records the wrong byte size for base64 upload
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this
Trying work around:
private BlobKey getBlobKey(AppEngineFile file) {
BlobKey key = FileServiceFactory.getFileService().getBlobKey(file);
if (key == null file.getNamePart().contains(:) == true) {
String[] s = file.getNamePart().split(:);
if (s != null s.length ==
I kinda figured, since it shows experimental. I've got a work around, for
sucking out of the object. I like using it, very nice work so far!
Thanks for looking.
Brandon
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to
Yes. Stick the int var in your class with @Persistent.
@Persistent
private int myInt;
http://code.google.com/appengine/docs/java/datastore/entities.html#Properties_and_Value_Types
Casting from long to int should not throw anything I'm aware of. It might
truncate a number into int.
pm.makePersistent( persistme ); is called after the deletion it will
recreate it. You'll have to query it by objectid first and see if it exists.
If it exists you could update. SQL would need an ID to update, but in JDO,
it will make a new ID on insert and update depending on existence.
like
Hmmm, I can't see anything obvious. I know this can be be a bear b/c I've
done it too. 10 seconds is all you got, unless you move to a task. Although,
it will allow you to load any size file to the store, but after its loaded
you got 10 seconds to do processing. It shouldn't hang.
Can you
Are you wanting to use oAuth? If not, the api is really easy. Otherwise you
have a few steps to do to get oauth to work.
http://code.google.com/p/gwt-examples/wiki/DemoGwtGData - I have oauth notes
here
Brandon Donnelson
http://gwt-examples.googlecode.eom
--
You received this message
I've done them all and don't see any difference in the apis. The File api
has a few bugs and is experimental, at least I think thats the one your
talking about.
I prefer the HTML post method b/c its well defined, and there are libs
available to put together a post. Its a multistep process, one
That url you get there is the url you post the file upload to.
http://code.google.com/p/gwt-examples/wiki/DemoGAEMultiFileBlobUpload - some
notes I have on my blob. I have source and demos of uploading blobs.
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this message
Here was what I was using that took too long:
private byte[] getImageBytes(BlobData blobData) {
if (blobData == null) {
return null;
}
BlobKey blobKey = new BlobKey(blobData.getKey());
if (blobKey == null) {
return null;
}
ByteArrayOutputStream out = new
Here is the workaround part, this is for base64 blobinfo size designation
problem:
private void workaround(ByteArrayOutputStream out, BlobKey blobKey, long
offset, long filesize) {
int chunkSize = 1;
long limit = 0;
while (offset filesize) {
limit = offset + chunkSize - 1;
http://code.google.com/p/gwt-examples/wiki/DemoGAEMultiFileBlobUpload - some
of my notes on blob stuff.
--
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
Thats what I do, but I setup a data object to transfer entities from JDO to
client side. I have several examples with source here. Check the source out
for the JDO types. - http://gwt-examples.googlecode.com
Brandon
http://gwt-examples.googlecode.com
--
You received this message because you
Well, I give up for now. So far I can't get the bytes by fetching them fast
enough and the FileReadChannel won't read all the bytes. I've run out of
time and ideas for today. I have an ugly hack going on which will allow me
to move on for now, but it bugs me :).
I guess my ultimate goal of
Thats a good idea. I might have to try to see if I can make that work.
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
Trying the file channel reader:
More here
-
http://code.google.com/p/gwt-examples/wiki/DemoGAEMultiFileBlobUpload?ts=1303485150updated=DemoGAEMultiFileBlobUpload
private byte[] getImageBytes_v2(BlobData blobData) {
if (blobData == null || blobData.getKey() == null) {
return null;
I've noticed deploying to production after JDO class/object
modifications, versioning up helps. I change the version.
Things I try, writing some bogus data to jdo object to init it. I'll disable
then re-enable GAE in eclipse, clean project. I posted to your other post
too.
More source code
Do you have on your class PersistenceCapable?
PersistenceCapable
public class Greeting {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this message because you are
There is an option in the api not to skip. I can't find it at the moment.
But I've seen it.
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
Is there a memory limit?
--
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
I setup a JDO class and store the task attributes. I send back the JDO key
and track it on the client side by polling it. I delete the entry after the
task is finished. It works quite well for me.
Brandon Donnelson
http://gwt-examples.googlecode.com
http://c.gawkat.com
--
You received this
Heres one example I did:
SELECT * FROM __BlobInfo__ WHERE __key__ =
KEY('__BlobInfo__','AMIfv940prQksEQ-cbqa_T3kupYZUKj0jFS6CEWqUfW5gTjuriiJFdVsg_Z4rEBl3aldWS7ygE_Vbcl85IWRE2vtxHvB7GF5sdtE0kIkrPk6c2hsfxlqfdocpu1zeOQygEb8RslST1cF9bT37n_9X1kdQpRtu5gyPB3-AgmpZ1GtbzWyGv7Uj1M')
I have more about it
Ah, just what I needed. Thanks!
Brandon
--
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
The low level works with lists of properties key=value and JDO or JPA sticks
those properties into defined (class)objects. Its easier to work with
objects than a group of properties.
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this message because you are subscribed
You guys are awesome! Thanks!
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from
I'm looking for the new javadocs for FileServiceFactory and didn't see them
yet.
I wanted to find out what the method parameters were for
fileService.createNewBlobFile(param,param)? Is there a parameter for
filename?
AppEngineFile file = null;
try {
file =
Not sure why I'm getting this error yet. The class exists and is included in
the source. Hm?
Caused by: java.lang.NoClassDefFoundError:
com/google/appengine/api/files/LockException
at
org.gonevertical.core.server.jdo.data.ThingStuffJdo.getValueFileData(ThingStuffJdo.java:1162)
Oops, war/WEB-INF/libs didn't get 1.4.3 libs, still had the 1.4.2. Remove
1.4.2 libs and replace with 1.4.3. This occurred with change of sdk and some
manual stuff I did.
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to
Here is some info I have put
together: http://code.google.com/p/gwt-examples/wiki/DemoGAEMultiFileBlobUpload
Brandon Donnelson
http://gwt-examples.googlecode.com
http://c.gawkat.com
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
Just another note:
If your reading a file do it in a task! Otherwise you only have ten seconds.
Brandon Donnelson
http://gwt-examples.googlecode.com
http://c.gawkat.com
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to
Yep, I noticed that too. It takes about a day after it starts to notify you
in eclipse. If your in hurry to try it, I found I have to add it manually.
It would be nice if they add it to the repository right away.
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this
My posts are working for 1.4.3, although, you can hit deadlines. What are
you posting?
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
Could this be a defensive move from Oracle and if it were, it is quite poor?
--
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
My work around to fetch data even when I don't know the exact filesize or
ending EOF.
private byte[] getImageBytes(BlobData blobData) {
if (blobData == null) {
return null;
}
BlobKey blobKey = new BlobKey(blobData.getKey());
if (blobKey == null) {
return null;
The eclipse app engine dev (jetty) dies after upgrading on Mac OSX. The new
JVM(JRE) instantly kills/terminates on debugging with no traces. The new
Java JRE run time will not work. I recommend not upgrading the Java on MAC
OSX for the moment, until Jetty can be patched or JVM patched.
I do know that calling it once works kinda like this. I never use
declarations in my code so I don't know if this works.
query.setFilter( password == passwordParam username == usernameParam
active == activeParam );
But I do know setting a filter works like this:
query.setFilter( password ==
Another Query:
public SessionAccessTokenJdo[] query(String accessToken, String
accessTokenSecret) {
String qfilter = accessToken==\ + accessToken + \
accessTokenSecret==\ + accessTokenSecret + \ ;
///System.out.println(SessionAccessTokenJdo.query(): + qfilter);
Try incrementing your version and deploying?
--
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
Try uploading this image:
private String getFile() {
String s = ; // data:image/png;base64,
s =
BlobInfo Reports 8472 bytes and it should be 6353 bytes. Which
is approximately 137% (6183 bytes) smaller, which gives me the impression
that headers were not account for in the calculation.
--
You received this message because you are subscribed to the Google Groups
Google App Engine for
Here is the image that was uploaded on the dev side. This also happens on
the production side.
--
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
http://code.google.com/p/googleappengine/issues/detail?id=4265 - Related
issue
--
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
This is why I started this post. I can't iterate the blobdata or fetch the
blob data for image transformation because I can't figure out the correct
length of the blob.
private byte[] getImageBytes(BlobData blobData) {
if (blobData == null) {
return null;
}
BlobKey blobKey
I noticed a fetchdata error b/c the fetchdata index is based on zero ordinal
long limit = offset + chunkSize - 1;
if (filesize limit) {
limit = filesize - 1; // adding a minus 1
}
--
You received this message because you are subscribed to the Google Groups
Google App
My limit doesn't solve the base64 size.
--
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
After uploading a file to the blobstore via base64 gives me the wrong file
size when retrieving the blobinfo. This happens on the dev and production
side of app engine. Is there a work around or am I missing something?
private String getRequest_Image(String fileName, String contentType, String
Here is an issue that is related to this problem. Don't upgrade your Java.
If you did, you'll have to restore or change the JRE your using to get it to
work again. The Issue has lots of notes about what you can do.
http://code.google.com/p/googleappengine/issues/detail?id=4712
Brandon
Scale your image on the client side. GWT/HTML has many options to work with
and I'm in love with that!
http://code.google.com/p/gwt-examples/wiki/gwt_hmtl5
Brandon Donnelson
http://gwt-examples.googlecode.com
http://c.gawkat.com
--
You received this message because you are subscribed to the
I'm going to try to get the job done with HTML5 for now, until the server
has the features to do the job.
http://google-web-toolkit.googlecode.com/svn/javadoc/latest/index.html?overview-summary.html
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#images
--
Here is what I'd shoot for having app engine do on the server side, just
like HTML5 could do on the client side.
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#images
--
You received this message because you are subscribed to the Google Groups
Google App
Need a testImageEncoding() to verify its a good image.
--
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
Need Exif methods.
--
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
I think my problem is in reading the bytes into the array. Oh, if this is
it, I'm been barking up the wrong tree.
--
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
I get the correct byte count reading it this way:
private byte[] getImageBytes(BlobData blobData) {
if (blobData == null) {
return null;
}
BlobKey blobKey = new BlobKey(blobData.getKey());
if (blobKey == null) {
return null;
}
long filesize
Where the input element name that corresponds to the form element where the
file is selected is the request parameter you use on the servlet side.
For instance if the input element name=myFile then on the servlet side do
this:
MapString, BlobKey blobs =
Bummer I missed that :)
--
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
Are you asking if you can change/morph your datastore values from Boolean to
String? If so, you'll have to make a copy so the new property is added in
older records. Or do a conversion when getting a record.
You can add a persistance variable at any time, and the property
going forward will be
Another image service request:
ImageServiceFactory.makeCrop(..) - uses percentage parameters. I'd like a
exact pixel (px) parameters.
--
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
Tiling an image, (mapping it) is a challenge with a percentage, due to
precision, or my perceived precision of division of the image. I figured out
a work around I think using different math to divide it up to have a precise
division that so no overlapping occurs. But to my point, I believe
Another thing you can't do with the image api. So far, I can't make an image
from byte data and resize it. Dang!
Transform resize = ImagesServiceFactory.makeResize(resizeWidth.intValue(),
resizeHeight.intValue());
oldImage = ImagesServiceFactory.makeImage(oldImage.getImageData());
Image
Issue created:
http://code.google.com/p/googleappengine/issues/detail?id=2990q=image%20servicecolspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java
Another note:
You can use any pure java readers on the market due to dependencies:
http://code.google.com/appengine/forum/java-forum.html?place=topic%2Fgoogle-appengine-java%2F61pBMzfv7QU%2Fdiscussion
--
You received this message because you are subscribed to the Google Groups
Google App
It appears I made have spoke to soon about loading the byte data in making
an image and using that to transform. I'm having a problem with cropping. It
crops but the image is funky colored.
--
You received this message because you are subscribed to the Google Groups
Google App Engine for
Its pretty easy to store the blobkey in the datastore with the parameters
needed to find the blob in the blobstore, all you then need is that blobkey,
and serve it from the blobstore, and the only latency you get is for the
session loading if one is not loaded. Thats what I do for
Forgot to mention the image service, has what I call
a thumb-nailing service.
http://code.google.com/appengine/docs/java/images/overview.html#Using%020getServingUrl()
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this
This won't work either. I get the same funky colors. So far I think the
cropping does not work at all.
leftX = .05D;
topY = .05D;
rightX = .10D;
bottomY = .10D;
oldImage = ImagesServiceFactory.makeImageFromBlob(new
BlobKey(fd.getBlobData().getKey()));
Transform transform =
The cropping is not working for me. I made a new issue for it. I tried and
got the same response on both the dev and production 1.4.2.
http://code.google.com/p/googleappengine/issues/detail?id=4763
--
You received this message because you are subscribed to the Google Groups
Google App Engine
Oops, I've been posting some of my notes in the wrong spot. sorry about
that.
--
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
This won't work either. I get the same funky colors. So far I think the
cropping does not work at all.
leftX = .05D;
topY = .05D;
rightX = .10D;
bottomY = .10D;
oldImage = ImagesServiceFactory.makeImageFromBlob(new
BlobKey(fd.getBlobData().getKey()));
Transform transform =
The image service has limitations. It won't allow to resize a width thats
4000px. The image service is for light duty small images. The current
cameras on the market are producing very large images and scaling them is
trouble some. I have panoramic images, where the widths are gigantic and
Anybody try Apache Commons Sanselan 2D lib on app engine?
http://commons.apache.org/sanselan/ - lib location
Brandon Donnelson
http://c.gawkat.com
http://gwt-examples.googlecode.com
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
Or how bout Image4j?
http://image4j.sourceforge.net/ - tried this?
--
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
Looks like they have dependencies not on the white list. :(
http://code.google.com/appengine/docs/java/jrewhitelist.html
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
One more note:
It would be nice to watermark my images with the api.
--
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
Just curious, What your point is here?
Brandon
--
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
Are you using something like subversion?
Do you need access to your live data for testing your app?
--
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
I think he must of set the token to the object. I don't see that piece. Grab
the token from post or querystring, and stick it back into the object.
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email
When trying to get image byte data I get null using this method: (any
thoughts?)
Image image = ImagesServiceFactory.makeImageFromBlob(blobKey);
Byte[] bytes = image.getImageData(); // this doesn't work as expected.
It would be nice to fix that method to give whats expected. In my opinion
I'm not sure this can help you, but thought I'd mention my thought. I use
eclipse to deploy my files to the app server through eclipse. You could use
the GWT eclipse plugin and stick your files in the war file and deploy it
that way. But I'm not sure I understand whats going on, but thought
10 seconds is the limit from what I read. I use a task for anything that
takes over 10 seconds.
Setup a servlet to init the task. The task then will start your methods,
then you have up to 10 minutes to do the task before starting another task.
You can use another rpc call to watch for the
Here is a sample of a image transformation method I do with a task:
public long createImageTransform(BlobDataFilter filter) {
if (sp.getLoginData() == null || sp.getLoginData().getGoogleLoggedIn()
== false) {
log.warning(Ga_Service_Image.createImageTransform(): ERROR: not
I'm frustrated with the blobstore upload on the server side. I can't seem to
figure out whats going wrong. I'm posting the payload below. I need to
figure out how to upload on the server side so I can resize a thumb and
write the bytes into a blob.
I'm using a servlet to setup a task to do the
Wow, so far I got it working. So it is possible to do it on the server side.
I had to fix request url to be absolute instead of relative, or at least I
thought I had it fixed, and wasn't.
Here is what I am doing so far:
private void upload2_A(long fileThingId, long stuffId, String
I'm suggesting adding the Maps Api Geocoding as a service in App Engine.
Why:
1. I don't have 10,000+ for the maps API premier and I am hitting below 2500
request per day.
2. I hit the OVER_QUERY_LIMIT on batch request. On multiple batch request
for geocoding and I am under 2500 request per
I'm digging that!
--
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
My OAuth example for those interested:
http://code.google.com/p/gwt-examples/wiki/DemoGwtGData
Brandon Donnelson
http://gwt-examples.googlecode.com
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email
I made a demo using gwt oauth gdata hosted on app engine, to test out oauth
access to blogger data. OAuth is much easier than I thought. I'm excited to
deploy it in my larger projects.
Made a new demo: http://code.google.com/p/gwt-examples/wiki/DemoGwtGData -
wiki
I made this to speak up about Android bloatware: http://tellthefcc.appspot.com/
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this
94 matches
Mail list logo