Unable to start google app engine server [duplicate] - java

I want to try the Google Eclipse plug-in for the Google App Engine, but I get stuck in the tutorial...
I want to start the web application from the Google tutorial, but when I click on "RUN AS > Web Application", I only see this message on the console:
Usage: <dev-appserver> [options] <war directory>
Options:
--help, -h Show this help message and exit.
--server=SERVER The server to use to determine the latest
-s SERVER SDK version.
--address=ADDRESS The address of the interface on the local machine
-a ADDRESS to bind to (or 0.0.0.0 for all interfaces).
--port=PORT The port number to bind to on the local machine.
-p PORT
--sdk_root=root Overrides where the SDK is located.
--disable_update_check Disable the check for newer SDK versions.
What's the problem? It seems like the command to start the server is wrong, but I haven't edited it... can someone help?

It is because your launch configuration file (location: WORKSPACE/.metadata/.plugins/org.eclipse.debug.core/.launches)is corrupt. All you need to do to solve this problem is to delete the existing launch configuration (in Run > Run configurations)

Check if your Eclipse Project or GAE SDK has spaces in the path.

The problem occurs when using blank spaces in the project name.
"Run Configurations> Arguments > Program Arguments", insert quotation marks in the project path. i.e.:
--port=8888 --disable_update_check {PATH}\My Project
To:
--port=8888 --disable_update_check "{PATH}\My Project"
I found it from this thread
Thanks a lot

Some additional information to what's already been said.
You need to install "m2eclipse" otherwise you will not have the "run as" option.

Related

How to debug a .jar file remotely using Intellij Idea

I am currently using intellij idea to code my project that I am working on, after creating of .jar file using OneJar command i deploy the .jar file on my linux server who address is something like 192.164.1.125.there I run the command sudo nohup java -jar fileName.jar & on server to start the jar file in the background and use the rest-client app to send rest calls to my .jar file.Whenever something goes wrong I can only see error message in nohup.out file and what I actually wanted is to debug my jar file using intellij idea i.e how can I debug my .jar running on 192.164.1.125 using intellijIdea running on my client machine.I know I have to use that EditConfigurations option in run menu of intellij and provide IP and Port, but how to do it exactly.
You can do the remote debugging on IntelliJ IDEA 2019.2 version very easily!
Click on "Run" -> "Edit Configurations"
Click on "+" and select "Remote"
Enter your remote IP and select source code folder path
Optional : change the name and port of your wish
Run your remote server jar with the command which is mentioned in the Command line arguments for remote JVM box .
something like this,
sudo nohup java "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8911" -jar fileName.jar &
You are all set. add the breakpoints and click on Debug symbol to debug your remote jar from local
You must run the remote "java -jar .." command in debug mode by adding the additional magic flags. You can then tell your local IntelliJ to create a new debug configuration targeting a remote application - IntelliJ provides the magic flags you need.
The help page for this feature is at https://www.jetbrains.com/idea/help/run-debug-configuration-remote.html

Error running 'webdriver-manager start' on Windows 8.1

I am attempting to run end-to-end test for an angular project using protractor and am getting the following error when I run the command 'webdriver-manager start'
I have run webdriver-manager update, and selenium standalone and chromedriver are up to date.
I have java installed. java -version returns
I also have the path to java in my system environment variables (C:\Program Files\Java\jre1.8.0_31\bin)
Does anyone have any idea how to fix this error?
You can also start the web driver as below,
java -Dwebdriver.ie.driver=D:\Selenium_download_New\IEDriverServer.exe -jar D:\Selenium_download_New\selenium-server-standalone-2.45.0.jar
java -Dwebdriver.chrome.driver=D:\Selenium_download_New\chromedriver.exe -jar D:\Selenium_download_New\selenium-server-standalone-2.45.0.jar
Note the Standalone.jar should be placed in the exact location as above, you can also download the standalone.jar from selenium website
I had the same issue. Probably the webdriver update you are running is installing Selenium required files in another folder that it isn't inside your project folder. At least that was my case.
I was using a grunt task for running Protractor tests. If you are using the same plugin check this folder:
C:\{yourprojectfolder}\node_modules\grunt-protractor-runner\node_modules\protractor\selenium
If you don't find that folder then you are under the same issue as me. Try with another bash. You're using cmd, try with Git Bash. Locate yourself in the following directory:
C:\{yourprojectfolder}\node_modules\grunt-protractor-runner\node_modules\protractor\bin
Then run:
webdriver-manager update
Finally check the selenium folder inside your Protractor plugin. It should be created now.
I didn't have time to find why cmd is behaving different than Git Bash when running the same command inside the same folder. Each one installs the Selenium files in different places.
Maybe you are missing a system variable(C:\Windows\System32\ variable.). Adding this variable would solve your problem.
Hope, it helps!
Add "C:\Windows\System32\" to your PATHs.
On windows, right-click My Computer -> Properties -> Advanced system settings -> Environment Variables -> Edit... PATH and add "C:\Windows\System32\" to the end (with a semi-colon separating each variable).
Otherwise
SET PATH=%PATH%;C:\Windows\System32
Then start web driver using below command
webdriver-manager start
SPAWN command is not available in windows.
Install git. git bash will be installed too.
Now add git bash path to the PATH environment variable.
Restart your command prompt and it will run.

Trouble starting tomcatv7 via Eclipse Kepler

I see that problems like mine have been posted before, some of which posts were answered. I've attempted the fixes, which indeed seem like they should have worked, but I'm still running into the same problem:
I'm trying to run a dynamic web project in Eclipse Kepler (Java EE) via apache tomcat 7.0.53 on my localhost. I've created tomcat as a server in Eclipse, and copied the config files from /tomcat/7.0.53/libexec/conf into /workspace/Servers/Tomcat v7.0 Server at localhost-config, and changed the permissions on the files so that they are all readable and writeable.
However, when I try to start the tomcat server in eclipse, I get this error:
Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete.
In case it's helpful, it's all being run in mac osx 10.6.8, on a 64-bit machine.
Thanks in advance for your help.
I am facing this issue. I have fixed as following way,
Step 1: Delete server at local host(Server tab)
Step 2: Delete Servers folder in (navigator/project explorer)
Step 3: After add New->server->Apache->choose path
Step 4: start the server
After it will work......
How to solve:
1.Close Eclipse
2.Copy all files from TOMCAT_7_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v7.0.53 Server at localhost-config
3.Start Eclipse
4.Expand the Servers project, click on the Tomcat 7 project and hit F5
5.Start Tomcat from Eclipse
Go to Server --> Apache Tomcat v7.0 --> Add
Select jre7 instead of Workbench default JRE
Click on Finish
Stop Server and then Start Server
This is a permissions problem (I had the same issue in ubuntu 14.04, eclipse luna, tomcat7). The executable files are not marked as "executable" when tomcat is donwloaded from eclipse.
Just go to your "[tomcat]/bin" directory in your file system and add execution permission (x) to all .sh files. Then go back to eclipse/servers tab, delete the tomcat7 entry an create again, finally start tomcat from eclipse.
This same problem happened to me before then i got solution for config load error:
it can be solved Right click on Project-> Build Path-> Configure Build Path->go Library tab-> Add External Jar-> browse (Apache TomCat Folder->lib->and add servlet-api.jar) add click ok. it run fine for me.
Unfortunately, this is not much of an answer. I finally never got this working with eclipse Kepler. However, when I installed linux mint on my computer, and used its software installer to install linux 3.8 (indigo), added all the EE updates (all the web/xml additions via help-->install new software-->indigo update site), installed tomcat 7.0, I finally got eclipse to play nice with tomcat (that is, I can run the webapp on tomcat from eclipse, without copy/pasting all the requisite files into tomcat, which is saving me a boatload of time).
I'm sure there is a better way to do this - if anyone has any thoughts about what may have gone wrong in my initial environment, please advise - I'm curious why it didn't work. Here were the specs:
MacOS 10.6.8
Eclipse 4.3.2
Tomcat 7.0.54
My apologies, Raju, for not responding sooner. Thanks for your post.
How to solve:
Close Eclipse
Copy all files from TOMCAT_7_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v7.0 Server at localhost-config
Start Eclipse
Expand the Servers project, click on the Tomcat 7 project and hit F5
Start Tomcat from Eclipse
I found that this is a good old fashion directory naming convention problem. I'm running Linux Ubuntu and noticed that right under {your work space}/Servers there appeared a strange error type file when I opened it had all kinds of chunks of the crazy long directory name "Tomcat 7.0 Server... bla bla" So I deleted the Server, then made use of this little ditty cause my version also won't let me re-add the server again:
1. Close Eclipse
2. In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings delete the following two files:
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
3. Restart Eclipse
Then I re-added the server using a friendlier server name without any crazy spaces or chars: Tomcat7ServerAtLocalHost
The wella... it started with a brand new error for me to debug... which means I'm on the right track... BTW, the new error is: "Cannot publish to the server because it is missing its runtime environment."
So I'm off to debug that mess... Cheers!
This problem is mostly associated with file permissions. So the best way to solve the problem is to install a local copy of Tomcat on your development machine instead of putting Tomcat in a system directory such as /usr/share/tomcat7. This way all Tomcat conf files belong to the user and user group so that it can be run from Eclipse by the user. I normally place Tomcat at my local folder such as /home/abc/dev and it works perfectly with Eclipse development environment.
For me the only solution that works is this solution suggested here:
Could not load the Tomcat server configuration
cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /var/log/tomcat7 log
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo chmod -R a+rwx /usr/share/tomcat7/conf

Mac OS does not open TopCoder Arena to open

I'm running Mac OX 10.7.4 with the latest version of Java. I wanted to access TopCoder's Competition Arena, so I downloaded the .jnlp and tried to open it. However, I keep getting an error saying that the application is unsigned. I've attached screenshots of the error and the details thereof. Does anyone know how to fix this?
I run javaws -viewer and deleted all instances of TC there. Running the jnlp afterwards worked.
The fix was suggested by jthread on TopCoder here
Via Terminal:
javaws ContestAppletProd.jnlp
However, your security settings may warn you:
This application cannot be downloaded because Java has been disabled
through the web. You can enable Java on this system using the Java
Control Panel.
Therefore, you might have to, via Terminal:
sudo javaws ContestAppletProd.jnlp
Steps:
In terminal: javaws -viewer
Java Control Panel -> Security -> Edit Site List -> Add: http://www.topcoder.com and https://www.topcoder.com -> Save.
Start Topcoder Arena applet again.
I tried the fix listed above (removing instances by running javaws -viewer). It did not work for me. What did work was to locate the downloaded ContestAppletProd.jnlp file and running it from a terminal using the following command" javaws ContestAppletProd.jnlp ". You want to run this in the folder containing the file ContestAppletProd.jnlp
I have meet your problem today.The answer above is right,but you need to make sure you have the root
privileges.
so,the solution is
sudo javaws ContestAppletProd.jnlp
that really work.
Open Java Control Panel and go to security tab. First, add these sites to Exception Site List:
http://www.topcoder.com, http://topcoder.com, http://arena.topcoder.com
https://www.topcoder.com, https://topcoder.com, https://arena.topcoder.com
Then run the command javaws -viewer via terminal and delete existing TopCoder instances. Running sudo javaws ContestAppletProd.jnlp should work without any problem. In my case, I double clicked the ContestAppletProd.jnlp file and faced no issues.

error when trying to run Google app engine- Usage: <dev-appserver> [options] <war directory> [duplicate]

I want to try the Google Eclipse plug-in for the Google App Engine, but I get stuck in the tutorial...
I want to start the web application from the Google tutorial, but when I click on "RUN AS > Web Application", I only see this message on the console:
Usage: <dev-appserver> [options] <war directory>
Options:
--help, -h Show this help message and exit.
--server=SERVER The server to use to determine the latest
-s SERVER SDK version.
--address=ADDRESS The address of the interface on the local machine
-a ADDRESS to bind to (or 0.0.0.0 for all interfaces).
--port=PORT The port number to bind to on the local machine.
-p PORT
--sdk_root=root Overrides where the SDK is located.
--disable_update_check Disable the check for newer SDK versions.
What's the problem? It seems like the command to start the server is wrong, but I haven't edited it... can someone help?
It is because your launch configuration file (location: WORKSPACE/.metadata/.plugins/org.eclipse.debug.core/.launches)is corrupt. All you need to do to solve this problem is to delete the existing launch configuration (in Run > Run configurations)
Check if your Eclipse Project or GAE SDK has spaces in the path.
The problem occurs when using blank spaces in the project name.
"Run Configurations> Arguments > Program Arguments", insert quotation marks in the project path. i.e.:
--port=8888 --disable_update_check {PATH}\My Project
To:
--port=8888 --disable_update_check "{PATH}\My Project"
I found it from this thread
Thanks a lot
Some additional information to what's already been said.
You need to install "m2eclipse" otherwise you will not have the "run as" option.

Categories

Resources