Eclipse Google Plug-In doesn't start server for web application - 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

Apache Open meetings run locally for development

I am aiming to use Open meetings in my project. Before doing that, I was starting with some UI colour changes and check the system on my local machine. For doing this, I cloned the Git repository https://github.com/apache/openmeetings .
After this, executed the command: mvn clean install -PallModules
*Working with Java version 11 and mvn version 3.6.3
After the execution, build generates successfully:
After this, as mentioned in git, I followed following steps:
go to openmeetings-server/target directory
extract apache-openmeetings-x.x.x.tar.gz (or apache-openmeetings-x.x.x.zip for windows) to new directory
enter to this new directory and execute ./bin/startup.sh (./bin/startup.bat for Windows)
Results says, Tomcat started. Also with command netstat -lntp, I can see port 5080 is occupied by a java jar.
But, the problem is when i open http://localhost:5080, it successfully redirects me to http://localhost:5080/openmeetings/ but shows site can't be reached.
This is very weird, please help!
Build instructions and helpful commands are here
https://openmeetings.apache.org/BuildInstructions.html
I would recommend to use unpacked build
OM at http://localhost:5080/openmeetings works for me as expected
(I would recommend to use it at https://localhost:5443/openmeetings overwise Camera&Microphone will be blocked by browser)
Is it possible your request is being blocked by FW?
P.S. I'm one of OpenMeetings devs

HTTP Status 500 - Could not get next sequenced ID for sequence name: Visitor

I am trying to run ofbiz on by local machine(localhost) and my operating system is ubuntu 14.04. Till now I have installed JRE, JDK and apache ant and my system also contains apache server and running.Then went to directory contains build.xml and run following command
sudo ant run-install
Then replace new build.xml file and run following command
ant load-demoant start
Then server will starts and code is accessible with url https://localhost:8443/ecommerce/control/checkLogin and everything is working fine.Now issue is on next day when i start server with same ant start command server starts fine but on accessing it starts giving me error likeHTTP Status 500 - Could not get next sequenced ID for sequence name: Visitor. Screen shot of error is added below:
I am new to ofbiz please help me find:
1.Why this is error coming on previously worked code?
2.How to solve this issue?
Thank you in advance.
I got same issue when i tried to run ofbiz with ant on ubuntu.Ofbiz uses derby as database by default and connection files are available in your project directory. This issue comes when code not able to connect with database because inaccessibility of connection file.In my case, It is due to file permission. Check if you have file permission to all your files as it solves mine.
cd path/to/your/ofbiz/foldersudo chmod 777 -R your project name
You can change permissions from above according to your need and security.
Maybe late to the game, but for a better experience ask such questions in the user ml of the Apache OFBiz project, see here how to connect to more OFBiz experts: https://ofbiz.apache.org/mailing-lists.html

Could not load the Tomcat server configuration

I have installed apache tomcat7 using sudo apt get in ubuntu. I have added apache tomcat 7 to eclipse using Windows > Preferences > Server > Runtime Environment.But when I'm starting the server from server view by right clicking the shown Tomcat v7.0 Server at localhost [Stopped,Republish]
It says:
Could not load the Tomcat server configuration at /Servers/Tomcat v7.0
Server at localhost-config. The configuration may be corrupt or
incomplete.
The path to tomcat7 that I've provided is /usr/share/tomcat7
I've just been encountering a very similar issue in Ubuntu while trying to get Eclipse Mars and Tomcat7 integrated because Eclipse was expecting the tomcat configuration files etc to be all in the same location, and with the necessary permissions to be able to change those files.
The following instructions from this blog article helped me in the end:
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
I've just solved this exact problem on my Ubuntu 14.04 with Eclipse Mars 2.
This could happen when Eclipse is not finding Tomcat's configuration files where they are expected to be. This place is in
$eclipse_workspace_folder/$version_of_your_tomcat_server_at_localhost/
(by default if you didn't changed server's name). So you have to copy all the files under your $tomcat_installation_folder/conf/* to the workspace server's folder.
But it was easier to just remove the server from your server list and add it again. Eclipse will automatically recreate all these files again into the proper folders. Like in the picture below:
In my case I've downloaded tomcat-8.0.35 from the website, so the configuration files needed are in /opt/apache-tomcat-8.0.35/conf/ filesystem.
Just delete the desired server from the Servers view (Window -> Show View -> Servers) and then go to Window -> Preferences -> Server -> Runtime Environment -> Add and add the server again.
You can install tomcat7 in ~/tomcat7 instead of /usr/share/tomcat7.
Close Eclipse.
Delete org.eclipse.wst.server.core.prefs and org.eclipse.jst.server.tomcat.core.prefs in {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings.
Launch Eclipse.
Go to Window->Show View->Other... and choose the Servers.
Select Tomcat v7.0 Server from the server type and press Next.
Enter /home/user/tomcat7 (not /usr/share/tomcat7) into the "Tomcat installation directory" and press Download.
Wait a few minutes and press Finish.
tomcat7 worked correctly with Eclipse 4.4 on my Ubuntu 15.04 in this way.
I know it's an old question and it has been solved already but for me the Tomcat conf/tomcat-users.xml file was created with a different encoding from the rest of the configuration files. The first line of that file looked like this:
<?xml version='1.0' encoding='cp65001'?>
All I had to do to solve the issue was change that line for:
<?xml version="1.0" encoding="UTF-8"?>
And voila.
I have no idea what 'cp65001' means or why it was created like that.
Maybe this will help other users facing the same issue.
The application is trying to load /usr/share/tomcat7/conf/ which doesn't exist. Eclipse assumes conf is in the same directory as bin
In Ubuntu, conf is placed in /etc/tomcat7/ and there is a symbolic link in /var/lib/tomcat7/.
To solve this, you can either
Download package from Apache Tomcat, and place them in a specific directory, say /opt/ or
Create a symbolic link in /usr/share/tomcat7/ pointing to /etc/tomcat7/conf
A quick solution in eclipse to resolve when Tomcat could not load as per the following error:
Just refresh the Tomcat folder should do the trick. If it still does not work, delete all files in eclipse under the Tomcat folder, re-copy the server files then refresh the Tomcat folder. Tomcat should restart correctly after that.
I have Windows 8.1, Eclipse Neon, Tomcat 8.
The solution is to copy all the files from folder ".../Tomcatxxx/conf" to the ".../Workspace_directory/Servers" and try to launch server again.
You tried to start Tomcat and got the following error:
Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete
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 know it's been a while since this question was posted, but I was just getting this exact error, and I have a really simple solution that MIGHT work for some. All I did was double click on the folder 'Servers', which then allowed me to start the server with no error message. Sometimes the solution is right in front of your eyes. This might work for some people like me who go straight to google without trying fix the issue themselves!
on Centos 7, this will do it, for Tomcat 7 :
(my tomcat install dir: opt/apache-tomcat-7.0.79)
mkdir /var/lib/tomcat7
cd /var/lib/tomcat7
sudo ln -s /opt/apache-tomcat-7.0.79/conf conf
mkdir /var/log/tomcat7
cd /var/log/tomcat7
sudo ln -s /opt/apache-tomcat-7.0.79/logs log
not sure the log link is necessary, the configuration is the critical one.
:
Had the same issue with Kepler (after trying to add a Tomcat 7 server).
Whilst adding the server I opted to install the Tomcat binary using the download/install feature inside Eclipse. I added the server without adding any apps. After the install I tried adding an app and got the error.
I immediately deleted the Tomcat 7 server from Eclipse then repeated the same steps to add Tomcat 7 back in (obviously skipping the download/install step as the binary was downloaded first time around).
After adding Tomcat 7 a second time I tried adding / publishing an app and it worked fine. Didn't bother with any further RCA, it started working and that was good enough for me.
I had the same problem in Eclipse Oxygen with Tomcat 8 in ubuntu 16.04 LTS.
Solution:
1. Give permission to entire tomcat folder (chmod 777 -R /Tomcat)
2. Delete and re-add the server in eclipse
3. Restart eclipse
4. Start the tomcat server. It will work..........
In the Servers tab of eclipse, go to the properties of the server and Switch location to latest downloaded tomcat version.
This resolved the issue for me.
Tomcat Server Properties
I solved this problem. DON'T USE THE .exe
Unistall Tomcat and download the .zip from Tomcat's web site. Then unpack and put it in C:\Program Files. Open Eclipse and set the server. it will work.

apache tomat7 not starting in browser?

Hi i'm using Apache Tomcat 7,with jdk 1.7 in windows 8. and i have installed tomcat successfully in windows 8,now i'm going hit URL in browser like"localhost:8080" it's work fine,after i open eclipse created web-application & i configured tomcat with that web-application,now i try to restart i'm getting error like!!
so for that,i have stopped tomcat in services(task-manger-service).now it will work fine(it get restarted in eclipse and works fine). when i hit URL in browser like"localhost:8080" i' getting error like ! and more i have added java_home,Catalina_home and also path.
can any one help me out it should work in both eclipse & browser?
First do
netstat -a -b -o
and see if ports that are configured in Eclipse Tomcat are free. If they are not free kill that process
taskkill /PID <pid>
Use /F flag if needed. You should get PID fro, netstat command. You should get Eclipse tomcat ports from Server tab of JavaEE perspective
Then start your tomcat.
PS : If you are getting 404 either you are entering incorrect URL or server is not up in the first place. In any case check the logs if you are getting 404.
Follow the below steps
Right click on your eclipse project
Select Refresh
Click the Run icon
It is not straight forward when you invoke Tomcat from within Eclipse. Please read the FAQ section at https://wiki.eclipse.org/WTP_Tomcat_FAQ
It explains how if you start Tomcat from within Eclipse, the binaries of original directories of Tomcat are used, but the web apps etc are stored separately in the Eclipse Workspace.

Apache Ofbiz installation trouble

I have been trying to install Apache Ofbiz on my 32-bit processor computer, with Windows 7 as the operating system. I have downloaded Java\jdk1.8.0_25: and apache-ant-1.9.4: and :apache-ofbiz-13.07.01. I made two environmental variables, JAVA_HOME and ANT_HOME; in addition, I included both Java and Ant Apache Bin addresses respectively into the environmental the PATH variable. Then I ran the CMD and entered the Ofbiz directory' cd [apache ofbiz address], thenceforward, I resumed into entering the the 'ant run-install' command, followed by 'ant run-install-seed', I received a 'build successful' message for both of the commands I entered. After the foregone commands were executed I proceeded into clicking the startofbiz located inside the apache ofbiz folder. A cmd screen opened listing all sorts of commands. Once all these were carried out I typed the following address into my internet search bar:
https://localhost:8443/webtools
Notwithstanding, I constantly received the following error message that says THE TEMPLATE LOCATION IS EMPTY even after a numberless amount of permutations, deleting java, re-installing Ant Apache, etc:
:ERROR MESSAGE:
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)
I have not been able to come to grasps with this issue. I don't believe things should be this difficult to install. I stand ready for any guidance, thank you.
As per my best knowledge " ant load-seed (Load ONLY the seed data (not seed-initial, demo, ext* or anything else); meant for use after an ualong with the code and needs to be in sync for operation)"
You need to fire ant load-demo start (if you're using OFbiz version 13.07.01).Please make your're at the root of the OFbiz project location. Fyi - At very first time it takes more than 20 mins to load all your demo data and seed data, so please be patient. Hope this will help you.
Note: Please rate this if find useful. Thanks
This issue is not related to your Application setup. it seems your Application setup is fine. This is related to Seed data. The data which requires to initialize the default theme. To load the theme data, execute the following ant command then strat the application. The error should be disappeared now.
ant load-seed
Since OFBiz switched from ant to gradle recently, the correct command to load the seed data is as follows (run in root ofbiz folder e.g. /opt/ofbiz and don't forget the quotes):
./gradlew "ofbiz --load-data readers=seed"
To get the available options for the ofbiz build, run:
./gradlew "ofbiz --help"
Other ant-to-gradle hints can be found here.
You will then need to create an initial user (admin/ofbiz does only exist in demo data).
./gradlew loadAdminUserLogin -PuserLoginId=MyUserName

Categories