Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19535 > unrolled thread

Eclipse - cannot create tomcat server

Started byLaura Schmidt <ls@mailinator.com>
First post2012-10-27 17:39 +0200
Last post2012-11-07 00:21 -0600
Articles 13 — 5 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Eclipse - cannot create tomcat server Laura Schmidt <ls@mailinator.com> - 2012-10-27 17:39 +0200
    Re: Eclipse - cannot create tomcat server Arne Vajhøj <arne@vajhoej.dk> - 2012-10-27 11:49 -0400
      Re: Eclipse - cannot create tomcat server Laura Schmidt <ls@mailinator.com> - 2012-10-27 19:20 +0200
        Re: Eclipse - cannot create tomcat server Arne Vajhøj <arne@vajhoej.dk> - 2012-10-27 14:07 -0400
    Re: Eclipse - cannot create tomcat server Arved Sandstrom <asandstrom2@eastlink.ca> - 2012-10-27 18:10 -0300
      Re: Eclipse - cannot create tomcat server Laura Schmidt <ls@mailinator.com> - 2012-10-28 00:20 +0200
        Re: Eclipse - cannot create tomcat server Arved Sandstrom <asandstrom2@eastlink.ca> - 2012-10-28 10:27 -0300
    SOLVED: Eclipse - cannot create tomcat server Laura Schmidt <ls@mailinator.com> - 2012-10-31 19:00 +0100
      Re: SOLVED: Eclipse - cannot create tomcat server markspace <-@.> - 2012-10-31 11:18 -0700
        Re: SOLVED: Eclipse - cannot create tomcat server Laura Schmidt <ls@mailinator.com> - 2012-11-05 07:04 +0100
      Re: SOLVED: Eclipse - cannot create tomcat server jebblue <n@n.nnn> - 2012-11-03 11:20 -0500
        Re: SOLVED: Eclipse - cannot create tomcat server Laura Schmidt <ls@mailinator.com> - 2012-11-05 07:12 +0100
          Re: SOLVED: Eclipse - cannot create tomcat server jebblue <n@n.nnn> - 2012-11-07 00:21 -0600

#19535 — Eclipse - cannot create tomcat server

FromLaura Schmidt <ls@mailinator.com>
Date2012-10-27 17:39 +0200
SubjectEclipse - cannot create tomcat server
Message-ID<k6gv95$2sc$1@news.m-online.net>
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

[toc] | [next] | [standalone]


#19537

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-10-27 11:49 -0400
Message-ID<508c0292$0$289$14726298@news.sunsite.dk>
In reply to#19535
On 10/27/2012 11:39 AM, Laura Schmidt wrote:
> 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


[toc] | [prev] | [next] | [standalone]


#19539

FromLaura Schmidt <ls@mailinator.com>
Date2012-10-27 19:20 +0200
Message-ID<k6h56t$f4t$1@news.m-online.net>
In reply to#19537
On 10/27/2012 05:49 PM, Arne Vajhøj wrote:
> 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

[toc] | [prev] | [next] | [standalone]


#19540

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-10-27 14:07 -0400
Message-ID<508c22f3$0$291$14726298@news.sunsite.dk>
In reply to#19539
On 10/27/2012 1:20 PM, Laura Schmidt wrote:
> On 10/27/2012 05:49 PM, Arne Vajhøj wrote:
>> 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.

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

Arne

[toc] | [prev] | [next] | [standalone]


#19543

FromArved Sandstrom <asandstrom2@eastlink.ca>
Date2012-10-27 18:10 -0300
Message-ID<u5Yis.1267$sz4.486@newsfe11.iad>
In reply to#19535
On 10/27/2012 12:39 PM, Laura Schmidt wrote:
> 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

[toc] | [prev] | [next] | [standalone]


#19544

FromLaura Schmidt <ls@mailinator.com>
Date2012-10-28 00:20 +0200
Message-ID<k6hmp3$grb$1@news.m-online.net>
In reply to#19543
On 10/27/2012 11:10 PM, Arved Sandstrom wrote:
> 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

[toc] | [prev] | [next] | [standalone]


#19546

FromArved Sandstrom <asandstrom2@eastlink.ca>
Date2012-10-28 10:27 -0300
Message-ID<apajs.14747$MP7.2056@newsfe05.iad>
In reply to#19544
On 10/27/2012 07:20 PM, Laura Schmidt wrote:
> On 10/27/2012 11:10 PM, Arved Sandstrom wrote:
>> 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.

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.

>> 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).

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. #-)
>
>> 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

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

AHS

[toc] | [prev] | [next] | [standalone]


#19574 — SOLVED: Eclipse - cannot create tomcat server

FromLaura Schmidt <ls@mailinator.com>
Date2012-10-31 19:00 +0100
SubjectSOLVED: Eclipse - cannot create tomcat server
Message-ID<k6rp2k$7dv$1@news.m-online.net>
In reply to#19535
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

[toc] | [prev] | [next] | [standalone]


#19575 — Re: SOLVED: Eclipse - cannot create tomcat server

Frommarkspace <-@.>
Date2012-10-31 11:18 -0700
SubjectRe: SOLVED: Eclipse - cannot create tomcat server
Message-ID<k6rq0r$mqq$1@dont-email.me>
In reply to#19574
On 10/31/2012 11:00 AM, Laura Schmidt wrote:
> 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.


[toc] | [prev] | [next] | [standalone]


#19632 — Re: SOLVED: Eclipse - cannot create tomcat server

FromLaura Schmidt <ls@mailinator.com>
Date2012-11-05 07:04 +0100
SubjectRe: SOLVED: Eclipse - cannot create tomcat server
Message-ID<k77l2d$nas$1@news.albasani.net>
In reply to#19575
On 10/31/2012 07:18 PM, markspace wrote:

> 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

[toc] | [prev] | [next] | [standalone]


#19606 — Re: SOLVED: Eclipse - cannot create tomcat server

Fromjebblue <n@n.nnn>
Date2012-11-03 11:20 -0500
SubjectRe: SOLVED: Eclipse - cannot create tomcat server
Message-ID<gOadnc7bFqCp2QjNnZ2dnUVZ_qGdnZ2d@giganews.com>
In reply to#19574
On Wed, 31 Oct 2012 19:00:00 +0100, Laura Schmidt wrote:

> 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

If you checked the Eclipse log at <workspacename>/.metadata/.log
it might have provided more information but there should have
been an error showing in Eclipse, I agree.

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.

[toc] | [prev] | [next] | [standalone]


#19633 — Re: SOLVED: Eclipse - cannot create tomcat server

FromLaura Schmidt <ls@mailinator.com>
Date2012-11-05 07:12 +0100
SubjectRe: SOLVED: Eclipse - cannot create tomcat server
Message-ID<k77lgl$g95$1@news.albasani.net>
In reply to#19606
On 11/03/2012 05:20 PM, jebblue wrote:
> On Wed, 31 Oct 2012 19:00:00 +0100, Laura Schmidt wrote:

> 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

[toc] | [prev] | [next] | [standalone]


#19643 — Re: SOLVED: Eclipse - cannot create tomcat server

Fromjebblue <n@n.nnn>
Date2012-11-07 00:21 -0600
SubjectRe: SOLVED: Eclipse - cannot create tomcat server
Message-ID<eo6dnZqbZolQYATNnZ2dnUVZ_qidnZ2d@giganews.com>
In reply to#19633
On Mon, 05 Nov 2012 07:12:32 +0100, Laura Schmidt wrote:

> On 11/03/2012 05:20 PM, jebblue wrote:
>> On Wed, 31 Oct 2012 19:00:00 +0100, Laura Schmidt wrote:
> 
>> 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

Permissions related would be the main thing. If it's working
for you then no worries. Here's a good site that outlines
ways of running under /opt, you must have already done these
things:

http://linux-sxs.org/internet_serving/c140.html

I hope I didn't come across negative it's just that I've
run into issues running apps in /opt and that caught my eye.
The problems if you should hit any are clearly solvable.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web