Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Tomcat v5.5 Server at localhost failed to start
Tomcat v5.5 Server at localhost failed to start [message #209368] Mon, 03 March 2008 10:36 Go to next message
Eclipse User
Originally posted by: salamlinux.free.fr

I have a fresh new FC8, Tomcat 5.5.26 and eclipse 3.3 with WTP.
Tomcat can be run normally outside of eclipse on port 8080
I create a new workspace, setup a Tomcat runtime server, add a jsp page,
do run as server and get the following error message

**************************************************
!ENTRY org.eclipse.wst.server.core 4 0 2008-03-03 15:45:55.637
!MESSAGE Server Tomcat v5.5 Server at localhost failed to start.
*************************************************

This error message in the log gives me no clue to try to understand the
problem. Switching to the console, I see the folowing error message :

************************************************************ ***************
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)
************************************************************ ***************

My config are as foolows (taken from .log file)
eclipse.buildId=I20070625-1500
java.version=1.5.0_14
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86 -data /root/WTP
Re: Tomcat v5.5 Server at localhost failed to start [message #209381 is a reply to message #209368] Mon, 03 March 2008 10:45 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
eliassal wrote:
> I have a fresh new FC8, Tomcat 5.5.26 and eclipse 3.3 with WTP.
> Tomcat can be run normally outside of eclipse on port 8080
> I create a new workspace, setup a Tomcat runtime server, add a jsp page,
> do run as server and get the following error message
>
> **************************************************
> !ENTRY org.eclipse.wst.server.core 4 0 2008-03-03 15:45:55.637
> !MESSAGE Server Tomcat v5.5 Server at localhost failed to start.
> *************************************************
>
> This error message in the log gives me no clue to try to understand the
> problem. Switching to the console, I see the folowing error message :
>
> ************************************************************ ***************
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
> at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)
> ************************************************************ ***************
>
> My config are as foolows (taken from .log file)
> eclipse.buildId=I20070625-1500
> java.version=1.5.0_14
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
> Command-line arguments: -os linux -ws gtk -arch x86 -data /root/WTP
>

See if this item[1] in the Tomcat FAQ covers your problem, specifically
the second use case.

Cheers,
Larry

[1]
http://wiki.eclipse.org/WTP_Tomcat_FAQ#What_does_it_mean_if_ WTP_says_my_server_.22failed_to_start.22.3F
Re: Tomcat v5.5 Server at localhost failed to start [message #209394 is a reply to message #209381] Mon, 03 March 2008 14:22 Go to previous messageGo to next message
Eclipse User
Originally posted by: salamlinux.free.fr

Thanks for the response. In arguments I have :

-Dcatalina.base=" /root/WTP/.metadata/.plugins/org.eclipse.wst.server.core/tmp 0 "
-Dcatalina.home="/usr/share/tomcat5"
-Dwtp.deploy=" /root/WTP/.metadata/.plugins/org.eclipse.wst.server.core/tmp 0/wtpwebapps "
-Djava.endorsed.dirs="/usr/share/tomcat5/common/endorsed"

and in the classpath I have 2 entries as foillows :
Bootstrap entries
JRE system libraries [jdk1.5.0_14]
User entries
bootstrap.jar -/usr/share/tomcat5/bin
tools.jar - /opt/jdk1.5.0_14/lib

I assume this is what use case is talking about. However, I couldn't
understand where/how find 'start-up batch".
2nd, how/where can I ensure that user running Eclipse has permission to
read the JARs in the installation. I am new to this eclipse world and a
little bit lost.

Thanks aqain for your help
Re: Tomcat v5.5 Server at localhost failed to start [message #209401 is a reply to message #209394] Mon, 03 March 2008 15:02 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
eliassal wrote:
> Thanks for the response. In arguments I have :
>
> -Dcatalina.base=" /root/WTP/.metadata/.plugins/org.eclipse.wst.server.core/tmp 0 "
> -Dcatalina.home="/usr/share/tomcat5"
> -Dwtp.deploy=" /root/WTP/.metadata/.plugins/org.eclipse.wst.server.core/tmp 0/wtpwebapps "
> -Djava.endorsed.dirs="/usr/share/tomcat5/common/endorsed"
>
> and in the classpath I have 2 entries as foillows :
> Bootstrap entries
> JRE system libraries [jdk1.5.0_14]
> User entries
> bootstrap.jar -/usr/share/tomcat5/bin
> tools.jar - /opt/jdk1.5.0_14/lib
>
> I assume this is what use case is talking about. However, I couldn't
> understand where/how find 'start-up batch".
> 2nd, how/where can I ensure that user running Eclipse has permission to
> read the JARs in the installation. I am new to this eclipse world and a
> little bit lost.
>
> Thanks aqain for your help
>

This isn't really an Eclipse/WTP issue, but one of reasons you will
often be advised on the Tomcat Users mailing list to avoid packaged
Tomcat installs. If I examine the MANIFEST.MF file found in
bootstrap.jar in a binary distribution from Apache (Tomcat 5.5 in this
case) I will find a line like the following:

Class-Path: jmx.jar commons-daemon.jar commons-logging-api.jar
tomcat-juli.jar

This specifies additional jars, if present in the same directory as
bootstrap.jar, that should be automatically included on the startup
classpath. This is why you don't have to include them in the startup
configuration like what you cited above. If you examine the
bootstrap.jar in /usr/share/tomcat5/bin, you probably won't find that
line or it won't be the same. It was removed or altered as part of the
"packaging" of Tomcat so that jars installed elsewhere could be
specified in the startup scripts that run Tomcat. The problem is that
WTP no longer picks them up automatically. Not knowing how the Tomcat
was packaged, I don't know where those startup scripts are or which file
will show what jars are being used. They might be in the "bin"
directory along with bootstrap.jar.

Assuming the prediction above about your bootstrap.jar is true, you can
avoid this problem by downloading a tar.gz binary distribution[1] from
Apache and use that instead of your currently installed Tomcat. You
will potentially avoid other issues as well.

Cheers,
Larry

[1] See http://tomcat.apache.org/
Re: Tomcat v5.5 Server at localhost failed to start [message #209409 is a reply to message #209401] Mon, 03 March 2008 15:53 Go to previous messageGo to next message
Eclipse User
Originally posted by: salamlinux.free.fr

So many thanks for this usefull explamation. I opened the file and found
the following line

Class-Path: jmx.jar commons-daemon.jar commons-logging-api-1.1.1.jar
tomcat-juli.jar

which has only, it seems, commons-logging-api-1.1.1. instead of
commons-logging-api.jar

All indicated jars are found in the same directory and I should think
according to your explanation that the version in bootstrap is not
compatible with my eclipse. Am I right.

IO have spent a lot of time configuring my machine (apache, tomcat,
axis2.......) and would like to avoid the option you suggested of
re-install tomcat.
Re: Tomcat v5.5 Server at localhost failed to start [message #209433 is a reply to message #209409] Tue, 04 March 2008 05:41 Go to previous messageGo to next message
Eclipse User
Originally posted by: salamlinux.free.fr

There is one thing I missed, in the manifeste it is indicated
commons-logging-api-1.1.1.jar
whereas in the directory there is commons-logging-api.jar.
Thanks
Re: Tomcat v5.5 Server at localhost failed to start [message #209451 is a reply to message #209433] Tue, 04 March 2008 08:23 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
eliassal wrote:
> There is one thing I missed, in the manifeste it is indicated
> commons-logging-api-1.1.1.jar
> whereas in the directory there is commons-logging-api.jar.
> Thanks
>
>

It would appear they made a mistake. However, the startup scripts could
circumvent this possible error. You could try renaming the jar to match
the manifest, but this carries the risk of causing problems for the
startup scripts. I guess the bottom line is that you will need to add to
the Tomcat configuration in WTP any needed jar that is not picked up
automatically through the manifest.

Cheers,
Larry
Re: Tomcat v5.5 Server at localhost failed to start [message #209459 is a reply to message #209451] Tue, 04 March 2008 10:52 Go to previous messageGo to next message
Eclipse User
Originally posted by: salamlinux.free.fr

Yeeeeeeeeeeeeeeeees, with your help I maneged to have the server strats
from eclipse.
I added the following
/usr/share/eclipse/plugins/org.eclipse.tomcat_5.5.23.v200705 31/commons-logging-api.jar
to the classpath, did a first start I had a timeout coyote http...
I did another start right away, evrything went ok and the server has the
status started with the following log in the console:


Mar 4, 2008 4:48:12 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/opt/jdk1.5.0_14/jre/lib/i386/client:/opt/jdk1.5.0_14/jre/li b/i386:/opt/jdk1.5.0_14/jre/../lib/i386:/opt/jdk1.5.0_14/jre /lib/i386/client::/opt/jdk1.5.0_14/jre/lib/i386::/usr/lib/fi refox-2.0.0.12:/usr/lib/firefox-2.0.0.12
Mar 4, 2008 4:48:15 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 4, 2008 4:48:15 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 17111 ms
Mar 4, 2008 4:48:17 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 4, 2008 4:48:17 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.26
Mar 4, 2008 4:48:17 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Mar 4, 2008 4:48:25 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 4, 2008 4:48:30 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 4, 2008 4:48:30 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/990 config=null
Mar 4, 2008 4:48:32 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Mar 4, 2008 4:48:34 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 19704 ms
Re: Tomcat v5.5 Server at localhost failed to start [message #209500 is a reply to message #209451] Tue, 04 March 2008 12:10 Go to previous messageGo to next message
Eclipse User
Originally posted by: salamlinux.free.fr

I really appreciate your help. Everything is working fine, can run my jsp
file.
However, a quick question, when I click on my jsp file, do Deug on server,
the server starts correctly , same messages in console as before, and then
it stops for Timeout error.
*********************************
Timeout waiting for Tomcat v5.5 Server at localhost to start. Server did
not start after 45s.
***********************************************

Any idea?
Salam
Re: Tomcat v5.5 Server at localhost failed to start [message #209508 is a reply to message #209451] Tue, 04 March 2008 12:32 Go to previous message
Eclipse User
Originally posted by: salamlinux.free.fr

Please ignore my last post regarding the timeout error. I read on of your
old posts, I changed the from normal to long and debug is working like a
charm
Previous Topic:Javascript editor within a Java Project?
Next Topic:Eclipse can't find TLD in build path
Goto Forum:
  


Current Time: Thu Aug 28 07:27:39 EDT 2014

Powered by FUDForum. Page generated in 0.11526 seconds