Fedora Linux Support Community & Resources Center
  #1  
Old 23rd February 2007, 09:47 PM
jcwinnie Offline
Registered User
 
Join Date: Nov 2003
Location: SouthernTierNY, USA
Posts: 129
Question Tomcat5 - Application at context path could not be started

I have Tomcat5 running on FC6. Am able to use Tomcat admin, manager, and view examples.

Supposedly, I should be able to drop a *.war file into webapps or deploy same from Tomcat manager and begin using the application.

Application deploys, but then is not accessible. Error message that appears in Tomcat manager is "FAIL - Application at context path /[my app] could not be started

The two apps that I have tried to deploy, both current versions, are JSPWiki and Pebble.

Any suggestions on how to succeed with a Java app on a Tomcat?
__________________
Stay Clear of Netgear
Reply With Quote
  #2  
Old 27th February 2007, 06:33 PM
jcwinnie Offline
Registered User
 
Join Date: Nov 2003
Location: SouthernTierNY, USA
Posts: 129
Tried setting JAVA_HOME and JRE_HOME to no avail.
__________________
Stay Clear of Netgear
Reply With Quote
  #3  
Old 28th February 2007, 01:06 AM
AlexThomson_NZ Offline
Registered User
 
Join Date: Nov 2006
Posts: 192
The first thing to try is to start Tomcat and make sure it starts properly. Go to your tomcat directory and type:
Code:
./catalina.sh run
Which will start Tomcat running in the current window. Make sure it starts withour error. You should get a line:
Code:
INFO: Server startup in 2701 ms
Which means all is good. Otherwise probably the most common error is a Bind error which means the ports used (8005 and 8080 by default) is already in use.

If you are happy this has started ok, and you can browse to the Tomcat placeholder page (http://localhost:8080), it should just be a matter of dropping the WAR file into the /webapps directory- again this should produce some output in the console window again- check to make sure still no errors.
Reply With Quote
  #4  
Old 5th March 2007, 11:14 PM
jcwinnie Offline
Registered User
 
Join Date: Nov 2003
Location: SouthernTierNY, USA
Posts: 129
It should be, but isn't.

In other words, yes, I have Tomcat5 running when I go to localhost:8080/
I can run Tomcat manager and admin.
But deploying a war file, either by dropping it into the webapps directory or using manager presents me with an error.
__________________
Stay Clear of Netgear
Reply With Quote
  #5  
Old 6th March 2007, 11:01 PM
AlexThomson_NZ Offline
Registered User
 
Join Date: Nov 2006
Posts: 192
What errors are displayed at the console when you deploy the WAR file?
Reply With Quote
  #6  
Old 7th March 2007, 04:37 PM
jcwinnie Offline
Registered User
 
Join Date: Nov 2003
Location: SouthernTierNY, USA
Posts: 129
Mm, not sure that I understand the question completely as I mislaid my Kiwi-Yankeee dictionary and am unsure of the meaning of "console" in this context, but still will try to answer.

I can deploy the war file without error. But then the deployed application cannot be started, which is when I get the Context path error.

It is about "should work" versus "does work".
__________________
Stay Clear of Netgear
Reply With Quote
  #7  
Old 8th March 2007, 12:38 AM
AlexThomson_NZ Offline
Registered User
 
Join Date: Nov 2006
Posts: 192
Sorry if I wasn't clear. By "console" I mean "command prompt" or "terminal".

If you can start Tomcat in the terminal using the "./catalina.sh run" command you will get more detailed error messages, or alternatively you can go throuigh the log files and look for a stacktrace or other error messages. Either way you will have to give more information if you need us to help ya.
Reply With Quote
  #8  
Old 8th March 2007, 04:15 PM
Qrius Offline
Registered User
 
Join Date: Mar 2007
Posts: 2
well Jcwinnie your not the only one with this problem. I to have trouble starting my app after deploying it on my school server. (It does work on my own server though)
Maybe it has to do with the fact that I run windows and my school server runs on unix/linux I dunno??

With me it has something to do with my database listener (Derby DB) allthough a program on witch I based my program uses the same listener and it is called in the same way in the web.xml and context.xml.

Here's my web.xml"
Quote:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>valServlet</display-name>
<servlet>
<servlet-name>UploadServlet</servlet-name>
<servlet-class>com.altapp.valServlet.uploadToServer.UploadS ervlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UploadServlet</servlet-name>
<url-pattern>/upload</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

<listener>
<listener-class>
com.altapp.valServlet.listeners.DbInitializingList ener
</listener-class>
</listener>
</web-app>
and my context.xml
Quote:
<?xml version="1.0" encoding="UTF-8"?>
<Context crossContext="true" debug="5" docBase="valServlet.war" path="/valServlet" reloadable="true">
<Resource auth="Container" driverClassName="org.apache.derby.jdbc.EmbeddedDri ver" logAbandoned="true" maxActive="100" maxIdle="30" maxWait="10000" name="jdbc/DefaultDS" password="" removeAbandoned="true" type="javax.sql.DataSource" url="jdbc:derby:/tmp/valServlet;create=true" username=""/>
</Context>
compared to the web.xml and context.xml of the program that DOES work:
web.xml
Quote:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
<display-name>Mobile File Sharing</display-name>

<listener>
<listener-class>
com.altapp.fshare.listeners.DbInitializingListener
</listener-class>
</listener>

<servlet>
<servlet-name>UploadServlet</servlet-name>
<servlet-class>
com.altapp.fshare.servlets.UploadServlet
</servlet-class>
</servlet>

<servlet>
<servlet-name>DownloadServlet</servlet-name>
<servlet-class>
com.altapp.fshare.servlets.DownloadServlet
</servlet-class>
</servlet>

<servlet>
<servlet-name>QueryServlet</servlet-name>
<servlet-class>
com.altapp.fshare.servlets.QueryServlet
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>UploadServlet</servlet-name>
<url-pattern>/upload</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>DownloadServlet</servlet-name>
<url-pattern>/download</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>QueryServlet</servlet-name>
<url-pattern>/query</url-pattern>
</servlet-mapping>
</web-app>
and context.xml
Quote:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
<display-name>Mobile File Sharing</display-name>

<listener>
<listener-class>
com.altapp.fshare.listeners.DbInitializingListener
</listener-class>
</listener>

<servlet>
<servlet-name>UploadServlet</servlet-name>
<servlet-class>
com.altapp.fshare.servlets.UploadServlet
</servlet-class>
</servlet>

<servlet>
<servlet-name>DownloadServlet</servlet-name>
<servlet-class>
com.altapp.fshare.servlets.DownloadServlet
</servlet-class>
</servlet>

<servlet>
<servlet-name>QueryServlet</servlet-name>
<servlet-class>
com.altapp.fshare.servlets.QueryServlet
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>UploadServlet</servlet-name>
<url-pattern>/upload</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>DownloadServlet</servlet-name>
<url-pattern>/download</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>QueryServlet</servlet-name>
<url-pattern>/query</url-pattern>
</servlet-mapping>
</web-app>

Another litlle tit-bit of information is that if I get the fshare.war (the one that works) and import it in eclipse and then export it again unchanged... it doesn't work annymore!!!???

So as summation..: HELP!! me plz
Reply With Quote
  #9  
Old 8th March 2007, 04:46 PM
sentry Offline
Registered User
 
Join Date: Jul 2005
Posts: 591
Sorry if this is obvious but what jre are you using? I've found that using the gcj stuff that comes preloaded on FC boxes does not work 100% of the time. You're way better off installing a jdk from sun.
Reply With Quote
  #10  
Old 8th March 2007, 05:07 PM
Qrius Offline
Registered User
 
Join Date: Mar 2007
Posts: 2
I am using jdk 1.6.0 from sun.

btw. Is it possible that it has something to do with memory leaks? I found something that indicated it here: http://www.nabble.com/log4j-exceptio...-t3302676.html
Reply With Quote
Reply

Tags
application, context, path, started, tomcat5

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add path /usr/local/bin/lftp to user path nix4me Using Fedora 6 18th August 2010 01:31 AM
vsftpd doesn't work when started automatically, but works started manually oryan_dunn Servers & Networking 7 2nd February 2007 10:41 PM
tomcat5 started with error, cant not login to tomcat manager lnthai2002 Servers & Networking 1 10th January 2007 07:39 PM
Tomcat5 on Fc5 puliraaj Servers & Networking 1 23rd April 2006 11:56 AM
Changing 'path' (context) of Tomcat admin application nethole Servers & Networking 0 2nd February 2006 01:03 AM


Current GMT-time: 05:46 (Friday, 28-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Avari Lahore Photos on Instagram