The Server Encountered an Internal Error
By divas on Dec 21, 2006
Sometimes, when testing your Visual Web application, you might get a page with the following unhelpful error:
HTTP Status 500 -
type Status report
description The server encountered an internal error () that prevented it from fulfilling this request.
To find out what the real problem, go back to the NetBeans IDE and click the tab for the server's log (usually in the same area as the output window). There, you will find a more helpful description of the error. For example, you might see:
Dec 21, 2006 5:24:21 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception javax.faces.el.PropertyNotFoundException: java.lang.RuntimeException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.apache.derby.jdbc.ClientDriver'In this particular case, I had not made the database driver available to the server. I resolved the problem by copying my database's JDBC3 compliant driver to the server's common library folder. With the Tomcat server, this would be something like
If the error is a programming error, such as a class cast error, you can search through the error output for the name of your page. If such line exists in the output, it will show the line number of the erroneous statement. Look for the names of your managed beans as well.
You can send diagnostic statements to the log from your page beans and managed beans by calling log("put your message here").