在eclipse中无法启动Google Web应用程序,安全限制将不会被完全模拟 [英] Can't start google web app in eclipse, Security restrictions will not be completely emulated

查看:204
本文介绍了在eclipse中无法启动Google Web应用程序,安全限制将不会被完全模拟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  2014年3月19日5:21:28 com.google.appengine.tools.development.agent.AppEngineDevAgent premain 
SEVERE:无法加载App Engine dev代理。安全限制不会被完全模拟。
java.lang.RuntimeException:转换期间异常异常。
com.google.apphosting.utils.clearcast.ClearCast $ CasterImpl.cast(ClearCast.java:385)
com.google.apphosting.utils.clearcast.ClearCast.staticCast(ClearCast.java: 252)
在com.google.apphosting.utils.clearcast.ClearCast.staticCast(ClearCast.java:263)
com.google.appengine.tools.development.agent.AppEngineDevAgent.premain(AppEngineDevAgent。 java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown来源)
在java.lang.reflect.Method.invoke(未知来源)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(未知来源)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown来源)
导致:java.lang.IllegalAccessException:类com.google.apphosting.utils.clearcast.ClearCast $ CasterImpl无法访问com.google.appengine.tools.development.agent类的成员$ Proxy 0与修饰符public
at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
在java.lang.reflect.AccessibleObject.slowCheckMemberAccess(未知来源)
在java.lang.reflect .AccessibleObject.checkAccess(未知源)
在java.lang.reflect.Constructor.newInstance(未知来源)
在com.google.apphosting.utils.clearcast.ClearCast $ CasterImpl.cast(ClearCast.java :383)
... 9更多

有没有人有任何线索如何解决这个问题?



代码:

  @SuppressWarnings(serial)
public class Lab7Servlet扩展HttpServlet {
public void doGet(HttpServletRequest req,HttpServletResponse resp)
throws IOException {
resp.setContentType(text / plain);
resp.getWriter()。println(Hello,world);
}
}


解决方案

iQue ,



我遇到完全相同的问题,我发现我的日食正在使用JRE 8(1.8版)。我没有打算这个,当我把它改为1.7,这解决了这个问题。



编辑:窗口 - >首选项 - > Java - >安装的JRE。检查jre7是否为默认值。



相关注意事项:App Engine安装说明使用1.7(但不要说您不能使用1.8): https://developers.google.com/appengine/docs/java/gettingstarted/installing


When I try to run the auto generated code in my google web app project using GAE I get the following error:

Mar 19, 2014 5:21:28 PM com.google.appengine.tools.development.agent.AppEngineDevAgent premain
SEVERE: Unable to load the App Engine dev agent. Security restrictions will not be completely emulated.
java.lang.RuntimeException: Unexpected exception during cast.
at com.google.apphosting.utils.clearcast.ClearCast$CasterImpl.cast(ClearCast.java:385)
at com.google.apphosting.utils.clearcast.ClearCast.staticCast(ClearCast.java:252)
at com.google.apphosting.utils.clearcast.ClearCast.staticCast(ClearCast.java:263)
at com.google.appengine.tools.development.agent.AppEngineDevAgent.premain(AppEngineDevAgent.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)
Caused by: java.lang.IllegalAccessException: Class com.google.apphosting.utils.clearcast.ClearCast$CasterImpl can not access a member of class com.google.appengine.tools.development.agent.$Proxy0 with modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(Unknown Source)
at java.lang.reflect.AccessibleObject.checkAccess(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.google.apphosting.utils.clearcast.ClearCast$CasterImpl.cast(ClearCast.java:383)
... 9 more

Does anyone have any clue how to fix this?

Code:

@SuppressWarnings("serial")
public class Lab7Servlet extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse resp)
        throws IOException {
    resp.setContentType("text/plain");
    resp.getWriter().println("Hello, world");
    }
}

解决方案

iQue,

I encountered exactly the same problem, and I discovered that my eclipse was using JRE 8 (version 1.8). I didn't intend this, and when I changed it to 1.7, this solved the problem.

Edit: Window -> Preferences -> Java -> Installed JREs. Checked jre7 to make it default.

Relevant note: The App Engine installation instructions say to use 1.7 (but don't say you can't use 1.8): https://developers.google.com/appengine/docs/java/gettingstarted/installing

这篇关于在eclipse中无法启动Google Web应用程序,安全限制将不会被完全模拟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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