यह मेरा web.xml है:स्थिति 500 होने पर जर्सी में कोई त्रुटि लॉग क्यों नहीं है?
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>
org.glassfish.jersey.servlet.ServletContainer
</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>rest</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.provider.classnames</param-name>
<param-value>org.glassfish.jersey.filter.LoggingFilter</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
और ये मेरे संसाधन वर्ग है:
@Path("/main")
public class MainResource {
@XmlRootElement
public class Planet {
public int id;
public String name;
public double radius;
}
@GET
@Produces(MediaType.APPLICATION_XML)
public Planet getPlanet() {
final Planet planet = new Planet();
planet.id = 1;
planet.name = "Earth";
planet.radius = 1.0;
return planet;
}
}
और जब मैं बिल्ला सर्वर चलाने के लिए, लॉग इस तरह है:
09-Jan-2015 13:19:10.501 INFO [http-apr-8080-exec-8] org.glassfish.jersey.filter.LoggingFilter.log 1 * Server has received a request on thread http-apr-8080-exec-8
1 > GET http://localhost:8080/rest/main
1 > accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
1 > accept-encoding: gzip, deflate, sdch
1 > accept-language: en,zh-CN;q=0.8,zh;q=0.6
1 > connection: keep-alive
1 > cookie: JSESSIONID=69F79D567E7ECA27A129C477B91C7758
1 > host: localhost:8080
1 > user-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
09-Jan-2015 13:19:10.597 INFO [http-apr-8080-exec-8] org.glassfish.jersey.filter.LoggingFilter.log 1 * Server responded with a response on thread http-apr-8080-exec-8
1 < 200
1 < Content-Type: application/xml
09-Jan-2015 13:19:10.794 INFO [http-apr-8080-exec-8] org.glassfish.jersey.filter.LoggingFilter.log 2 * Server responded with a response on thread http-apr-8080-exec-8
2 < 500
मुझे आश्चर्य है कि यह 500 त्रुटि क्यों दिखाता है, लेकिन मुझे अपवाद स्टैक के बारे में कोई त्रुटि लॉग नहीं मिल रहा है।
कृपया मेरी मदद करें।