A P P E N D I X  A

Troubleshooting

This Suntrademark ONE Application Framework Troubleshooting Appendix A outlines known Troubleshooting issues including symptom, probable cause, probable solution, and comments for each known issue.


Symptom

javax.servlet.ServletException: Invalid request - request handler "X" not found at com.iplanet.jato.ApplicationServletBase.onRequestHandlerNotFound(...)
...

Probable Cause

Misspelled the target page.

Probable Solution

In this example, the target page is spelled Login, not login.

Case sensitivity and plural form are common mistakes.

Comments

Because page names are always related to ViewBean class name, they generally begin with an uppercase letter.


Symptom

javax.servlet.ServletException: The request context is null - this page must be accessed through a servlet at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
...

Probable Cause

Attempting to access a Sun ONE Application Framework JSP directly using the JSP's URL.

Probable Solution

All access to Sun ONE Application Framework Web applications must go through a module servlet (the front controller). This exception indicates that the user tried to access the wrong resource.

Instead of this URL:

http://localhost:8081/JatoTutorial/jatotutorial/main/Login

use a URL like this:

http://localhost:8081/JatoTutorial/main/Login

Comments

The actual valid URL might vary depending on how the URL/servlet mappings are configured in the application's web.xml file. If the application was created without manual modification of the web.xml, the URL pattern should be as follows:

http://<server>:<port>/<ServletContext>/<module>/<targetPageName>


Symptom

com.iplanet.jato.NavigationException: Exception encountered during forward
Root cause = [java.sql.SQLException: Cannot find the user "ADMINISTRATOR".]
...

Probable Cause

This is specifically a database access SQL exception. In this case, the model attempted to access the database without the proper username and password.

Probable Solution

If you are using JDBC URLs (rather than the JNDI lookup technique), provide the appropriate username and password by setting them explicitly in the Model's constructor (PointBase sample database example):

setDefaultConnectionUser("pbpublic");
setDefaultConnectionPassword("pbpublic");

In some cases, you can also provide the user name and password on the JDBC URL.

Comments

This problem can be avoided by using JNDI database connection lookup. See Using SQLConnectionManager in Chapter 3, Programming Guide.