问题描述
我用GAE创建了一个简单的项目,并将我的包模型放在PMF.java(Persistence Manager Factory Class)和一个类(Employee.java)中。右键单击Google-> Generate Cloud Endpoint Class上的Employee类,插件会正确生成EmployeeEndpoint,但在创建后会出现以下错误:
war-> WEB-INF-> lib
为此jar:
appengine-api-labs.jar
appengine-endpoints.jar
appengine -endpoints-deps.jar
打开Eclipse的ErrorLog,它只是说:
异常堆栈跟踪不可用
所以点击项目:Google->生成云端点客户端库出现错误:
错误在生成客户端库
与此消息:
尝试生成客户端库时发生错误
所以,现在我面临这个错误,我能做些什么来解决这个问题?非常感谢您提前
:
消息:
意外异常
异常堆栈跟踪:
java.lang.reflect.InvocationTargetException
在com.google.gdt .eclipse.appengine.swarm.wizards.GenerateSwarmApiAction $ 1.run(GenerateSwarmApiAction.java:82)
在org.eclipse.jface.operation.ModalContext $ ModalContextThread.run(ModalContext.java:121)
导致by java.lang.ClassNotFoundException:com.google.api.server.spi.tools.ClientLibGenerator $ Language
在java.net.URLClassLoader $ 1.run(URLClassLoader.java:366)
在java。 net.URLClassLoader $ 1.run(URLClassLoader.java:355)
在java.security.AccessController.doPrivileged(本机方法)
在java.net.URLClassLoader.findClass(URLClassLoader.java:354)
在java.lang.ClassLoader.loadClass(ClassLoader.java:425)
在java.lang.ClassLoader.loadClass(ClassLoader.java:358)
在com.google.gdt.eclipse.appeng ine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:113)
在com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:258)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:444)
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction $ 1.run(GenerateSwarmApiAction.java:80)
... 1更多
1)清洁项目2)关闭所有项目3)重新打开项目4)重新关闭项目5)关闭并重新打开Eclipse 6)打开项目7)清洁项目8)尝试生成Cloud Endpoint,现在可以使用 - 这是愚蠢的,但不像Eclipse那么愚蠢。
I created a simple project with GAE and i put in my package 'model' the PMF.java (Persistence Manager Factory Class) and a class (Employee.java).After right-clicking the Employee class on Google->Generate Cloud Endpoint Class, the plugin correctly generate my EmployeeEndpoint, but after created that it appears an error on:
war->WEB-INF->lib
for this jar:
appengine-api-labs.jar
appengine-endpoints.jar
appengine-endpoints-deps.jar
And opening the ErrorLog of Eclipse, it just says:
An exception stack trace is not available
So clicking on the project to: Google->Generate Cloud Endpoint Client Library an error appears:
Error in Generating Client Libraries
with this message:
An error occurred when attempting to generate the client libraries
So, now that i'm facing this error, what could i do to solve the problem? Thank you so much in advance
[EDIT Error Log]:
Message:
Unexpected Exception
Exception Stack Trace:
java.lang.reflect.InvocationTargetException
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:82)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: com.google.api.server.spi.tools.ClientLibGenerator$Language
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:113)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:258)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:444)
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:80)
... 1 more
1) clean Project 2) Close All Projects 3)Re Open project 4) re-close project 5)closing and re-opening Eclipse 6)Open the project 7) Clean project 8)re try to generate Cloud Endpoint, and now works -.-" This is stupid, but not as stupid as Eclipse.
这篇关于在GAE中创建Google Cloud Endpoint时的项目错误(Eclipse)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!