如何在eclipse上调试部署的appengine数据库上的服务器代码? [英] How to debug server code in eclipse on deployed appengine database?

查看:144
本文介绍了如何在eclipse上调试部署的appengine数据库上的服务器代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中有一个Google AppEngine(Java)项目。我想在Eclipse中调试我的本地代码,但在AppEngine上使用部署的数据库。到目前为止,我使用远程API与用户名/密码(旧方式)



此方法将被弃用,我想使用OAuth,但是当我尝试使用它,它会抛出一个例外:

  java.lang.IllegalStateException:在App Engine上运行的客户端不支持基于OAuth的授权
com.google.appengine.tools.remoteapi.RemoteApiOptions.getOrCreateHttpTransportForOAuth(RemoteApiOptions.java:359)
com.google.appengine.tools.remoteapi.RemoteApiOptions.useApplicationDefaultCredential(RemoteApiOptions.java:162)

当我运行一个在Eclipse中使用远程api的简单Java客户端应用程序时,一切顺利。但是如果客户端是Eclipse中的AppEngine开发环境,它不起作用。



如何使用appengine数据库调试eclipse中的服务器代码?



错误报告: https://code.google.com/p/googleappengine/issues/detail?id=12556

解决方案

除了Adam和Nikita之前的同事之外,我还可以正式确认Google Cloud Engineering团队决心为 ClientLogin shutdown 在截止日期之前。



可能的是,远程API解决方案将在即将发布的1.9.31 / 32版本中提供,尽管这只是一个假设,没有ETA为它。



另外,您可以 ACCE ss Cloud Datastore使用Protobufs 远程使用服务帐户凭据,这可能适合您的需要。



更新2016/01 / 21:



团队已将ClientLogin关闭截止日期延长至2016年4月12日。



更新2016/04/12:



如前所述,修复程序已正确应用,在最新版本的SDK和gcloud中提供。远程API现在可以再次使用OAuth进行应用程序到应用程序(或者从服务器到应用程序)的连接。


I have a Google AppEngine (Java) project in Eclipse. I want to debug my local code in Eclipse but use the deployed database on AppEngine. Until now I use Remote API with username/password (old way)

This method will be deprecated and I want to use OAuth but when I try to use it, it throws an exception:

java.lang.IllegalStateException: OAuth-based authorization not supported for clients running on App Engine
at com.google.appengine.tools.remoteapi.RemoteApiOptions.getOrCreateHttpTransportForOAuth(RemoteApiOptions.java:359)
at com.google.appengine.tools.remoteapi.RemoteApiOptions.useApplicationDefaultCredential(RemoteApiOptions.java:162)

Everthing is fine when I run a simple Java client app that uses remote api in Eclipse. But if the client is AppEngine development environment in Eclipse, it doesn't work.

How can I debug the server code in eclipse using appengine database?

Bug report: https://code.google.com/p/googleappengine/issues/detail?id=12556

解决方案

In addition to what my colleagues Adam and Nikita previously said, I can officially confirm that the Google Cloud Engineering Team is determined to provide a solution to all reasonable use-cases which are affected by the ClientLogin shutdown before its deadline.

Presumably, the Remote API solution will be available in the upcoming releases 1.9.31/32, although this is just an assumption and there's no ETA for it yet.

As an alternative, you can access Cloud Datastore using Protobufs remotely using service account credentials, which might fit your needs for the moment.

UPDATE 2016/01/21:

The team has extended the ClientLogin shutdown deadline to April 12, 2016.

UPDATE 2016/04/12:

As mentioned before, the fix was properly applied and available in the latest versions of the SDK and gcloud. Remote API can now be used again with OAuth for app-to-app (or devserver-to-app) connection.

这篇关于如何在eclipse上调试部署的appengine数据库上的服务器代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆