File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Tomcat server 6 not starting in eclipse europa Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Tomcat server 6 not starting in eclipse europa" Watch "Tomcat server 6 not starting in eclipse europa" New topic
Author

Tomcat server 6 not starting in eclipse europa

shub mehr
Greenhorn

Joined: Aug 03, 2007
Posts: 4
Hi all,

Im using eclipse europa 3.3 and tomcat 6
on publishing and starting the server from within eclipse
the console says starting but the server says that its starting and and i am not able to deploy the application.
can some one help in this regard

thxs
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13883
    
  10

Is the server not starting, as the title of your topic suggests, or is the problem that you don't know how to deploy your application?

If the server doesn't start properly, then how do you know that? Do you get an error message? What happens if you point your browser to http://localhost:8080 after starting Tomcat?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
shub mehr
Greenhorn

Joined: Aug 03, 2007
Posts: 4
i hope you are understanding my questions..
I have deployed Tomcat 6 on my system..
Integrated Tomcat 6 with Eclipse europa 3.3..
created a server inside eclipse..
TOMCAT working properly outside eclipse..
within eclipse when i start my server the 'server tab'(within eclipse) keeps saying starting...but never says 'STARTED' which it used to say when tomcat 5 was used...
but in the 'console tab'(within eclipse) the tomcat instance does seem to start as it say server starting in 1630 ms...but the 404 error in the eclipse browser..
I hope this made it a bit more clear??
[ December 12, 2007: Message edited by: shub mehr ]
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13883
    
  10

I think that if you see a message like "server started in 1630ms", the server has started normally. It's possible that the messages that Tomcat 6 prints are slightly different than what Tomcat 5.5 prints.

The 404 error means that your page is not found. If you get this, the server has actually started; if the server isn't running, you would get a different error (something like "cannot establish a connection to localhost:8080").

Check if the URL you are typing in into your browser to reach your application is correct.
Russell Bateman
Ranch Hand

Joined: Feb 26, 2008
Posts: 69
I have a problem very nearly the same. Tomcat works outside of Eclipse just fine. I'm running Tomcat 6.0 on SuSE Linux 10.2 and Eclipse 3.3. When I ask the server to start (Server window, right-click, Start) I get:

Publishing to Tomcat v6.0 Server at localhost (Time of error...)
Reason:
Check the details

In details you see:
Publishing failed
Could not load the Tomcat server configuration at /Servers/Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete.
(four times)

I've looked all over www.eclipse.org at tutorials and the like. The closest one I find that says anything about this is http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html ,
but that tutorial is written for Eclipse 3.1 and some of it isn't identical to 3.3. In any case, it doesn't assume your server start will fail nor give contingency plans.

I have Googled all over too.

Can anyone help me through this? My user is a member of the tomcat group; I made conf/catalina.policy executable, so you see I have worked through a few problems keeping me from getting where I am at present.
[ March 01, 2008: Message edited by: Russell Bateman ]
Russell Bateman
Ranch Hand

Joined: Feb 26, 2008
Posts: 69
Well, here's the answer, I think. I'm brand new at this, so it may prove to be another false road.

Even though I tried shutting down Tomcat before starting it from Eclipse; even though I am a member of the tomcat group; it simply will not work to attempt to use /usr/share/tomcat as my server.

What has worked (gotten me about as far as the original postee of this thread) is to copy the Tomcat 6 tarball to /home/russ (my home directory), blow it open, create a link "tomcat" to ./apache-tomcat-6.0.16. Then, I deleted the original Tomcat 6.0 server I had created according to my tutorial and re-created a Tomcat 6.0 server pointing to the local one.

That gave me a new set of errors similar to another post in another thread in this topic though not identical. I ended up finding out that, despite importing Eclipse preferences, I was still getting Java 5 instead of 6 as my JRE, so I had to go to Windows->Preferences->Java->Installed JREs->Add JRE and navigate to /usr/lib/jvm/jdk1.6.0_04/jre and add then check that JRE.

Then I started the server (in Server window at bottom of IDE, right-click, Start) and it worked. As I was blocked in the tutorial I'm following (noted in my earlier response/question), I don't know what's next, but I think I'm past this problem (saints be praised).

Thanks. I hope this response can help some other poor schmuck like me. Best regards.
neil walker
Greenhorn

Joined: Jan 24, 2008
Posts: 19
Hello,
When you create a tomcat server in eclipse it is creating and running it's own version of tomcat (if you leave the defaults of the server) that serves only the projects you've added to it, not the one you might already have running.

Hence why you see tomcat as running outside of eclipse but not starting properly inside eclipse.

As for why it isn't working, it could be many reason. One possibility is because your TomCat is running already, eclipse can't start because port 8080 is arealy being used. It could also be something in the web.xml file, etc.

I think the documentation is very, very poor as I would really like to publish to another folder (e.g. my tomcat webapps folder) and get eclipse to use my running version of tomcat rather than running another instance but half the server options are disabled...
[ March 05, 2008: Message edited by: neil walker ]
chris marx
Greenhorn

Joined: Mar 17, 2008
Posts: 1
i had the same problem trying to get an instance of tomcat in rational application developer 7.0 - and the trick was the same. switch up the default jre from the websphere jre to your installed jre-
Pilar Bravo
Greenhorn

Joined: Apr 09, 2008
Posts: 1
I had a similar problem with Eclipse Europa and Tomcat 5.5. The solution is very simple: just double click in the Tomcat server (in the Servers tab) and look at the server configuration. In the "Server locations" section, the correct option is "Use Tomcat installation".

That worked for me.
Binod Suman
Greenhorn

Joined: May 07, 2008
Posts: 17
Hi Pilar,

Really very good and to the point solution. I have also solved the same problem with using your given solution.

Thanks

Binod Suman
Debbie Waltz
Greenhorn

Joined: May 12, 2008
Posts: 13
Same problem here, but i simply cannot enable the option "Use Tomcat installation" cause it is grayed out (all the option in that panel are).
Any hint?
thanks in adavance
Debbie Waltz
Greenhorn

Joined: May 12, 2008
Posts: 13
Found it by miself, as it is stated in the panel

"Server must be published with no modules present to make changes."

...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"dwaltz",
Please check your private messages regarding an important administrative matter.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Arvind singh pal
Greenhorn

Joined: Sep 29, 2008
Posts: 4
Originally posted by shub mehr:
Hi all,

Im using eclipse europa 3.3 and tomcat 6
on publishing and starting the server from within eclipse
the console says starting but the server says that its starting and and i am not able to deploy the application.
can some one help in this regard

thxs


I was facing same problem "i configured tomcat in eclipse Europe 3.3 by using new server and when i started the server its started but status was synchronized and error was 404." yesterday i resolved the problem as-
right click on server and select "open" it will display "overview" window which contain server location section by default server location is "Meta data .....Something" you click on "use installed tomcat server" and then start server it will ask want to save server location� click on yes now server will work"

Try this I got solution on same way
[ October 22, 2008: Message edited by: Arvind singh pal ]
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2713
    
    5

Welcome to Javaranch chris marx ,Pilar Bravo, Debbie Waltz and Arvind singh pal ,

Does not look like a Tomcat question to me, moving....


SCJP, SCWCD.
|Asking Good Questions|
Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

Originally posted by dwaltz:
Same problem here, but i simply cannot enable the option "Use Tomcat installation" cause it is grayed out (all the option in that panel are).
Any hint?
thanks in adavance


Can you tell me all how did you all enable the option "Use Tomcat installation" cause it is grayed out.


Please help me...I'm also facing similar issue.

for further details see my post

Tomcat Server V 5.5 Error

--
Deepak Lal


When The Going Gets Tougher,The Tougher gets Going
Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

Originally posted by Deepak Lal:


Can you tell me all how did you all enable the option "Use Tomcat installation" cause it is grayed out.


Please help me...I'm also facing similar issue.

for further details see my post

Tomcat Server V 5.5 Error

--
Deepak Lal


Please help me to resolve this error.

Help provided will be highly appreciated.
Nikhil Lanjewar
Greenhorn

Joined: Jan 21, 2009
Posts: 15
Hi there,
I have been facing the same problem and my tomcat has not budged yet. All I can understand from this entire discussion is that enabling "Use Tomcat Installation" would solve the problem. But however, as D.Waltz said, the option is grayed out (disabled). The description string that says.. Specify the server path (i.e. catalina.base) and deploy path. Server must be published with no modules present to make changes. is yet to be understood by me.
Can anyone please throw some light upon how exactly should those Server Options be enabled in Eclipse?
Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

Hi Nikhil Lanjewar and Ranchers,
Even i have been trying it out,but there seems no soution,i m tired of re installing Tomcat Server and Eclipse IDE.I really dont know where the problem lies.

Please help us out..

Help provided will be highly appreciated.

--
Deepak Lal
Nikhil Lanjewar
Greenhorn

Joined: Jan 21, 2009
Posts: 15
Yeah... I'm not able to debug my tomcat web services from eclipse due to this problem. Any inputs would really help us on it.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Nikhil Lanjewar wrote:"Use Tomcat Installation" would solve the problem. But however, as D.Waltz said, the option is grayed out (disabled).
Did you read the leading text of the options anyway?

It should state something like as: "To change the option, the server should have no modules deployed and it should be published".

Pretty clear enough. Stop the server, remove all deployed projects and republish the server.
Nikhil Lanjewar
Greenhorn

Joined: Jan 21, 2009
Posts: 15
Hi Bauke,

Thanks for pointing out quickly.

Bauke Scholtz wrote:Did you read the leading text of the options anyway?

It should state something like as: "To change the option, the server should have no modules deployed and it should be published".

Pretty clear enough. Stop the server, remove all deployed projects and republish the server.


This is exactly what I've been up to, but to no avail. I'm pretty new to Web service development and it might sound dumb of me to ask. I just could not interpret the meaning of "Server should have no modules present to make changes". I have removed all the packages from my tomcat/webapps directory including the manager. Restarted the server but the problem persists. Could you please tell me the exact procedure in Lehman terms? Also, I'd like to know what exactly do you mean by "Publishing the server"? Sorry about the seemingly dumb questions but I'd be grateful if you could provide the answers.
Nikhil Lanjewar
Greenhorn

Joined: Jan 21, 2009
Posts: 15
Okay, I finally got my tomcat running from within eclipse. Thanks a million to Bauke for pointing my mistake. Cheers!
All I did was, remove the existing server, remove all the deployed packages from my webapps directory and then add a new server. It enabled the option and I set the custom locations for Server and Deploy to my installed tomcat directory and its webapps folder respectively. Now whenever I Run my project on server, it successfully launches the project without throwing any exceptions and I'm also able to use the application from any browser (Internal/External). Thanks a lot for all your help!! Its such a relief.

But there's a problem that I'm facing after configuring my server successfully. I wanted to run my web service from Tomcat's local directory just because I wanted to debug my project in Eclipse itself. Although I run my project in Debug mode, it doesn't halt at the specified breakpoints. Can anyone point out what might be wrong in my procedure?
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Nikhil Lanjewar wrote:Restarted the server but the problem persists.

No. You should not restart the server. You should publish the server. Rightclick the server entry and choose publish. That´s all.

Removing and adding the server is another way to get a server published without modules, yes. But that´s a bit desastreus. You need to configure all server settings again.
Nikhil Lanjewar
Greenhorn

Joined: Jan 21, 2009
Posts: 15
Unfortunately, clicking on Publish or for that matter, even Republish did not fetch the desired results. But I'm glad that the Web service is being deployed in my tomcat directory now.
How can I get the debugging mode active now? I can't even see any System.out.println outputs in my console View now.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Switch to debug perspective.
Guru kulkarni
Greenhorn

Joined: May 05, 2010
Posts: 1
just go to server.xml and you will find two context tags at the end. Delete one tag and save the file and run it.
Cheers, Happy Coding..
'
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat server 6 not starting in eclipse europa
 
Similar Threads
plugin problem
Apache TOMCAT 6 : Migration from 5/5.5
JBoss Time Out Error in Eclipse
Struts 2 -Eclipse
How to configure jboss into eclipse