Getting an error while trying to run a standard google app engine program on eclipse - eclipse

Have created a GAE standard Java Project using Eclipse IDE. This is the most basic one and I have not made any changes to it.However when I am trying to debug it, its geting an error.Error message being shown is that port 8080 is already in use.I think I have been able to properly install the GAE plug-in. Could someone please point what the issue is and a solution as well? Sc shot: https://i.stack.imgur.com/w2Xhz.png

This error means that a process is already using the port 8080, so your app can not use it.
You can either use another port or find the process that is using the port and terminate it so the port is free for your app to use. You can follow these instructions for this last approach, which is the one I recommend.

Related

Eclipse/ App Engine Page load failed with error: The network connection was lost

I had a Google App Engine Standard Projects running in Eclipse in different workspaces without any problems for many weeks.
Suddenly, since today, I get an error when trying to Run any projects as an App Engine:
http://localhost:8080/
Page load failed with error: The network connection was lost.
I have no idea by what this was caused, as I was coding on a project during that time and a few hours ago still worked normally.
I do not get any other specific error in the Console, the processes seem to run normally at first. Any ideas that I could try?
I think for some reason the local preview in port 8080 is not available anymore, not sure if it changed its port, you can try restarting your OS and eclipse and launching the local server again. You can also Go to the servers tab in Eclipse and change the HTTP port there to something else like 9080 and try again with that new port.
I could not find the exact reason why it was caused, but my system seemed to have issues to resolve localhost. I used it with the IP instead and after some days it started working again using localhost.

Restart Eclipse application

How can I restart an application in Eclipse through a socket call?
I built an error diagnosis app which can checks what code should be changed to handle the error, but after the change I have to restart the app again. I already have developed a plugin for Eclipse which would take care of this, but I am not sure on how to restart the app.
1.) Is there an internal Eclipse command to restart the app?
2.) Do I have to use a command shell (which I wouldn't prefer)?
Hope someone can help me or give me some guidance. Also I know that there is a possibility to restart an app for debugging, but I want to run the app without debugging.
If you mean you have an Eclipse 3.x style RCP application and you want to restart the RCP from an Eclipse plug-in then you just do:
PlatformUI.getWorkbench().restart(true);
which restarts the RCP using the current workspace.
For an e4 RCP you do:
#Inject
IWorkbench workbench;
workbench.restart();
#greg-449: Thanks for your respond, but what I am trying to achieve is a bit more complex. Consider the following, I have a service that runs on another machine in my company network. It turned out something wrong is going with this service. So you can connect with with a remote debugger to the server and can check with the source code, that you have on your local machine, what is going on. I would say the classic Remote Debugging in Java.
But when you have fixed the error in the code you also have to restart the service on this other machine somewhere in the network. The question is how to do this? By a shell command which gives you the instances on this machine where the service is running or is there some other possibility?
Hope this helps more to understand the problem.

GWT 2.7 Super Dev Mode not working while testing on the same network

I recently began using GWT 2.7 in Eclipse Luna and I was running my projects seamlessly while testing them in localhost:8888, the thing is, when I tried to test them (any of them, even a new app with only the autogenerated content) with another device on the same local network using (pc running eclipse ip):8888 I get a message like this:
The page at (ip):8888 says: Couldn't load (app) from Super Dev Mode server at http://(ip):9876. Please make sure this server is ready. Do you want to try again?
This also happens when I try to access to the app in the pc running eclipse with (its own ip):8888.
I've checked these four similar questions, but they didn't have any really helpful answers, these are a few things I've tried or discovered already:
I enabled the 9876 port on the firewall
I've deleted the .nocache.js and .devmode.js so that they're generated again
I noticed that when this problem occurs it's because the browser can't get the (ip):9876/recompile-requester/(app) file
I tried deploying the app to GAE and it doesn't work there either, nothing that happens on the modules Java code runs (And for some reason, I get a "Uncaught java.lang.ClassCastException" message on the chrome console, but this only happens on the deployed version, it doesn't happen on localhost:8888 or in (local ip):8888)
But nothing has worked and the four questions I mentioned are pretty much the only things related to this I've found, so I really don't know what else to try.
As Thomas pointed out, the problem I had was that from GWT 2.6 onwards, if you want to test from other devices in the same network, you have to whitelist the addresses you'll be using in each *.gwt.xml file using a command line like this:
<set-configuration-property name="devModeUrlWhitelistRegexp" value="http://(localhost|127\.0\.0\.1|192\.168\.150\.(\d{1,3}))(:\d+)?/?.*" />
I also had to add a -bindAddress 0.0.0.0 attribute to the run config for it to work.

toy web service on Eclipse- trouble with glassfish4 server

I am new to Java EE, and am trying to learn how to create a web service. I followed the instructions given at this link- http://www.eclipse.org/webtools/community/education/web/t320/Implementing_a_Simple_Web_Service.pdf to create a simple Hello World web service. I got into trouble when trying to get Eclipse to start the glassfish4 server. I get the error shown below-
I am not sure what ${sunappserver.rootdirectory} means and how it is defined. Much appreciate anyone who can help me understand this and get it working.
Check your glassfish installation. This file contains lots of configuration details. Your Exception means it is missing! Maybe there is a backup called domain.xml.bak in the same directory.
Mine is in /usr/local/glassfish4_1/glassfish/domains/domain1/config/domain.xml

Where does GWT's Hosted Mode Jetty Run From?

I'm trying to call a web service in my back end java code when it's
running in hosted mode. Everything loads fine, the GWT RPC call works
and I can see it on the server, then as soon as it tries to call an
external web service (using jax-ws) the jetty falls over with a
Internal Server Error (500).
I have cranked the log all the way up to
ALL but I still don't see any stack traces or cause for this error. I just get one line about the 500 Error with the request header and response.
Does anyone know if the internal jetty keeps a log file somewhere, or
how I can go about debugging what's wrong?
I'm running GWT 1.7 on OS X 10.6.1
Edit: I know that I can use the -noserver option, but I'm genuinely interested in finding out where this thing lives!
From the documentation:
You can also use a real production
server while debugging in hosted mode.
This can be useful if you are adding
GWT to an existing application, or if
your server-side requirements have
become more than the embedded web
server can handle. See this article on
how to use an external server in
hosted mode.
So the simplest solution would be to use the -noserver option and use your own Java server - much less limitations that way, without any drawbacks (that I know of).
If you are using the Google Plugin for Eclipse, it's easily set up in the properties of the project. Detailed information on configuration can be found on the official site.
Edit: you could try bypassing the Hosted Mode TreeLogger, as described here: http://blog.kornr.net/index.php/2009/01/27/gently-asking-the-gwt-hosted-mode-to-not):
Just create a file called
"commons-logging.properties" at the
root of your classpath, and add the
following line:
[to use the Log4j backend]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
[to use the JDK14 backend]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
[to use the SimpleLog backend]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
Edit2: the trunk of GWT now also supports the -logfile parameter to enable file logging, but it probably won't help in this case, since the problem lies in the way the Hosted Mode treats the exceptions, not the way it presents them.