You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Barry Fawthrop <ba...@isscp.com> on 2008/10/06 19:53:14 UTC

Reloading Tomcat Server

To All

I have a simple website that reads third party RSS feeds and displays them.
(1) I have tried with DocBuilder
(2) tried with rssutils
(3) Even tried with the rss xml file downloaded locally (using wget) and
    then a reading the local file.

All three have the same Issue. You can get it the first time or within 3
minutes and then it stops and Tomcat shows the 500 Error Page.

I still do not understand tomcat enough to be able to trace or debug
correctly the error messages received.


My current solution is to stop and start the tomcat server every 2
minutes. I have tried this with Cron. But I keep getting CRON:
Authentication Failure   in the /var/log/syslog file.
The crontab was created using crontab -e (when logged in as root) and
thus should be run as root. But still fails.


Any help would be much appreciated.

Thank You
Barry

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Reloading Tomcat Server

Posted by Martin Gainty <mg...@hotmail.com>.
one of 3 things that could possibly be causing this
the response is too big
the response is taking too long (timeout)
you need to authenticate to the url

I would use wget or curl to determine what the error is
if you point us to the URL i can test it out here
and then we can suggest an appropriate solution

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> Date: Mon, 6 Oct 2008 13:53:14 -0400
> From: barry@isscp.com
> To: users@tomcat.apache.org
> Subject: Reloading Tomcat Server
> 
> To All
> 
> I have a simple website that reads third party RSS feeds and displays them.
> (1) I have tried with DocBuilder
> (2) tried with rssutils
> (3) Even tried with the rss xml file downloaded locally (using wget) and
>     then a reading the local file.
> 
> All three have the same Issue. You can get it the first time or within 3
> minutes and then it stops and Tomcat shows the 500 Error Page.
> 
> I still do not understand tomcat enough to be able to trace or debug
> correctly the error messages received.
> 
> 
> My current solution is to stop and start the tomcat server every 2
> minutes. I have tried this with Cron. But I keep getting CRON:
> Authentication Failure   in the /var/log/syslog file.
> The crontab was created using crontab -e (when logged in as root) and
> thus should be run as root. But still fails.
> 
> 
> Any help would be much appreciated.
> 
> Thank You
> Barry
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/

Re: Reloading Tomcat Server

Posted by Barry Fawthrop <ba...@isscp.com>.
Peter Crowther wrote:
>> From: Barry Fawthrop [mailto:barry@isscp.com]
> [...]
>> wget  -O  .../local_news
>> http://www.topix.com/rss/county/citrus-fl
> [...]
>> java.io.FileNotFoundException:
>> http://www.topix.com/rss/county/citrus-fl
>>         at
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt
>> pURLConnection.java:1239)
>>         at
>> com.sun.cnpi.rss.parser.RssParserImpl.parse(RssParserImpl.java:100)
>>         at
>> com.sun.cnpi.rss.taglib.FeedTag.doStartTag(FeedTag.java:121)
>>         at org.apache.jsp.index_jsp._jspService(index_jsp.java:155)
> 
> Are you *sure* you've changed your JSP to read from the local file?  That looks like it's still trying to read directly from the URL during the request.
> 
Yes I'm sure I changed the index.jsp
However, it probably is still reading the old version found
in /usr/share/tomcat-6.0.18/work/Catalina/....
This might also be the cause. Is there anyway to flush it
or better yet make it where it has to compile a new version
each time. I realize in most cases this would NOT be the case.

Thanks again

Barry

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Reloading Tomcat Server

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Barry Fawthrop [mailto:barry@isscp.com]
[...]
> wget  -O  .../local_news
> http://www.topix.com/rss/county/citrus-fl
[...]
> java.io.FileNotFoundException:
> http://www.topix.com/rss/county/citrus-fl
>         at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt
> pURLConnection.java:1239)
>         at
> com.sun.cnpi.rss.parser.RssParserImpl.parse(RssParserImpl.java:100)
>         at
> com.sun.cnpi.rss.taglib.FeedTag.doStartTag(FeedTag.java:121)
>         at org.apache.jsp.index_jsp._jspService(index_jsp.java:155)

Are you *sure* you've changed your JSP to read from the local file?  That looks like it's still trying to read directly from the URL during the request.

                - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Reloading Tomcat Server

Posted by Barry Fawthrop <ba...@isscp.com>.
Pid wrote:
> No! Bad!
> 
> Your tomcat version & operating system variant (some version of linux?)
> would be useful.
> 
> Try to locate the main tomcat logfile, 'catalina.out' in the tomcat/logs
> directory.  This logfile should contain a detailed error & stacktrace
> for the 500 error page, please send that in your reply.
> 
> 

Sorry you are right:  Tomcat 6-0-18   Debian  2.6.24

It might be a timeout issue, agreed.   That is why I decided on using
wget and a local file. Now index.jsp should just read the local file
and thus no timeout issue.
the wget command is as follows:

wget  -O  .../local_news      http://www.topix.com/rss/county/citrus-fl
wget  -O  .../national_news
http://hosted.ap.org/lineups/USHEADS-rss_2.0.xml?SITE=RANDOM&SECTION=HOME
wget  -O  .../international
http://hosted.ap.org/lineups/WORLDHEADS-rss_2.0.xml?SITE=VOICESD&SECTION=HOME
wget  -O  .../state_news
http://news.yahoo.com/localnews/12772758/source/7818797/St+Petersburg+Times?format=rss




Webpage shows:

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:418)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.NullPointerException
com.sun.cnpi.rss.taglib.ForEachItemTag.doStartTag(ForEachItemTag.java:108)
org.apache.jsp.index_jsp._jspx_meth_rss_005fforEachItem_005f0(index_jsp.java:367)
org.apache.jsp.index_jsp._jspService(index_jsp.java:167)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache
Tomcat/6.0.18 logs.

======================================================================================
catalina.out shows

Oct 7, 2008 10:08:53 AM org.apache.catalina.core.ApplicationContext log
INFO: default: DefaultServlet.serveFile:  contentType='text/html'
Oct 7, 2008 10:08:53 AM org.apache.catalina.core.ApplicationContext log
INFO: default: DefaultServlet.serveFile:  contentLength=2060
java.io.FileNotFoundException: http://www.topix.com/rss/county/citrus-fl
	at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1239)
	at com.sun.cnpi.rss.parser.RssParserImpl.parse(RssParserImpl.java:100)
	at com.sun.cnpi.rss.taglib.FeedTag.doStartTag(FeedTag.java:121)
	at org.apache.jsp.index_jsp._jspService(index_jsp.java:155)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at
org.apache.catalina.valves.JDBCAccessLogValve.invoke(JDBCAccessLogValve.java:463)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
Oct 7, 2008 10:13:42 AM org.apache.catalina.core.ApplicationContext log


======================================================================================
index.jsp has the following code

<div id="headlines" >
  <%
     String which = request.getParameter("feed");
     String FEED = "local_news";
     if (which == null || which.trim().equals("local") ) { FEED =
"local_news";     }
     else if (which.trim().equals("national") )          { FEED =
"national_news";  }
     else if (which.trim().equals("international") )     { FEED =
"international";  }
     else if (which.trim().equals("state") )             { FEED =
"state_news";     }
   %>
  <rss:feed feedId="headlines" url="<%= FEED %>" />
  <B><font color="red" size="3px"><rss:channelTitle feedId="headlines"
/> </font></B>  <hr />
  <rss:forEachItem feedId="headlines" endIndex="10" >
  <B><a href='<rss:itemLink feedId="headlines" />'><rss:itemTitle
feedId="headlines" /></a></B> <br /> <rss:itemDescription
feedId="headlines" /> <br />
  </rss:forEachItem>
</div>



Thanks again Barry






---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Reloading Tomcat Server

Posted by Pid <p...@pidster.com>.
Barry Fawthrop wrote:
> To All
> 
> I have a simple website that reads third party RSS feeds and displays them.
> (1) I have tried with DocBuilder
> (2) tried with rssutils
> (3) Even tried with the rss xml file downloaded locally (using wget) and
>     then a reading the local file.
> 
> All three have the same Issue. You can get it the first time or within 3
> minutes and then it stops and Tomcat shows the 500 Error Page.
> 
> I still do not understand tomcat enough to be able to trace or debug
> correctly the error messages received.
> 
> 
> My current solution is to stop and start the tomcat server every 2
> minutes. 

No! Bad!

Your tomcat version & operating system variant (some version of linux?)
would be useful.

Try to locate the main tomcat logfile, 'catalina.out' in the tomcat/logs
directory.  This logfile should contain a detailed error & stacktrace
for the 500 error page, please send that in your reply.


p



> I have tried this with Cron. But I keep getting CRON:
> Authentication Failure   in the /var/log/syslog file.
> The crontab was created using crontab -e (when logged in as root) and
> thus should be run as root. But still fails.
> 
> 
> Any help would be much appreciated.
> 
> Thank You
> Barry
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org