GAE:无法在本地开发服务器上调用javax.security.auth.Subject.getSubject()

时间:2013-08-14 14:32:31

标签: google-app-engine maven maven-gae-plugin

如果我使用App Engine maven插件启动我的本地google app引擎开发服务器:

mvn appengine:devserver

我尝试启动mapreduce作业(使用appengine-mapreduce库),我得到一个java.security.AccessControlException:访问被拒绝(“javax.security.auth.AuthPermission”“getSubject”)因为代码尝试调用javax.security.auth.Subject.getSubject()方法(参见下面的完整堆栈跟踪)

这很奇怪,因为:

1)javax.security.auth.Subject.getSubject()位于gae的白名单中,可以调用

2)如果我从intellij启动服务器,我没有得到此异常并且地图减少作业已成功启动

我尝试使用GAE 1.8.1,1.8.2以及最新的1.8.3和相同版本的maven google appengine插件。

出了什么问题?

完整堆栈跟踪: [INFO] java.security.AccessControlException:拒绝访问(“javax.security.auth.AuthPermission”“getSubject”) [INFO] at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366) [INFO]在java.security.AccessController.checkPermission(AccessController.java:560) java.lang.SecurityManager.checkPermission中的[INFO](SecurityManager.java:549) [INFO] com.google.appengine.tools.development.DevAppServerFactory $ CustomSecurityManager.checkPermission(DevAppServerFactory.java:383) [INFO]在javax.security.auth.Subject.getSubject(Subject.java:287) [INFO] at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:467) [INFO]在org.apache.hadoop.mapreduce.JobContext。(JobContext.java:80) [INFO] com.google.appengine.tools.mapreduce.AppEngineJobContext。(AppEngineJobContext.java:123) [INFO] com.google.appengine.tools.mapreduce.AppEngineJobContext.createContextForNewJob(AppEngineJobContext.java:132) [INFO] com.google.appengine.tools.mapreduce.v2.impl.handlers.Controller.handleStart(Controller.java:85) [INFO] com.google.appengine.tools.mapreduce.v2.impl.handlers.Status.handleStartJob(Status.java:81) [INFO] com.google.appengine.tools.mapreduce.v2.impl.handlers.Status.handleCommand(Status.java:182) [INFO]在com.google.appengine.tools.mapreduce.MapReduceServlet.doPost(MapReduceServlet.java:203) [INFO]在javax.servlet.http.HttpServlet.service(HttpServlet.java:637) [INFO]在javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [INFO] com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)

0 个答案:

没有答案