Hi everyone,
I'm trying to use S3Shell to PUT a file onto Amazon S3. I get this on
my local dev server:
java.lang.IllegalArgumentException: Entity enclosing requests cannot
be redirected without user intervention
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.setFollowRedirects
(Unknown Source)
at
com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch
(LocalURLFetchService.java:176)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.appengine.tools.development.ApiProxyLocalImpl.makeSyncCall
(ApiProxyLocalImpl.java:118)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:
83)
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch
(URLFetchServiceImpl.java:43)
at
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
$Connection.fetchResponse(URLFetchServiceStreamHandler.java:409)
at
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
$Connection.getInputStream(URLFetchServiceStreamHandler.java:290)
at
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
$Connection.getResponseCode(URLFetchServiceStreamHandler.java:131)
at com.amazon.s3shell.S3Store.checkResponse(S3Store.java:510)
at com.amazon.s3shell.S3Store.storeItem(S3Store.java:315)
at com.amazon.s3shell.S3Store.storeItem(S3Store.java:287)
The S3Shell code is doing this (I've collapsed some of the method
calls here):
final HttpURLConnection itemConn = (HttpURLConnection)
itemURL.openConnection();
itemConn.setRequestMethod(method);
itemConn.setReadTimeout(READ_TIMEOUT);
itemConn.setDoOutput(true);
itemConn.connect();
OutputStream dataout = itemConn.getOutputStream();
dataout.write(data);
dataout.close();
// blows up here:
final int responseCode = conn.getResponseCode();
any ideas?
-- James
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.