Re: [google-appengine] The API package 'file' or call 'Create()' was not found
tx. I added the .jar, and now I have this error: Error Code: 400 Reason: badRequest Message: java.lang.IllegalArgumentException: OBJECT_NOT_FOUND: Le jeudi 4 juin 2015 04:36:54 UTC+2, Vinny P a écrit : The JAR file google-http-client-1.20.0.jar contains the missing class your exception is reporting (com/google/api/client/http/HttpRequestInitializer). I don't see the filename in your build path screenshot - the closest name I see is google-http-client-appengine which contains appengine specific services, not the general http library. Try going to https://developers.google.com/api-client-library/java/google-api-java-client/download, retrieving the ZIP file there, and adding the file named *google-http-client-1.20.0.jar *to your project. - -Vinny P Technology Media Consultant Chicago, IL App Engine Code Samples: http://www.learntogoogleit.com On Wed, Jun 3, 2015 at 4:34 PM, Christophe DA COSTA toto...@gmail.com javascript: wrote: https://lh3.googleusercontent.com/-Lq-jCVqa2iE/VW9ytkoXJxI/HeM/DVxsRAvFZp0/s1600/Sans%2Btitre.png https://lh3.googleusercontent.com/-h2C8Bjqj7ug/VW9xTrZNohI/HeE/c3_UOzgmhbs/s1600/Sans%2Btitre.png Le mercredi 3 juin 2015 20:29:06 UTC+2, Ryan (Cloud Platform Support) a écrit : Can you provide a screenshot of where the jars are? As well as an updated screenshot showing your classpath? On Wednesday, June 3, 2015 at 12:03:14 PM UTC-4, Christophe DA COSTA wrote: I don't find the solution I added appengine-testing.jar and appengine-api-stubs.jar but I have the same Error. I see on thegooglecloudstorageclient getstarted https://cloud.google.com/appengine/docs/java/googlecloudstorageclient/getstarted page that I need this lybraries: - appengine-gcs-client.jar - guava-15.0.jar - joda-time-2.3.jar - appengine-testing.jar - appengine-api.jar - appengine-api-stubs.jar So, now I use all this. Le mardi 2 juin 2015 16:06:07 UTC+2, Ryan (Cloud Platform Support) a écrit : Salutations Christophe, If you go to the Migrating from the Files API https://cloud.google.com/appengine/docs/java/googlecloudstorageclient/migrate page you will see that error means you are missing libraries. I would read through the page and see what libraries you are missing. On Tuesday, June 2, 2015 at 6:58:46 AM UTC-4, Christophe DA COSTA wrote: Thanks for yours answers, I am trying to use the Google Cloud Storage but I have this erreur: com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backed method java.lang.NoClassDefFoundError: com/google/api/client/http/HttpRequestInitializer at com.google.appengine.tools.cloudstorage.oauth.OauthRawGcsServiceFactory.clinit(OauthRawGcsServiceFactory.java:31) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:59) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:44) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:40) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:75) at com.listecourses.model.ListeModelEndpoint.insertListeModel(ListeModelEndpoint.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:45) at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:359) at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:113) at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765
Re: [google-appengine] The API package 'file' or call 'Create()' was not found
https://lh3.googleusercontent.com/-Lq-jCVqa2iE/VW9ytkoXJxI/HeM/DVxsRAvFZp0/s1600/Sans%2Btitre.png https://lh3.googleusercontent.com/-h2C8Bjqj7ug/VW9xTrZNohI/HeE/c3_UOzgmhbs/s1600/Sans%2Btitre.png Le mercredi 3 juin 2015 20:29:06 UTC+2, Ryan (Cloud Platform Support) a écrit : Can you provide a screenshot of where the jars are? As well as an updated screenshot showing your classpath? On Wednesday, June 3, 2015 at 12:03:14 PM UTC-4, Christophe DA COSTA wrote: I don't find the solution I added appengine-testing.jar and appengine-api-stubs.jar but I have the same Error. I see on thegooglecloudstorageclient getstarted https://cloud.google.com/appengine/docs/java/googlecloudstorageclient/getstarted page that I need this lybraries: - appengine-gcs-client.jar - guava-15.0.jar - joda-time-2.3.jar - appengine-testing.jar - appengine-api.jar - appengine-api-stubs.jar So, now I use all this. Le mardi 2 juin 2015 16:06:07 UTC+2, Ryan (Cloud Platform Support) a écrit : Salutations Christophe, If you go to the Migrating from the Files API https://cloud.google.com/appengine/docs/java/googlecloudstorageclient/migrate page you will see that error means you are missing libraries. I would read through the page and see what libraries you are missing. On Tuesday, June 2, 2015 at 6:58:46 AM UTC-4, Christophe DA COSTA wrote: Thanks for yours answers, I am trying to use the Google Cloud Storage but I have this erreur: com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backed method java.lang.NoClassDefFoundError: com/google/api/client/http/HttpRequestInitializer at com.google.appengine.tools.cloudstorage.oauth.OauthRawGcsServiceFactory.clinit(OauthRawGcsServiceFactory.java:31) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:59) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:44) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:40) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:75) at com.listecourses.model.ListeModelEndpoint.insertListeModel(ListeModelEndpoint.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:45) at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:359) at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:113) at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444) at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:230) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300
Re: [google-appengine] The API package 'file' or call 'Create()' was not found
I don't find the solution I added appengine-testing.jar and appengine-api-stubs.jar but I have the same Error. I see on thegooglecloudstorageclient getstarted https://cloud.google.com/appengine/docs/java/googlecloudstorageclient/getstarted page that I need this lybraries: - appengine-gcs-client.jar - guava-15.0.jar - joda-time-2.3.jar - appengine-testing.jar - appengine-api.jar - appengine-api-stubs.jar So, now I use all this. Le mardi 2 juin 2015 16:06:07 UTC+2, Ryan (Cloud Platform Support) a écrit : Salutations Christophe, If you go to the Migrating from the Files API https://cloud.google.com/appengine/docs/java/googlecloudstorageclient/migrate page you will see that error means you are missing libraries. I would read through the page and see what libraries you are missing. On Tuesday, June 2, 2015 at 6:58:46 AM UTC-4, Christophe DA COSTA wrote: Thanks for yours answers, I am trying to use the Google Cloud Storage but I have this erreur: com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backed method java.lang.NoClassDefFoundError: com/google/api/client/http/HttpRequestInitializer at com.google.appengine.tools.cloudstorage.oauth.OauthRawGcsServiceFactory.clinit(OauthRawGcsServiceFactory.java:31) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:59) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:44) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:40) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:75) at com.listecourses.model.ListeModelEndpoint.insertListeModel(ListeModelEndpoint.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:45) at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:359) at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:113) at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444) at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:230) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441) at java.lang.Thread.run(Thread.java:745) my code is: GcsFilename fileName = new GcsFilename(my-bucket-name, someFileName.jpg); GcsOutputChannel outputChannel = GcsServiceFactory.createGcsService().createOrReplace(fileName, GcsFileOptions.getDefaultInstance()); outputChannel.write(ByteBuffer.wrap(listemodel.getImage())); outputChannel.close(); I
Re: [google-appengine] The API package 'file' or call 'Create()' was not found
Thanks for yours answers, I am trying to use the Google Cloud Storage but I have this erreur: com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backed method java.lang.NoClassDefFoundError: com/google/api/client/http/HttpRequestInitializer at com.google.appengine.tools.cloudstorage.oauth.OauthRawGcsServiceFactory.clinit(OauthRawGcsServiceFactory.java:31) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:59) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:44) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:40) at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:75) at com.listecourses.model.ListeModelEndpoint.insertListeModel(ListeModelEndpoint.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:45) at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:359) at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:113) at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444) at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:230) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441) at java.lang.Thread.run(Thread.java:745) my code is: GcsFilename fileName = new GcsFilename(my-bucket-name, someFileName.jpg); GcsOutputChannel outputChannel = GcsServiceFactory.createGcsService().createOrReplace(fileName, GcsFileOptions.getDefaultInstance()); outputChannel.write(ByteBuffer.wrap(listemodel.getImage())); outputChannel.close(); I think, I am missing the file API library whitin my project. I join the image of my project's libraries. Le dimanche 31 mai 2015 22:11:59 UTC+2, Vinny P a écrit : On Sun, May 31, 2015 at 12:07 PM, Christophe DA COSTA toto...@gmail.com javascript: wrote: I am trying to use the blobstore API, but I have this error: com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backed method com.google.apphosting.api. ApiProxy$CallNotFoundException: The API package 'file' or call 'Create()' was not found. at java.lang.Thread.getStackTrace Typically that error message means that you're missing the Files API library within your project or path. You might want to check your build setup and make sure the library is available. However, another more pressing issue is that you're using the Files API. File is deprecated
[google-appengine] The API package 'file' or call 'Create()' was not found
I am trying to use the blobstore API, but I have this error: com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backed method com.google.apphosting.api. ApiProxy$CallNotFoundException: The API package 'file' or call 'Create()' was not found. at java.lang.Thread.getStackTrace(Thread.java:1589) at com. google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:116) at com.google .apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:65) at com.google. appengine.api.files.FileServiceImpl.makeSyncCall(FileServiceImpl.java:590) at com.google.appengine.api.files.FileServiceImpl.create(FileServiceImpl. java:512) at com.google.appengine.api.files.FileServiceImpl. createNewBlobFile(FileServiceImpl.java:111) at com.listecourses.model. ListeModelEndpoint.insertListeModel(ListeModelEndpoint.java:182) at sun. reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect. NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun. reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl. java:43) at java.lang.reflect.Method.invoke(Method.java:45) at com.google. api.server.spi.SystemService.invokeServiceMethod(SystemService.java:359) at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet. java:113) at com.google.api.server.spi.SystemServiceServlet.doPost( SystemServiceServlet.java:71) at javax.servlet.http.HttpServlet.service( HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet. java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder. java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter( ServletHandler.java:1166) at org.mortbay.jetty.servlet. ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay .jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter( ServletHandler.java:1157) at org.mortbay.jetty.servlet. ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay .jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay .jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org. mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org. mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org. mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org. mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org. mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty. HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty. HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at org .mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google. tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437 ) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext .java:444) at com.google.tracing.CurrentContext.runInContext(CurrentContext. java:230) at com.google.tracing.TraceContext$AbstractTraceContextCallback. runInInheritedContextNoUnref(TraceContext.java:308) at com.google.tracing. TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext .java:300) at com.google.tracing.TraceContext$TraceContextRunnable.run( TraceContext.java:441) at java.lang.Thread.run(Thread.java:745) I using this code: @ApiMethod(name = insertListeModel, httpMethod = POST) public ListeModel insertListeModel(ListeModel listemodel) { EntityManager mgr = getEntityManager(); try { if (containsListeModel(listemodel)) { throw new EntityExistsException(Object already exists); } FileService fileService = FileServiceFactory.getFileService(); if(listemodel.getImage()!=null !listemodel.getImage().equals()) { byte[] data = listemodel.getImage(); String mimeType = image/png; // save data to Google App Engine Blobstore listemodel.setImage(null); mgr.persist(listemodel); AppEngineFile file; file = fileService.createNewBlobFile(mimeType,LM_+listemodel.getId()); FileWriteChannel writeChannel = fileService.openWriteChannel(file, true); writeChannel.write(java.nio.ByteBuffer.wrap(data)); writeChannel.closeFinally(); // your blobKey to your data in Google App Engine BlobStore BlobKey blobKey = fileService.getBlobKey(file); // THANKS TO BLOBKEY YOU CAN GET FOR EXAMPLE SERVING URL FOR IMAGES // UploadOptions uploadOptions = UploadOptions.Builder // .withGoogleStorageBucketName(photobucket11); // Get the image serving URL (in https:// format) String imageUrl = ImagesServiceFactory.getImagesService().getServingUrl(ServingUrlOptions.Builder.withBlobKey(blobKey).secureUrl(true)); // ImagesService imagesService = ImagesServiceFactory // .getImagesService(); // ServingUrlOptions servingOptions = ServingUrlOptions.Builder // .withBlobKey(blobKey); // String imageUrl = imagesService.getServingUrl(servingOptions);
Re: [google-appengine] Webservices REST on Android with App Engine, Restlet and Objectify
Thanks you for your answer. I checked all library, but, I have the same problem. Strangely, this problem doesn't always appears And only to star the apply https://lh3.googleusercontent.com/-P1VPPNR9cTs/U85VXz5p3zI/Ezc/g6wsEYqKOoE/s1600/Sans+titre.png Le mercredi 9 juillet 2014 07:35:38 UTC+2, Vinny P a écrit : On Fri, Jun 27, 2014 at 2:49 PM, Christophe DA COSTA toto...@gmail.com javascript: wrote: I use Webservices Rest on Android Apply, When I call a Webservice, often I have an error: 06-26 20:05:27.358: W/dalvikvm(8672): Exception Ljava/lang/ NoClassDefFoundError; thrown while initializing Lorg/codehaus/jackson/map/ext/JodaSerializers; But in the AppEngine's Logs I haven't error: 2014-06-26 20:05:27.423 /rest/offre 200 219ms 1kb Can you help me? This doesn't seem to be an App Engine problem. It looks like your Android application isn't able to find a library. If you're building your Android app in Eclipse, have you made sure that the Jackson libraries are being exported? Go to the Build Path section, and make sure the checkbox for exporting libraries is checked. - -Vinny P Technology Media Consultant Chicago, IL App Engine Code Samples: http://www.learntogoogleit.com -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.
Re: [google-appengine] Webservices REST on Android with App Engine, Restlet and Objectify
I post here my code: package com.sromku.simple.fb.example.fragments; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import uk.co.senab.actionbarpulltorefresh.library.ActionBarPullToRefresh; import uk.co.senab.actionbarpulltorefresh.library.PullToRefreshLayout; import uk.co.senab.actionbarpulltorefresh.library.listeners.OnRefreshListener; import com.example.hal.model.Offre; import com.example.hal.model.OffreController; import com.sromku.simple.fb.example.OffreAddActivity; import com.sromku.simple.fb.example.R; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.ListFragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; public class OffreFragment extends ListFragment implements OnRefreshListener{ private ListOffre listsOffre = null; private ListString listsName = null; private ArrayAdapterString offreArray; private PullToRefreshLayout mPullToRefreshLayout; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view =inflater.inflate(R.layout.fragment_offre, container, false); ViewGroup viewGroup = (ViewGroup) view; mPullToRefreshLayout = new PullToRefreshLayout(viewGroup.getContext()); ActionBarPullToRefresh.from(getActivity()) .insertLayoutInto(viewGroup) .theseChildrenArePullable(android.R.id.list, android.R.id.empty) .listener(this) .setup(mPullToRefreshLayout); return view; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if(offreArray==null){ getAllOffre(); offreArray= new ArrayAdapterString(getActivity(), android.R.layout.simple_list_item_1, listsName); setListAdapter(offreArray); } } private void getAllOffre() { OffreController list = new OffreController(); if(listsName==null) listsName = new ArrayListString(); try { listsOffre = list.getAllOffre(); } catch (Exception e) { e.printStackTrace(); } if (listsOffre != null) { for (Object o : listsOffre) { Offre u=(Offre) o; if (u != null) listsName.add(u.getTitre() + \n + u.getTexte()); } } } private String[] getStringsOffre() { OffreController list = new OffreController(); int i=0; try { listsOffre = list.getAllOffre(); } catch (Exception e) { e.printStackTrace(); } String[] stringsName ={}; if (listsOffre != null) { stringsName = new String[listsOffre.size()]; for (Object o : listsOffre) { Offre u=(Offre) o; if (u != null) stringsName[i]=u.getTitre() + \n + u.getTexte(); i++; } } return stringsName; } final void newOffre(){ startActivity(new Intent(getActivity(), OffreAddActivity.class)); } @Override public void onRefreshStarted(View view) { new AsyncTaskVoid, Void, Void() { @Override protected Void doInBackground(Void... params) { getAllOffre(); return null; } @Override protected void onPostExecute(Void result) { super.onPostExecute(result); offreArray.notifyDataSetChanged(); mPullToRefreshLayout.setRefreshComplete(); } }.execute(); } } Le mardi 22 juillet 2014 14:18:49 UTC+2, Christophe DA COSTA a écrit : Thanks you for your answer. I checked all library, but, I have the same problem. Strangely, this problem doesn't always appears And only to star the apply https://lh3.googleusercontent.com/-P1VPPNR9cTs/U85VXz5p3zI/Ezc/g6wsEYqKOoE/s1600/Sans+titre.png Le mercredi 9 juillet 2014 07:35:38 UTC+2, Vinny P a écrit : On Fri, Jun 27, 2014 at 2:49 PM, Christophe DA COSTA toto...@gmail.com wrote: I use Webservices Rest on Android Apply, When I call a Webservice, often I have an error: 06-26 20:05:27.358: W/dalvikvm(8672): Exception Ljava/lang/ NoClassDefFoundError; thrown while initializing Lorg/codehaus/jackson/map/ext/JodaSerializers; But in the AppEngine's Logs I haven't error: 2014-06-26 20:05:27.423 /rest/offre 200 219ms 1kb Can you help me? This doesn't seem to be an App Engine problem. It looks like your Android application isn't able to find a library. If you're building your Android app in Eclipse, have you made sure that the Jackson libraries are being exported? Go to the Build Path section, and make sure the checkbox for exporting libraries is checked. - -Vinny P Technology Media Consultant Chicago, IL App Engine Code Samples: http://www.learntogoogleit.com -- You received this message because
[google-appengine] Webservices REST on Android with App Engine, Restlet and Objectify
Hello, I use Webservices Rest on Android Apply, When I call a Webservice, often I have an error: 06-26 20:05:27.358: W/dalvikvm(8672): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lorg/codehaus/jackson/map/ext/JodaSerializers; 06-26 20:05:27.358: I/OffreController(8672): getAllOffres failed ! Internal Server Error 06-26 20:05:27.358: W/System.err(8672): Internal Server Error (500) – The server encountered an unexpected condition which prevented it from fulfilling the request 06-26 20:05:27.368: W/System.err(8672): at org.restlet.resource.ClientResource.toObject(ClientResource.java:1456) 06-26 20:05:27.368: W/System.err(8672): at org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1610) 06-26 20:05:27.368: W/System.err(8672): at $Proxy3.getAllOffre(Native Method) 06-26 20:05:27.368: W/System.err(8672): at com.example.hal.model.OffreController.getAllOffre(OffreController.java:45) 06-26 20:05:27.368: W/System.err(8672): at com.sromku.simple.fb.example.fragments.OffreFragment.getAllOffre(OffreFragment.java:114) 06-26 20:05:27.368: W/System.err(8672): at com.sromku.simple.fb.example.fragments.OffreFragment.onActivityCreated(OffreFragment.java:97) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1508) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:947) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:472) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.view.ViewPager.populate(ViewPager.java:1068) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.view.ViewPager.populate(ViewPager.java:914) 06-26 20:05:27.368: W/System.err(8672): at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1436) 06-26 20:05:27.368: W/System.err(8672): at android.view.View.measure(View.java:16497) 06-26 20:05:27.368: W/System.err(8672): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) 06-26 20:05:27.368: W/System.err(8672): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) 06-26 20:05:27.368: W/System.err(8672): at android.view.View.measure(View.java:16497) 06-26 20:05:27.368: W/System.err(8672): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) 06-26 20:05:27.368: W/System.err(8672): at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:327) 06-26 20:05:27.368: W/System.err(8672): at android.view.View.measure(View.java:16497) 06-26 20:05:27.378: W/System.err(8672): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) 06-26 20:05:27.378: W/System.err(8672): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) 06-26 20:05:27.378: W/System.err(8672): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2291) 06-26 20:05:27.378: W/System.err(8672): at android.view.View.measure(View.java:16497) 06-26 20:05:27.378: W/System.err(8672): at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1912) 06-26 20:05:27.378: W/System.err(8672): at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1109) 06-26 20:05:27.378: W/System.err(8672): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1291) 06-26 20:05:27.378: W/System.err(8672): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:996) 06-26 20:05:27.378: W/System.err(8672): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5600) 06-26 20:05:27.378: W/System.err(8672): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) 06-26 20:05:27.378: W/System.err(8672): at android.view.Choreographer.doCallbacks(Choreographer.java:574) 06-26 20:05:27.378: W/System.err(8672): at android.view.Choreographer.doFrame(Choreographer.java:544) 06-26 20:05:27.378: W/System.err(8672): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) 06-26 20:05:27.378: W/System.err(8672): at android.os.Handler.handleCallback(Handler.java:733) 06-26 20:05:27.378: W/System.err(8672): at android.os.Handler.dispatchMessage(Handler.java:95) 06-26 20:05:27.378: W/System.err(8672): at android.os.Looper.loop(Looper.java:136) 06-26 20:05:27.378: W/System.err(8672): at android.app.ActivityThread.main(ActivityThread.java:5001) 06-26 20:05:27.378: