Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Can't get Tomcat started correctly
Can't get Tomcat started correctly [message #183709] Tue, 05 December 2006 18:22 Go to next message
Alan Chandler is currently offline Alan ChandlerFriend
Messages: 45
Registered: July 2009
Member
For some time I have been using Eclipse and WebTools to create a number
of Tapestry applications. Up to about a month ago I could run these
applications on Tomcat 5.0 server managed by eclipse. CATALINA_HOME
was set to /opt/jakarta-tomcat-5.0.30 and CATALINA_BASE in
the .metadata area inside my Eclipse workspace
(in other words the

For the past month, I have been (not :-) ) making a change to one of the
applications, and thinking about an upgrade to Tomcat 5.5.

Today, I have just come back to try and run the revised application
under 5.5 - my other applications I haven't touched.

In order to prevent any permissions problems, I downloaded the binary
version (5.5.20) of Tomcat for Linux from the Apache web site and
installed it in /opt/apache-tomcat-5.5.20. I copied all the .jar files
I had in the old 5.0.30 configuration under the shared/lib directory
into the same in in 5.5, and the postgresql jdbc driver from the
common/lib directory across as well.

Now I try and get something running on either version of tomcat its
failing.

On 5.0 there is a log file which shows
that "org.apache.tapestry.RedirectFilter" class is not found on any of
the applications as they start up. Since that is the class that
effectively acts as the gateway to the application, nothing is running
Given that the tapestry jar is in shared/lib directory, and I can look
inside this and find the appropriate class I assume this is some form
of classpath problem.


On 5.5 - where I have only "added" my revised application (called
usermgr) to the configuration, I have no log file at all. When I look
in the webapps directory in the .metadata/......../tmp1 directory the
application MINUS its WEB-INF directory are there, but that isn't.

In this case - I can't see any particular reason why this this directory
inside WebContent, but all the others made it across.

Can any one give me ANY clues as to where I should look to solve this
Re: Can't get Tomcat started correctly [message #183715 is a reply to message #183709] Tue, 05 December 2006 18:47 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
In Tomcat 5.0 and 5.5, "shared/lib" is relative to CATALINA_BASE, i.e.
the one under ".metadata/...". Based on your description, the
webapps shouldn't have worked with the jars in the installation's
"shared/lib". You can import the catalina.properties file into the
server's subfolder of the Servers project in your workspace and make
changes to the "shared.loader", if desired.

I don't know why the WEB-INF directory wouldn't be present.

Cheers,
Larry

Alan Chandler wrote:
> For some time I have been using Eclipse and WebTools to create a number
> of Tapestry applications. Up to about a month ago I could run these
> applications on Tomcat 5.0 server managed by eclipse. CATALINA_HOME
> was set to /opt/jakarta-tomcat-5.0.30 and CATALINA_BASE in
> the .metadata area inside my Eclipse workspace
> (in other words the
>
> For the past month, I have been (not :-) ) making a change to one of the
> applications, and thinking about an upgrade to Tomcat 5.5.
>
> Today, I have just come back to try and run the revised application
> under 5.5 - my other applications I haven't touched.
>
> In order to prevent any permissions problems, I downloaded the binary
> version (5.5.20) of Tomcat for Linux from the Apache web site and
> installed it in /opt/apache-tomcat-5.5.20. I copied all the .jar files
> I had in the old 5.0.30 configuration under the shared/lib directory
> into the same in in 5.5, and the postgresql jdbc driver from the
> common/lib directory across as well.
>
> Now I try and get something running on either version of tomcat its
> failing.
>
> On 5.0 there is a log file which shows
> that "org.apache.tapestry.RedirectFilter" class is not found on any of
> the applications as they start up. Since that is the class that
> effectively acts as the gateway to the application, nothing is running
> Given that the tapestry jar is in shared/lib directory, and I can look
> inside this and find the appropriate class I assume this is some form
> of classpath problem.
>
>
> On 5.5 - where I have only "added" my revised application (called
> usermgr) to the configuration, I have no log file at all. When I look
> in the webapps directory in the .metadata/......../tmp1 directory the
> application MINUS its WEB-INF directory are there, but that isn't.
>
> In this case - I can't see any particular reason why this this directory
> inside WebContent, but all the others made it across.
>
> Can any one give me ANY clues as to where I should look to solve this
Re: Can't get Tomcat started correctly [message #183722 is a reply to message #183715] Tue, 05 December 2006 19:31 Go to previous messageGo to next message
Alan Chandler is currently offline Alan ChandlerFriend
Messages: 45
Registered: July 2009
Member
Larry Isaacs wrote:

> In Tomcat 5.0 and 5.5, "shared/lib" is relative to CATALINA_BASE, i.e.
> the one under ".metadata/...". Based on your description, the
> webapps shouldn't have worked with the jars in the installation's
> "shared/lib". You can import the catalina.properties file into the
> server's subfolder of the Servers project in your workspace and make
> changes to the "shared.loader", if desired.

Actually now you mention it - I did manually copy a load of stuff into
there. I'll take a look at it

>
> I don't know why the WEB-INF directory wouldn't be present.

Where can you specify in a project that the WebContent folder is the one
to use for Web Content. I have been using "git" for version control,
and when I am on the module test branch I completely remove that folder
(and change other parameters related to how to access the database) so
I am wondering if something in my project settings are screwed.
Re: Can't get Tomcat started correctly [message #183734 is a reply to message #183722] Tue, 05 December 2006 21:16 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
The web content becomes part of the project's module due to a line like:

<wb-resource deploy-path="/" source-path="/WebContent"/>

in the ".setttings/org.eclipse.wst.common.component" file (called
".component" in WTP 1.0.x). If this is missing, that would explain why
there was no WEB-INF.

Cheers,
Larry

Alan Chandler wrote:
> Larry Isaacs wrote:
>
>> In Tomcat 5.0 and 5.5, "shared/lib" is relative to CATALINA_BASE, i.e.
>> the one under ".metadata/...". Based on your description, the
>> webapps shouldn't have worked with the jars in the installation's
>> "shared/lib". You can import the catalina.properties file into the
>> server's subfolder of the Servers project in your workspace and make
>> changes to the "shared.loader", if desired.
>
> Actually now you mention it - I did manually copy a load of stuff into
> there. I'll take a look at it
>
>> I don't know why the WEB-INF directory wouldn't be present.
>
> Where can you specify in a project that the WebContent folder is the one
> to use for Web Content. I have been using "git" for version control,
> and when I am on the module test branch I completely remove that folder
> (and change other parameters related to how to access the database) so
> I am wondering if something in my project settings are screwed.
Re: Can't get Tomcat started correctly [message #183825 is a reply to message #183734] Wed, 06 December 2006 15:53 Go to previous messageGo to next message
Alan Chandler is currently offline Alan ChandlerFriend
Messages: 45
Registered: July 2009
Member
Larry Isaacs wrote:

> The web content becomes part of the project's module due to a line
> like:
>
> <wb-resource deploy-path="/" source-path="/WebContent"/>
>
> in the ".setttings/org.eclipse.wst.common.component" file (called
> ".component" in WTP 1.0.x). If this is missing, that would explain
> why there was no WEB-INF.

Actually I am now suspicious of this for a different reason. See the
contents below


<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="usermgr">
<module-type module-type-id="jst.web">
<version>2.3</version>
</module-type>
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/UnitTests"/>
<property name="java-output-path" value="/bin/"/>
<property name="context-root" value="usermgr"/>
</wb-module>
</project-modules>


In particular this line

<wb-resource deploy-path="/WEB-INF/classes" source-path="/UnitTests"/>

coupled with the fact that the "/UnitTests/" directory does not exist
any longer. (The unit tests are only specified in a different branch
within my git repository - so don't exist on the branch were I try and
deploy onto Tomcat. In fact the code to deploy should come from a
different place.

Could that be the problem?

How do this file get set up - and how is it altered?
Re: Can't get Tomcat started correctly [message #183833 is a reply to message #183825] Wed, 06 December 2006 16:49 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
When you create a Dynamic Web Project, a Java source folder with a
default name of "src" is included in the project. This folder is set up
to have any classes it builds included in WEB-INF/classes when the
project is published to a server. This is the purpose of lines like the
one you cite. Any additional Java source folders you add to the project
are also set up in the same fashion. If a source folder doesn't
contains classes you want included in WEB-INF/classes, you should
manually delete the corresponding entry from the "component" file. I
assume that would be the case for your "UnitTests" folder, even if it
existed. You can try removing the entry with the "UnitTests"
source-path and see if the situation improves. At the moment, I'm not
sure how WTP reacts when the "component" file references folders that
don't exist.

Cheers,
Larry

Alan Chandler wrote:
> Larry Isaacs wrote:
>
>> The web content becomes part of the project's module due to a line
>> like:
>>
>> <wb-resource deploy-path="/" source-path="/WebContent"/>
>>
>> in the ".setttings/org.eclipse.wst.common.component" file (called
>> ".component" in WTP 1.0.x). If this is missing, that would explain
>> why there was no WEB-INF.
>
> Actually I am now suspicious of this for a different reason. See the
> contents below
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
> <wb-module deploy-name="usermgr">
> <module-type module-type-id="jst.web">
> <version>2.3</version>
> </module-type>
> <wb-resource deploy-path="/" source-path="/WebContent"/>
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/UnitTests"/>
> <property name="java-output-path" value="/bin/"/>
> <property name="context-root" value="usermgr"/>
> </wb-module>
> </project-modules>
>
>
> In particular this line
>
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/UnitTests"/>
>
> coupled with the fact that the "/UnitTests/" directory does not exist
> any longer. (The unit tests are only specified in a different branch
> within my git repository - so don't exist on the branch were I try and
> deploy onto Tomcat. In fact the code to deploy should come from a
> different place.
>
> Could that be the problem?
>
> How do this file get set up - and how is it altered?
>
Previous Topic:Non nillable element
Next Topic:where are codes generated by WTP tools
Goto Forum:
  


Current Time: Thu Mar 28 20:38:57 GMT 2024

Powered by FUDForum. Page generated in 0.04029 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top