while executing a small application in Eclipse, I get an Http Status 500 error from the Tomcat server that I am running through Eclipse itself...
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
org.apache.struts2.impl.StrutsActionProxy.getErrorMessage (StrutsActionProxy.java:69)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:500)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:434)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.8 logs.
This message from the server says that error was caused by a "NullPointerException". The last line says that "full stack trace is available in Apache Tomcat/7.0.8 logs. I have checked the logs created in my workspace ( ${catalina.base} is set to a folder in my workspace) but the logs don't provide any details about the "NullPointerException". The only thing present in the logs is...
0:0:0:0:0:0:0:1 - - [03/May/2012:15:19:16 +0530] "GET /KurniawanChap02Struts/ HTTP/1.1" 500 1789
I have also tried increasing the "logging levels" but even that doesn't help. What should I do to access the detailed logs of the server ?
I had the same problem. I removed the unused project that was referenced in properties->Java Build Path->Projects. It was showing that xyz(project Name) is missing. I removed xyz.
Sometimes you can check in properties->Java Build Path->libraries whether any jar is missing. If so, you can add that jar from the classpath.
I had some similar errors when I was using different versions of Apache Commons. For getting more details about these errors I changed the default loggind of Tomcat to log4j. You can see the detailed instructions in Apache Tomcat 7 (7.0.27) - Logging in Tomcat
This is xml example for
log4j
that I was using:I hope that this can hep you.