Can not debug in Eclipse

1,124 views
Skip to first unread message

sfeinst

unread,
May 18, 2009, 4:24:52 PM5/18/09
to Google Web Toolkit
I installed Eclipse 3.4.2. I then installed the Eclipse plugin for
GWT. I followed the instructions to create my first web app. When I
right-click on the web app project and select Run As and then Web
Application, the GWT Hosted Mode starts and the hosted browser window
also starts. Everything seems to work correctly. But, when I try to
Debug As Web Application, I get the following errors:

ERROR: transport error 202: gethostbyname: unknown host
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT
(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports
initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)

I saw some notes about firewalls possibly being an issue, but as far
as I know, there is no local Firewall being run on my machine.

Any ideas on what I can do to get this working? I have not used
Eclipse for debugging any kind of web app before so I don't even know
if this is an Eclipse issue or a GWt plugin issue.

Thanks.

Miguel Méndez

unread,
May 19, 2009, 12:48:44 PM5/19/09
to Google-We...@googlegroups.com
When you debug an application eclipse will try to connect to it using JDWP.  The target of the connection is probably something like localhost:SOME_NUMBER.  I suspect that your machine cannot resolve an address for localhost.  If you type: 

nslookup localhost 

at a command prompt, it will probably fail to resolve.  The following Sun Forum link might be of use: http://forums.sun.com/thread.jspa?threadID=5138855 .
--
Miguel

sfeinst

unread,
May 19, 2009, 2:40:28 PM5/19/09
to Google Web Toolkit
Miguel,

Thanks for the response. Turns out, my company recently added a
security app to all machines which among other things monitors/
prevents apps from executing other apps. The security app is
preventing eclipse from running cmd.exe (my guess is to then run the
debugger). I unfortunately have no way of overriding this function.
So I think I'm out of the ability to debug web apps (though I can
debug regular apps).

Miguel Méndez

unread,
May 19, 2009, 4:40:34 PM5/19/09
to Google-We...@googlegroups.com
Wow.  That seems pretty strict.  Seems like you should be able to get a waiver for that... otherwise it's a productivity killer.
--
Miguel

sfeinst

unread,
May 20, 2009, 8:10:37 AM5/20/09
to Google Web Toolkit
On May 19, 4:40 pm, Miguel Méndez <mmen...@google.com> wrote:
> Wow.  That seems pretty strict.  Seems like you should be able to get a
> waiver for that... otherwise it's a productivity killer.
>

I'm not that familiar with the security app, but it usually asks if I
want to allow app A to run app B (and even does that for eclipse
originally), but there is something about the debugger for web apps
that it is not even asking about it. Just denying the request. Since
I can debug desktop apps, I have to assume it is related to how the
debugger is being called for web apps (is this a GWT thing or is it
the same for debugging straight JSP apps as well - I don't know).

Miguel Méndez

unread,
May 20, 2009, 9:06:53 AM5/20/09
to Google-We...@googlegroups.com
We extend the standard eclipse java launch configurations to add some program arguments.  We don't do anything special.  It should work just like debugging a desktop app in eclipse.

The only think that I could think to try would be to use a regular java launch configurations and see if it has the same problem.  The following link talks about how to do that, http://code.google.com/webtoolkit/doc/1.6/DevGuideCompilingAndDebugging.html#DevGuideHostedMode .
--
Miguel

sfeinst

unread,
May 21, 2009, 2:04:43 PM5/21/09
to Google Web Toolkit
I created a lauch configuration manually and then imported it into
Eclipse. Debugging is now working.

Thanks

Miguel Méndez

unread,
May 22, 2009, 10:18:40 AM5/22/09
to Google-We...@googlegroups.com
Would you be able to file a bug in the GWT issue tracker that includes the working launch config and the one that didn't?
--
Miguel

sfeinst

unread,
May 22, 2009, 1:46:08 PM5/22/09
to Google Web Toolkit
I'm not sure what is going on now. Since I imported the launch file,
I did not have one to get an older one. So I created a second web app
to get its lauch file. It doesn't have one (I could have sworn the
first web app did). Also, debugging is working on the second web app
eventhough no launch was imported and I don't see one in the folder.
So I am at a loss as to why everything works now. I also relooked at
the launch I imported and it contains the name of the project I
created it from (using command line tools) and not the web app so I
don't see how it is affecting anything anyway.

The only difference between first web app and second web app is after
I had problems, I ran the GWT command line tools to create an app
outside of Eclipse. Is it possible, doing that created a file
somewhere in GWT that is was missing? I'm searching around to see,
but it is not really makign sense.

sfeinst

unread,
May 22, 2009, 1:47:52 PM5/22/09
to Google Web Toolkit
Also, when I imported the lauch configuration, where did it go? I
thought in my web app, but now I'm thinking it might have been more
global. So maybe importing did do something (if I can figure out what
the import does with the file).

Miguel Méndez

unread,
May 22, 2009, 1:57:59 PM5/22/09
to Google-We...@googlegroups.com
When you create a project using the command line tools a launch configuration gets in the same directory as the project file.  When you import your project that launch configuration will get imported as well.  Also, when you use the command line tools, the generated project is GWT only.  There will be no App Engine stuff in it.

I was wondering if the one that did not work was using GWT + App Engine and the one that does work only uses GWT?  When you create a web app using the command line tools it is GWT only.  Is it possible that you overwrote the previous project definition while using the command line tools?

As far as where launch configurations are stored, eclipse generates launch configurations in the workspace metadata directory by default.  That may explain why you did not see it.
--
Miguel

sfeinst

unread,
May 22, 2009, 3:54:44 PM5/22/09
to Google Web Toolkit
I can't guarantee what for the first version in Eclipse, but I do know
that when I created the second version in Eclipse, I unchecked App
Engine. I may try a third version and not uncheck it to see what
happens. But if the launch gets added to workspace metadat, does that
affect all projects in the workspace? If so, then all new projects
may work anyway.

Miguel Méndez

unread,
May 22, 2009, 4:11:28 PM5/22/09
to Google-We...@googlegroups.com
No, it should only affect the project associated with the launch configuration.
--
Miguel

Bhavik Kothari

unread,
Aug 11, 2015, 7:41:18 PM8/11/15
to Google Web Toolkit, Google-We...@googlegroups.com
What is the permanent solution for this as I am facing this error for the first time in Eclipse Mac version and not in windows version. The worst case is when I clean build, maven build and refresh the project, the GWT app runs sometimes and stops then unknowningly, acting weird.

I am using GWT since many years but this is something very weird, even my firewall is off, so no point thinking that as well.

Thanks Bhavik.
Reply all
Reply to author
Forward
0 new messages