Tag: google cloud endpoints

使用Google Eclipse插件干扰Google Cloud Endpoints

使用Google Appengine Eclipse插件生成端点时,我遇到了一种奇怪的行为。 我有一个端点类,有超过20个端点方法。 当我第一次尝试为android生成端点时,我得到了错误 Generating Cloud Endpoint has encountered errors and is not complete 通过故障排除,我注释掉所有找到罪魁祸首的方法。 我发现有点莫名其妙。 取消注释第16个方法后,我再次收到错误。 有两种方法相互干扰! 如果我注释掉一个或另一个端点生成正常。 但如果我同时取消注释,我会得到上面的错误。 有谁知道可能导致这种干扰的原因是什么? @ApiMethod(name = “getOrangers”, httpMethod = HttpMethod.POST) public FaceList getOrangers(UserRequest request) throws NotFoundException { FaceList list = new FaceList(); return list; } @ApiMethod(name = “getMangoers”, httpMethod = HttpMethod.POST) public FaceList getMangoers(UserRequest request) throws NotFoundException […]

即使没有指定@Load,Objectify也会在Ref 后面加载对象

我有一个引用用户对象的帐户对象。 @Cache @Entity public final class Account { @Id Long id; @Index private Ref user; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public User getUser() { return user.get(); } public void setUser(User user) { this.user = Ref.create(user); } } 我按照此处的建议隐藏了参考资料: http : //code.google.com/p/objectify-appengine/wiki/Entities – 请注意参考资料没有 @Load注释。 […]

沿着java google-endpoint api提供静态图像

在Python中托管app-engine上的基本网站,我可以将所有图像文件放在静态目录中,比如说img,然后在yaml文件中 – url: /img static_dir: img 然后访问我的图像,我只需要myid.appspot.com/img/pic.jpeg 我需要为Java google-endpoint后端做同样的事情。 那会怎么样? 我正在使用Google-eclipse-plugin。 我想我需要编辑web.xml文件。 但我不确定我会把它放在那里。 我的/img目录的结构是这样的,它依次包含许多目录,每个目录中都有图像。 例如: /img/famousActors/willSmith.jpeg 。 参考在blobstore中存储静态图像

java.security.AccessControlException:可通过浏览器访问但不在同一服务器内的文件

所以不要重复太多,请参考java google-enpoint api旁边的静态图片 。 从引用的链接可以看出,我可以通过url查看图像。 但是,当我尝试使用类似的代码读取文件名时 public void listFilesForFolder(final File folder) { for (final File fileEntry : folder.listFiles()) { if (fileEntry.isDirectory()) { listFilesForFolder(fileEntry); } else { System.out.println(fileEntry.getName()); } } } final File folder = new File(“/home/you/Desktop”); listFilesForFolder(folder); 我得到一个安全例外 java.security.AccessControlException: access denied (“java.io.FilePermission” “/myImages” “read”) 有谁知道修复? 为什么通过浏览器的调用显示图像,然而来自服务器本身的调用会引发exception? 我觉得很奇怪。

使用Endpoints为Android设想

我读到Objectify是一个支持框架,用于端点。 如何从GPE App Engine Connected Android Project向导转换样本以处理Objectify 4数据? 我明白这个: org.datanucleus.exceptions.ClassNotPersistableException:类“com.example.MyObjectifyTestInfo”不可持久化。 这意味着它要么没有被增强,要么文件的增强版本不在CLASSPATH中(或者被未增强的版本隐藏),或者找不到类的元数据/注释。 我搜索了很多,但在stackoverflow或其他地方找不到任何东西。 谢谢。

GAE SDK 1.9.4打破了GPE 3.5.1

当我尝试使用eclipse接口生成客户端库时,我得到了这个错误: eclipse.buildId = M20120914-1800 java.version = 1.7.0_25 java.vendor = Oracle Corporation BootLoader常量:OS = macosx,ARCH = x86_64,WS = cocoa,NL = pt_BR框架参数:-product org.eclipse.epp.package .dsl.product -keyring /Users/renanfranca/.eclipse_keyring -showlocation命令行参数:-os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.dsl.product -keyring / Users / renanfranca /。 eclipse_keyring -showlocation错误星期四01月01日19:39:22 BRT 2014在com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction $ 1.run(GenerateSwarmApiAction.java:82)上发生意外exceptionjava.lang.reflect.InvocationTargetException org.eclipse.jface.operation.ModalContext $ ModalContextThread.run(ModalContext.java:121)引起:java.lang.ClassNotFoundException:com.google.api.server.spi.tools.ClientLibGenerator $ java.net.URLClassLoader上的语言在java.security.AccessController.doPrivil的java.net.URLClassLoader $ 1.run(URLClassLoader.java:355)$ 1.run(URLClassLoader.java:366) 在java.lang.ClassLoader.loadClass(ClassLoader.java:424)的java.net.URLClassLoader.findClass(URLClassLoader.java:354)处的java(Native方法),java.lang.ClassLoader.loadClass(ClassLoader.java:357)在com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:113)的com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator。 java:258)com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:444)at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction […]