Trouble starting tomcatv7 via Eclipse Kepler - java

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

Related

tomcat starts but doesnt show up in browser when entering: localhost:8080 or ip:8080 Centos7 vm

so I've manually installed tomcat version 9.0.10 and the newest java JDK.
I've correctly added the manager-gui and admin-gui users. i have went into the server.xml files and found that all the ports were correct.. (connecting to default port 8080) I had to do []# unset CATALINA_HOME or else it wouldn't let me start tomcat so I did and it started but when I went to the browser and typed in the localhost:8080 it didn't show, it only says firefox could not establish connection with server localhost:8080 so I went into logs to see if there were any errors and sure enough there was an error like so: /usr/local/tomcat/apache-tomcat-9.0.10/bin/catalina.sh: line 464: /usr/bin/Java/jdk-10.0.2/bin/bin/java does not exist.. and its probably right why would there be /bin/bin/ like that in a directory.. so i went into the catalina.sh file copied what it had inside into a blank file in documents and went to line 464 (txt editor numbered the lines for me) and what i found was this line at 464: eval $_NOHUP "\"$_RUNJAVA" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS %CATALINA_OPTS\
but I have no idea what to do about it.. i think i might have a path problem or could be a port problem but I don't think so... I've installed apache and it works great in the browser with localhost.. could that affect the tomcat access maybe?
anyway, id really appreciate any help I can get.. I'm very new to this by the way. I'm sorry, I couldn't copy and paste from my virtual machine so I had to type it. im on centos 7.
I think you are looking for tomcat deployment page where you can manage your artifact. If that is correct
First thing you need to check is that whether your installation contains tomcat manager application.
You can verify this by looking in to this path ("apache-tomcat-9.0.10\webapps\manager") If this path is absent you may have to reinstall your tomcat.
Try downloading the zip from the below path and start the server.
If you are trying to deploy your custom application you may have to provide the context path for accessing you application. Also you can verify the deployment by looking in to the above path. For eg: if you are trying to deploy test.war then a folder named test will appear in the webapp folder.
Hope this helps.

Tomcat startup batch issue

Can anyone please explain the below problem.
I'm using tomcat 8 and when I'm trying to start startup.bat file, the command prompt is opening and closing immediately just like blinking. However in the past while I'm working with java programs it worked fine but recently I installed Xampp and there in it again tomcat is downloaded "C:\xampp\tomcat". The same problem comes here in this folder as well, when I try to run startup.bat file. But when I use "XAMPP control panel" to start the Tomcat its able to get start and I'm getting "localhost:8080" start page in the browser.
The connector port for both tomcats are 8080 and I tried with changing the port number in tomcat 8 but no use. There should not be 2 tomcat servers in a single system? If not, why? (I've not installed them, both are in C drive)
I want to work with java servlet programs now.So I need use of tomcat. I've set below environment user varibles:
JAVA_HOME to C:\Program Files\Java\jdk1.8.0_65;
path to C:\Program Files\Java\jdk1.8.0_65\bin;C:\apache-maven-3.3.9\bin
Please suggest the solutions.
Thanks in advance.
I think you should check the tomcat log to find some clues, it is in log folder of your tomcat installation folder. Maybe you have missed some startup variable in start.bat for your new installed things.
BTW, if you want to keep seeing what happened in startup, try to run startup.bat in a command line console, but not double click it through your mouse. It will continue on generating log output in that console.

Tomcat: startup.bat is missing

In many materials about tomcat what I've looked I saw that authors uses exeternal batch script for start and stop tomcat.
I didn't see information about wrting this script. I think this script provided by tomcat.
I used exe file for installing my tomcat 7 on my windows 7. In tomcat directory I search startup.bat. This file is missed.
Can you help me?
It should be in the /bin directory. If you're missing this file possibly it means that you have installed Tomcat using Windows Installer. Try to download appropriate .zip archive, I believe that you will find startup script there.
I was puzzled by this - windows people need to script too!
However I think it is because tomcat gets installed as a service with a manager. If you want to start and stop it without using the manager you start and stop the service directly.
You can do this by typing (in an admin command prompt)
net start tomcat7
and
net stop tomcat7
Though it would be everywhere, still if you download the zip from their site, you can follow these instructions - http://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html
bin\startup.bat is for windows & .sh is for Unix.
Have you checked bin directory under Tomcat instalation dir? It should containt *.bat for start and stop server etc.
If you want to start Tomcat server by using startup.bat and you are unable to find it(that's because installer does not have it, you can only see it if you download and run .zip this will show startup.bat explicitly https://www.screencast.com/t/RMPCq5eJre3),
So to solve the issue just go to C:\Program Files\Apache Software Foundation\Tomcat 7.0_Tomcat7\bin and double click Tomcat.exe, a command prompt like screen will appear this is the the same as clicking startup.bat script. Hope this helps

Starting Glassfish without Sudo

I am currently having a problem starting Glassfish inside Eclipse on OS X. It just hangs whilst trying to start the domain.
I think the problem may lie with the permissions of Glassfish - When I use the 'start-domain domain1' command even in terminal, I must use 'sudo' otherwise I get a 'permissions denied' error. If I use 'sudo', then the server starts successfully from terminal.
I think this error may be carrying over into Eclipse - that is, the server is trying to start but is timing out because Eclipse is not starting the server with the correct permissions etc.
Is there any way to start the server via Eclipse by giving it root permissions? Or another solution, is there any way to change the Glassfish permissions so that it can be started without the 'sudo' command?
Thanks.
You should have installed the glassfish directory in your home folder (it's usually /home/user/ on linux - I haven't used OS X, but I think it's the same). Re-install glassfish and make sure you place it in your home path (it's the recommended path anyway). Then reconfigure eclipse with the path of the new install.
--
Hope it helps

I can't figure out to start glassfish within netbeans

When I click on Run it displays the following error message:
Starting GlassFish v3 Domain
GlassFish v3 Domain start failed.
/Volumes/Private/noname/Sites/projects/java/MyFirstServlet/nbproject/build-impl.xml:602: Deployment error:
GlassFish v3 Domain start failed.
See the server log for details.
BUILD FAILED (total time: 2 minutes 0 seconds)
But then I fire up Terminal in mac and use asadmin start-domain and it starts.
And in netbeans I then Run the project and it fires up Safari and displays the content.
But why can't glassfish start in netbeans? Any idea?
I've met the same problem as I was learning java web programming, but in windows env. I've spent much time guessing what that error could mean because the log file wasn't clearly saying that. Finally I found out that glassfish v3 was trying to run on 8080 port, which was already occupied by reportingservicesservice.exe which is sql server service. I didn't get to know how to switch the port used by glassfish, but I found that in netbeans 6.8 (which I use) in tools->servers I can add a new glassfish server instance which runs on a different, free port - that solved the problem :)
Netbeans IDE X.X --> Tools --> Servers
Add Server --> Choose Server --> GlassFish 3.X
then click (next) browse installation location click (next)
select (register local domain) domain name : domain 2
click on finish button
My problem was with the port 8080, when I type http://localhost:8080, I found that oracle 10g was using it first before I install netbeans 6.8 with glassfish, I deleted oracle database 10g and, wich made the 8080 port free, and now everything is fine, it works.
I just had the same problem, and it happened because of a version mismatch between the local server (Glassfish 4.1) and the remote (Glassfish 4.0).
Only thing that comes to my mind is to check if the JAVA_HOME is properly set. Guess GFv3 requires it to be set to the bin folder in the JDK installation. Just guessing...
Go to following link there i've wrote solution for it...
http://forums.netbeans.org/post-65058.html
I just ran into this same problem with both glassfish and tomcat in netbeans 6.9. My problem and solution were both simple. The problem: tomcat was already running on my machine on port 8080 and therefore netbeans could not create a new instance of either. The solution: shutdown the running instance of tomcat and let netbeans start it up for you. Hope this helps.
You must change the port of glassfish. To do this:
join C:\Program Files\SEMS-v3\glassfish\domains\domain1\config open the file domain.xml
and change the text in 8080 by 9999.
After you do this, enter the remove server netbeans glassfish glassfish addServer then add it so that it can recognize the port changed. Then Started On glassfish server, then run your project.
Here is the link: http://www.srikanthtechnologies.com/blog/java/changeglassfishport.asp
Got the same problem, here are the steps I followed to solve it:
remove the glassfish server under "Services > Servers"
close projet and Netbeans
locate the install directory of Glassfish and go to domains (GlassFish_Server\glassfish\domains).
delete the "domain1" directory
start Netbeans
recreate a Glassfish server
Don't forget to recreate your data sources and connection pools
i have start to learn java recently,i have encountered the same problem too but i found out that when the first time the guidebook ask me to add a server, i put in user and password.
so i give another try to remove the server and add it again without the password.
and it is working.
I faced the same problem and solved by configuring my netbeans config file.
Find NetBeans 8.2\etc\Netbeans.conf file and search for this line :
netbeans_default_options="
Add --locale en to the end before quotes. Eventually this line looks like:
disableMemoryMapping=true --locale en".
Restart Netbeans...

Categories

Resources