Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Eclipse - cannot create tomcat server

Reply
Thread Tools

Eclipse - cannot create tomcat server

 
 
Laura Schmidt
Guest
Posts: n/a
 
      10-27-2012
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
 
Reply With Quote
 
 
 
 
Arne Vajh°j
Guest
Posts: n/a
 
      10-27-2012
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



 
Reply With Quote
 
 
 
 
Laura Schmidt
Guest
Posts: n/a
 
      10-27-2012
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
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      10-27-2012
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


 
Reply With Quote
 
Arved Sandstrom
Guest
Posts: n/a
 
      10-27-2012
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
 
Reply With Quote
 
Laura Schmidt
Guest
Posts: n/a
 
      10-27-2012
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
 
Reply With Quote
 
Arved Sandstrom
Guest
Posts: n/a
 
      10-28-2012
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...se-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
 
Reply With Quote
 
Laura Schmidt
Guest
Posts: n/a
 
      10-31-2012
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
 
Reply With Quote
 
markspace
Guest
Posts: n/a
 
      10-31-2012
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.



 
Reply With Quote
 
Laura Schmidt
Guest
Posts: n/a
 
      11-05-2012
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Tomcat in Eclipse cannot load /manager/html(SecurityException) Arancaytar Java 1 03-06-2008 01:39 PM
tomcat server error in eclipse-jee-europa david_marsetty Java 0 01-29-2008 05:13 AM
Eclipse 3.3 - org.eclipse.ui.IContributorResourceAdapter cannot beresolved Rob.Best@gmail.com Java 0 01-18-2008 05:52 PM
Eclipse/Lomboz/JBoss: Cannot Start JBoss (Debug) Server from Eclipse Using Lomboz Plugin Jubz Java 0 05-30-2006 10:24 PM
Cannot create PoolableConnectionFactory to mysql by JSP on tomcat Mullin Java 0 04-01-2005 06:30 AM



Advertisments