Uncaught servlet exception

Hi,

Am getting this following error immediately after my JSP page loads

com.ibm.ws.webcontainer.servlet.exception.UncaughtServletException: Server caught unhandled exception from servlet [file]: null

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))

at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))

at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))

at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))

at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)

at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))

at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))

at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))

at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

No stack trace is available. Guess there is some problem in the JSP. basically am calling a servlet on load of this JSP.This is the code snippet which calls the servlet.Please help me out if anybody have any idea.

<%

String dateSuffix = (String)session.getAttribute(

VSRMPresentationLayerConstants.FILE_NAME);

String attributeName = (String)session.getAttribute(

VSRMPresentationLayerConstants.GROUP_NAME);

String path = request.getContextPath()+"/exportGroupMembers.file?fileName="+

ManagerConstants.GROUP_REPORT_FILE_LOCATION+attributeName+"_"+dateSuffix+"&download=group&display="+attributeName+"_"+dateSuffix;

%>

[2302 byte] By [Gayathri@CTSa] at [2007-11-26 18:30:51]
# 1

Most probably it is a null pointer exception.

Most things that have "null" for an error message are.

As to what is null, that is anyones guess, but most probably one of the session attributes.

I'm against scriptlets in JSPs as a matter of course, but this may help a little:

<%

try {

String dateSuffix = (String)session.getAttribute(VSRMPresentationLayerConstants.FILE_NAME);

String attributeName = (String)session.getAttribute(VSRMPresentationLayerConstants.GROUP_NAME);

String path = request.getContextPath()+"/exportGroupMembers.file?fileName="+ManagerConstants.GROUP_REPORT_FILE_LOCATION+attributeName+"_"+dateSuffix+"&download=group&display="+attributeName+"_"+dateSuffix;

}

catch (Throwable t){

System.err.println("The error is " + e.getMessage());

e.printStackTrace();

throw e;

}

%>

It should at least give you an indication of what the error is, and where it is approximately in your JSP.

evnafetsa at 2007-7-9 6:05:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Hithe error must be in ur JSP...........I think its throwing null pointer exception.One of ur object having null valuecheck the following objects whether it is null or not?sessionVSRMPresentationLayerConstants
java_usera at 2007-7-9 6:05:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

I think that you are getting a null value from the session.

Why don't you add the following statements and see the value:-

System.out.println("dateSuffix "+dateSuffix );

System.out.println("attributeName "+attributeName );

It is always advisable that you print the values before using them, so that exceptions are easier to catch.

Meanwhile, are you from TCS?

indraraj_ma at 2007-7-9 6:05:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...