Exception Handling

All error responses (HTTP status codes 4XX and 5XX) are returned with content in the form of an Atom Entry. The title of the entry indicates what type of exception occurred. The content and summary sections provide english descriptions of the error. When service.debugging is set to true the content section is rendered as an xhtml ordered list of a Java stack trace.

Request

GET /lucene/nonexistent/ HTTP/1.1
Host: localhost:8080

Response (without debugging)

HTTP/1.x 404 Not Found
Content-Type: application/atom+xml;charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>IndexNotFoundException</title>
	<updated>2006-02-24T10:32:01-04:00</updated>
	<author>
		<name>Lucene Web Service</name>
	</author>
	<id>http://localhost:8080/lucene/nonexistent/</id>
	<summary>Index 'nonexistent' was not found</summary>
	<content type="text">Index 'nonexistent' was not found</content>
</entry>

Response (with debugging)

HTTP/1.x 404 Not Found
Content-Type: application/atom+xml;charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>IndexNotFoundException</title>
	<updated>2006-02-24T10:46:31-04:00</updated>
	<author>
		<name>Lucene Web Service</name>
	</author>
	<id>http://localhost:8080/lucene/nonexistent/</id>
	<summary>Index 'nonexistent' was not found</summary>
	<content type="xhtml">
		<div xmlns="http://www.w3.org/1999/xhtml">
			<ol>
				<li>net.lucenews.model.LuceneIndexManager.getIndex(LuceneIndexManager.java:39)</li>
				<li>net.lucenews.controller.IndexController.asFeed(IndexController.java:225)</li>
				<li>net.lucenews.controller.IndexController.doGet(IndexController.java:92)</li>
				<li>net.lucenews.LuceneWebService.doGet(LuceneWebService.java:344)</li>
				<li>net.lucenews.LuceneWebService.service(LuceneWebService.java:192)</li>
				<li>javax.servlet.http.HttpServlet.service(HttpServlet.java:802)</li>
				<li>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)</li>
				<li>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)</li>
				<li>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)</li>
				<li>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)</li>
				<li>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)</li>
				<li>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)</li>
				<li>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)</li>
				<li>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)</li>
				<li>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)</li>
				<li>org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)</li>
				<li>org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)</li>
				<li>org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)</li>
				<li>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)</li>
				<li>java.lang.Thread.run(Unknown Source)</li>
			</ol>
		</div>
	</content>
</entry>