Eclipse - cannot create tomcat server

L

Laura Schmidt

Hello,

I had a working configuration with eclipse (Juno) and tomcat 6. Then, I
wanted to switch to tomcat 7 and modified my configuration. Now, I have
no working tomcat server within eclipse.

There are two tomcat installations under /opt:

drwxr-xr-x 9 root root 4096 Oct 2 05:45 apache-tomcat-6.0.29
drwxr-xr-x 9 root root 4096 Oct 2 05:43 apache-tomcat-7.0.30

I always used the tomcat 6 installation without problems.

Within eclipse, I am able to define a runtime configuration for both
tomcat installations:

Window -> Preferences -> Server -> Runtime Configurations

For example, I can define a new runtime configuration like this:

Name: "Apache Tomcat v6.0"
Directory: /opt/apache-tomcat-6.0.29

(Same vor tomcat 7).

So far, so good. But when I try to define a server, I run into problems:

File -> New -> Other -> Server -> Server

I can choose the server type, e. g.:

Tomcat v6.0 Server or
Tomcat v7.0 Server

The server's host name is preset to "localhost".
The server's name is empty and I cannot edit it (disabled).

The "Next" and "Finish" buttons are disabled.

So I cannot define a new tomcat server.

Remember: I had a working configuration, where I could run my dynamic
web projects with "Run -> Run on Server", and the only thing I did was
to remove the tomcat 6 server.

What is the problem here?

I would be glad if some experts could help me.

Thank you a lot!
Laura
 
A

Arne Vajhøj

I had a working configuration with eclipse (Juno) and tomcat 6. Then, I
wanted to switch to tomcat 7 and modified my configuration. Now, I have
no working tomcat server within eclipse.

There are two tomcat installations under /opt:

drwxr-xr-x 9 root root 4096 Oct 2 05:45 apache-tomcat-6.0.29
drwxr-xr-x 9 root root 4096 Oct 2 05:43 apache-tomcat-7.0.30

I always used the tomcat 6 installation without problems.

Within eclipse, I am able to define a runtime configuration for both
tomcat installations:

Window -> Preferences -> Server -> Runtime Configurations

For example, I can define a new runtime configuration like this:

Name: "Apache Tomcat v6.0"
Directory: /opt/apache-tomcat-6.0.29

(Same vor tomcat 7).

So far, so good. But when I try to define a server, I run into problems:

File -> New -> Other -> Server -> Server

I can choose the server type, e. g.:

Tomcat v6.0 Server or
Tomcat v7.0 Server

The server's host name is preset to "localhost".
The server's name is empty and I cannot edit it (disabled).

The "Next" and "Finish" buttons are disabled.

So I cannot define a new tomcat server.

Remember: I had a working configuration, where I could run my dynamic
web projects with "Run -> Run on Server", and the only thing I did was
to remove the tomcat 6 server.

What is the problem here?

I would be glad if some experts could help me.

Not an answer to your question.

But have you considered whether you really need that integration?

I always run Eclipse and Tomcat completely separate and then
use ant to build and deploy to Tomcat.

Ant is integrated fine in Eclipse. And I like the
separation.

Arne
 
L

Laura Schmidt

On 10/27/2012 11:39 AM, Laura Schmidt wrote:
Not an answer to your question.

But have you considered whether you really need that integration?

I always run Eclipse and Tomcat completely separate and then
use ant to build and deploy to Tomcat.

Ant is integrated fine in Eclipse. And I like the
separation.

Hello Arne,

I am used to test my site with "Run -> Run on Server" locally, before
deploying it with ant.

Without a local server one would have to use the deployment server for
testing.

Laura
 
A

Arne Vajhøj

Hello Arne,

I am used to test my site with "Run -> Run on Server" locally, before
deploying it with ant.

Without a local server one would have to use the deployment server for
testing.

You can deploy to a local test Tomcat on your PC with ant.

Arne
 
A

Arved Sandstrom

Hello,

I had a working configuration with eclipse (Juno) and tomcat 6. Then, I
wanted to switch to tomcat 7 and modified my configuration. Now, I have
no working tomcat server within eclipse.

There are two tomcat installations under /opt:

drwxr-xr-x 9 root root 4096 Oct 2 05:45 apache-tomcat-6.0.29
drwxr-xr-x 9 root root 4096 Oct 2 05:43 apache-tomcat-7.0.30

I always used the tomcat 6 installation without problems.

Within eclipse, I am able to define a runtime configuration for both
tomcat installations:

Window -> Preferences -> Server -> Runtime Configurations

For example, I can define a new runtime configuration like this:

Name: "Apache Tomcat v6.0"
Directory: /opt/apache-tomcat-6.0.29

(Same vor tomcat 7).

So far, so good. But when I try to define a server, I run into problems:

File -> New -> Other -> Server -> Server

I can choose the server type, e. g.:

Tomcat v6.0 Server or
Tomcat v7.0 Server

The server's host name is preset to "localhost".
The server's name is empty and I cannot edit it (disabled).

The "Next" and "Finish" buttons are disabled.

So I cannot define a new tomcat server.

Remember: I had a working configuration, where I could run my dynamic
web projects with "Run -> Run on Server", and the only thing I did was
to remove the tomcat 6 server.

What is the problem here?

I would be glad if some experts could help me.

Thank you a lot!
Laura

I don't know exactly what the problem is, but Eclipse (any version) is
buggy just like any other piece of software. Anyone who has done dozens
or hundreds of server definitions in Eclipse has eventually seen all
sorts of problems.

Yet, with the exception of completely unsupported servers/versions, if
it's on the list of server adapters you can make it work - ultimately.
And any combinations thereof.

I had a pristine Eclipse Juno on my new OpenSUSE setup so I just now
installed Tomcat 7 on JDK 7, and then Tomcat 6 on JDK 6. I did
everything from the Windows->Preferences->Server->Runtime Environments
menu, including checking "Create a new local server" so that I didn't
have to do it under the Servers tab later.

This was just to remind myself of the steps in a successful
configuration of 2 versions of Tomcat.

My feeling is that you may have to take things back to a clean slate.
Download and unzip a new Eclipse Juno if you have to, it's not painful
these days.

One related note on Eclipse server configurations: I've never had a good
time with the default Server overview setting of "Use workspace
metadata" for Server Locations.

A note regarding deployment options: don't forget that you always have
IDE options to export work as WAR's, JAR's or EAR's. I often do Tomcat
or other Java app server app deployments through their management
consoles, using a WAR or EAR. Sometimes this is the only way I can do
it, actually. But it's never a bad way to do it, because in production
that's how operations staff will often deploy new builds.

AHS
 
L

Laura Schmidt

On 10/27/2012 12:39 PM, Laura Schmidt wrote:
Yet, with the exception of completely unsupported servers/versions, if
it's on the list of server adapters you can make it work - ultimately.
And any combinations thereof.

Well, it worked out of the box when I created it. There was nothing
special about it.
My feeling is that you may have to take things back to a clean slate.
Download and unzip a new Eclipse Juno if you have to, it's not painful
these days.

After of your posting, I reinstalled eclipse, but without effects. When
I then first started eclipse, I found an old Tomcat 6 runtime
definition. So I assume that all this stuff must be stored within the
workspace.

So creating a new workspace would be another idea. But I don't want to
make all the editor settings again (and I don't know how to
export/import them).

Another point is: I am able to successfully create a new tomcat server
when I install eclipse as root. #-)
A note regarding deployment options: don't forget that you always have
IDE options to export work as WAR's, JAR's or EAR's.

Yes, this is what I do when I deploy things onto the productive server.
But for a quick test I always used "Run -> Run on server".

Laura
 
A

Arved Sandstrom

Well, it worked out of the box when I created it. There was nothing
special about it.

No, there wouldn't have been. But with an application as complicated as
Eclipse there have got to be a whole bunch of buggy execution paths. And
sooner or later the complicated state machine that backs up the GUI will
get out of whack...which is why you had buttons that showed up disabled
when they ought to have been enabled.

If IDE restarts or trying different means to the same end don't work,
then cleaning ferociously is sometimes the only option.

I tend to avoid using Eclipse (or NB) for certain things, like
complicated version control tasks, some SOAP web services tasks, WAR/EAR
deployment etc. Too many problems over the years. YMMV.
After of your posting, I reinstalled eclipse, but without effects. When
I then first started eclipse, I found an old Tomcat 6 runtime
definition. So I assume that all this stuff must be stored within the
workspace.

So creating a new workspace would be another idea. But I don't want to
make all the editor settings again (and I don't know how to
export/import them).

I tend to use the vanilla settings myself (with the exception of a
handful of settings like "show line numbers" that are trivial). I'm
aware though of the generalities if Eclipse settings export/import.

If you look at IDE options under Preferences, e.g. Java->Code Style
options, you'll see that a number of option groups have import/export
capability.

Also, while this is dated
(http://eclipse.dzone.com/news/create-new-eclipse-workspace-w) I suspect
that experimentation along the lines of the article will work for Indigo
or Juno also. This is probably more what you want.
Another point is: I am able to successfully create a new tomcat server
when I install eclipse as root. #-)


Yes, this is what I do when I deploy things onto the productive server.
But for a quick test I always used "Run -> Run on server".

Laura

I agree that for Tomcat in particular this is nice to be able to do.

AHS
 
L

Laura Schmidt

Hi,

maybe it helps someone. This is the solution:

chmod -R o+r /opt/apache-tomcat-7.0.30

(It would have saved me many hours if eclipse prompted a comprehensive
error message.)

Laura
 
M

markspace

Hi,

maybe it helps someone. This is the solution:

chmod -R o+r /opt/apache-tomcat-7.0.30

(It would have saved me many hours if eclipse prompted a comprehensive
error message.)


Curious: how did you determine this might be the problem?

I agree that error messages could often be better, but I'm interested
what tipped you off that the issue was user permissions.
 
L

Laura Schmidt

Curious: how did you determine this might be the problem?
I agree that error messages could often be better, but I'm interested
what tipped you off that the issue was user permissions.

I found that creating a tomcat server worked fine when eclipse was
started as root. And the only relevant difference is that root has full
access to the tomcat folder and files.

Laura
 
L

Laura Schmidt

For your solution I'm not clear you won't run into new problems
by having Tomcat located in /opt but it might be fine.

What do you think could be problems resulting from the location of tomcat?

Laura
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top