现在的位置: 首页 > 综合 > 正文

异常:Invocation of com.google.gwt.user.tools.WebAppCreator failed. See the error log for more details

2012年10月28日 ⁄ 综合 ⁄ 共 3734字 ⁄ 字号 评论关闭

做一个开源的项目,前台是用GWT做的,下载并安装好GWT后,新建一个项目时报错:

Invocation of com.google.gwt.user.tools.WebAppCreator failed. See the error log for more details.

解决方法是:
在环境变量中的系统变量删除Classpath值,然后重新启动eclipse就可以了,真是个莫名其妙的问题

具体的解决方案在这个页面能找到

第二种:


Go to your Project Properties / Build Path there move the "GWT library" to the top of the BuildPath.

Now try to recompile again.

折腾了半天终于解决了

Reported by W.A.vand...@tudelft.nl, Nov 12, 2010
 Found in GWT Release (e.g. 1.5.3, 1.6 RC): GWT 2.1 Google plugin for Eclipse 3.6

 

Encountered on OS / Browser (e.g. WinXP, IE6-7, FF3): WinXP and WinVista, Eclipse 3.6.1 Helios

 

Detailed description (please be as specific as possible):
After a fresh install of Eclipse and the GWT-plugin, creating a new GWT web application project will fail complaining "Creation of element failed. Reason: Invocation of com.google.gwt.user.tools.WebAppCreator failed." whenever a Classpath variable exists within
the Windows Environment variables (eg Classpath=.)

I wonder why GWT apearently defaults to (only) using the Windows Classpath if there is one, while it can perfectly do without using the classpath settings from within eclipse. If not a bug, it seems at least an undocumented feature.

 

Shortest code snippet which demonstrates issue (please indicate where
actual result differs from expected result):
Just add a Classpath variable in windows (eq Classpath=.), restart Eclipse, and try to create a new web application project...

Workaround if you have one:
Remove the Classpath variable from the Windows Environment variables, then restart Eclipse.

Links to relevant GWT Developer Forum posts:

 Comment 1 by birdiesm...@gmail.com, Nov 15, 2010thanks. Works for me - got the problem after updating...

Lessons learned - don't update to soon.

 Comment 2 by khalidud...@gmail.com, Nov 16, 2010Thanks .. worked absolutely ...!!!

 Comment 3 by khalidud...@gmail.com, Nov 16, 2010Thanks .. worked absolutely ...!!!

 Comment 4 by e.hos...@gmail.com, Nov 17, 2010thanks.. worked after i removed the classpath variable

 Comment 5 by ram...@gmail.com, Jan 25, 2011removed classpath.. and it worked cool for me.. thanks

 Comment 6 by goodguyz...@gmail.com, Feb 20, 2011Thanks, solution worked for me!

 Comment 7 by Colin.Bi...@gmail.com, Mar 13, 2011Thanks, work for me.
Let me translate that in Chinese.
遇到这种问题,就把系统中设置的Classpath删掉

 Comment 8 by Steve.Ne...@gmail.com, Jun 3, 2011Does anyone know a workaround if you are unable to remove the classpath variable from the windows environment variables?

 Comment 9 by cosmo.kr...@gmail.com, Jul 20, 2011well, it's a pretty lame suggestion - to remove an environment variable. what if other software relies on it?

this is my third attempt in the past few years to try out the GWT and it had failed as well as two others.

 Comment 10 by janez.la...@gmail.com, Jul 22, 2011If it was 1999 I would agree with cosmo, but lately I don't have any classpath environment variable. I have got one which was needed for some old app, but nowadays
you don't do this anymore. So delete this classpath variable and do try GWT. GWT doesn't have anything to do with Eclipse understanding of environment:)

 Comment 12 by kin...@mindless.com, Jul 27, 2011This problem exists still.  I am using Eclipse Indigo (3.7) and GWT 2.3. 

This workaround DOES solve the problem, BUT, it would be nice if this problem were to be fixed.  I have a classpath environment variable on my machine, and I need to keep it.

The command-line version works just fine, though, so why can't the plugin handle this?  Simply upon launch define its own classpath and go.

 Comment 13 by huj...@gmail.com, Oct 10, 2011I think that all of you is wrong ,just all gwt-dev.jar and get-user.jar to classpath

 Comment 14 by agrawalm...@gmail.com, Jan 15, 2012I donot have any CLASSPATH variable in my windows environment variables and still getting the error that "Creation of element failed. Reason: Invocation of com.google.gwt.user.tools.WebAppCreator
failed."

Please suggest me solution

 Comment 15 by gaozheyuan13@gmail.com, Mar 14, 2012what is the content of classpath? Can you be more specific?

 Comment 16 by amitchop...@gmail.com, Apr 5, 2012Un-checking the "Generate project sample code" check box on the "New web Application Project" window solved the problem for me.

 Comment 17 by gayandee...@acoidea.com, May 12, 2012thnaks

 Comment 18 by gayandee...@acoidea.com, May 12, 2012thanks

【上篇】
【下篇】

抱歉!评论已关闭.