473,657 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unexpected behavior while forwarding request to the servlets.

14 New Member
Hi Folks,

We have e-Biz application running on WebSphere Application Server Ver 6.0 using DB2 UDB Ver 8.1 . We are facing following issue in our application , any help from your side will be highly appreciated.

Issue:
=============== =============== =============== ===========
Sometimes while browseing through the web pages we are facing following error.

“We're sorry but the request could not be processed.The processing error message is:
An unknown Error has occured while processing your request. Please try again later.”
=============== =============== =============== ============

Please find following stack trace:
=============== =============== =============== ===========
[1/5/07 17:09:34:516 IST] 0000018c LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly () being called.
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O java.lang.Class CastException: com.ibm.ws.cach e.servlet.Cache ProxyRequest
at com.ibm.ws.webc ontainer.servle t.CacheServletW rapper.handleRe quest(CacheServ letWrapper.java (Compiled Code))
at com.ibm.ws.webc ontainer.extens ion.InvokerExte nsionProcessor. handleRequest(I nvokerExtension Processor.java: 179)
at com.ibm.ws.webc ontainer.webapp .WebAppRequestD ispatcher.forwa rd(WebAppReques tDispatcher.jav a(Compiled Code))
at editProfile.MUP rofileServlet.p erformTask(MUPr ofileServlet.ja va:464)
at editProfile.MUP rofileServlet.d oPost(MUProfile Servlet.java:68 )
at javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java(Comp iled Code))
at javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java(Comp iled Code))
at com.ibm.ws.cach e.servlet.Servl etWrapper.servi ceProxied(Servl etWrapper.java( Inlined Compiled Code))
at com.ibm.ws.cach e.servlet.Cache Hook.handleFrag ment(CacheHook. java(Compiled Code))
at com.ibm.ws.cach e.servlet.Cache Hook.handleServ let(CacheHook.j ava(Compiled Code))
at com.ibm.ws.cach e.servlet.Servl etWrapper.servi ce(ServletWrapp er.java(Compile d Code))
at com.ibm.ws.webc ontainer.servle t.ServletWrappe r.service(Servl etWrapper.java( Compiled Code))
at com.ibm.ws.webc ontainer.servle t.ServletWrappe r.handleRequest (ServletWrapper .java(Compiled Code))
at com.ibm.ws.webc ontainer.servle t.CacheServletW rapper.handleRe quest(CacheServ letWrapper.java (Compiled Code))
at com.ibm.ws.webc ontainer.WebCon tainer.handleRe quest(WebContai ner.java(Compil ed Code))
at com.ibm.ws.webc ontainer.channe l.WCChannelLink .ready(WCChanne lLink.java(Comp iled Code))
at com.ibm.ws.http .channel.inboun d.impl.HttpInbo undLink.handleD iscrimination(H ttpInboundLink. java(Compiled Code))
at com.ibm.ws.http .channel.inboun d.impl.HttpInbo undLink.handleN ewInformation(H ttpInboundLink. java(Compiled Code))
at com.ibm.ws.http .channel.inboun d.impl.HttpICLR eadCallback.com plete(HttpICLRe adCallback.java (Compiled Code))
at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. requestComplete (WorkQueueManag er.java(Compile d Code))
at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. attemptIO(WorkQ ueueManager.jav a(Compiled Code))
at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. workerRun(WorkQ ueueManager.jav a(Compiled Code))
at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager$ Worker.run(Work QueueManager.ja va(Compiled Code))
at com.ibm.ws.util .ThreadPool$Wor ker.run(ThreadP ool.java(Compil ed Code))

[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.servle t.CacheServletW rapper.handleRe quest(CacheServ letWrapper.java (Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.extens ion.InvokerExte nsionProcessor. handleRequest(I nvokerExtension Processor.java: 179)
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.webapp .WebAppRequestD ispatcher.forwa rd(WebAppReques tDispatcher.jav a(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at editProfile.MUP rofileServlet.p erformTask(MUPr ofileServlet.ja va:464)
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at editProfile.MUP rofileServlet.d oPost(MUProfile Servlet.java:68 )
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java(Comp iled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java(Comp iled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.cach e.servlet.Servl etWrapper.servi ceProxied(Servl etWrapper.java( Inlined Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.cach e.servlet.Cache Hook.handleFrag ment(CacheHook. java(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.cach e.servlet.Cache Hook.handleServ let(CacheHook.j ava(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.cach e.servlet.Servl etWrapper.servi ce(ServletWrapp er.java(Compile d Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.servle t.ServletWrappe r.service(Servl etWrapper.java( Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.servle t.ServletWrappe r.handleRequest (ServletWrapper .java(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.servle t.CacheServletW rapper.handleRe quest(CacheServ letWrapper.java (Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.WebCon tainer.handleRe quest(WebContai ner.java(Compil ed Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.channe l.WCChannelLink .ready(WCChanne lLink.java(Comp iled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.http .channel.inboun d.impl.HttpInbo undLink.handleD iscrimination(H ttpInboundLink. java(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.http .channel.inboun d.impl.HttpInbo undLink.handleN ewInformation(H ttpInboundLink. java(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.http .channel.inboun d.impl.HttpICLR eadCallback.com plete(HttpICLRe adCallback.java (Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. requestComplete (WorkQueueManag er.java(Compile d Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. attemptIO(WorkQ ueueManager.jav a(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. workerRun(WorkQ ueueManager.jav a(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager$ Worker.run(Work QueueManager.ja va(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.util .ThreadPool$Wor ker.run(ThreadP ool.java(Compil ed Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O Source Page is: /b2b/ErrorPage.jsp
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O Connection being closed
=============== =============== =============== ============


Let me know if any additional information is required .

Thanks in advance.

Rergards,
Roh
Jan 8 '07 #1
19 2844
r035198x
13,262 MVP
Hi Folks,

We have e-Biz application running on WebSphere Application Server Ver 6.0 using DB2 UDB Ver 8.1 . We are facing following issue in our application , any help from your side will be highly appreciated.

Issue:
=============== =============== =============== ===========
Sometimes while browseing through the web pages we are facing following error.

“We're sorry but the request could not be processed.The processing error message is:
An unknown Error has occured while processing your request. Please try again later.”
=============== =============== =============== ============

Please find following stack trace:
=============== =============== =============== ===========
[1/5/07 17:09:34:516 IST] 0000018c LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly () being called.
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O java.lang.Class CastException: com.ibm.ws.cach e.servlet.Cache ProxyRequest
at com.ibm.ws.webc ontainer.servle t.CacheServletW rapper.handleRe quest(CacheServ letWrapper.java (Compiled Code))
at com.ibm.ws.webc ontainer.extens ion.InvokerExte nsionProcessor. handleRequest(I nvokerExtension Processor.java: 179)
at com.ibm.ws.webc ontainer.webapp .WebAppRequestD ispatcher.forwa rd(WebAppReques tDispatcher.jav a(Compiled Code))
at editProfile.MUP rofileServlet.p erformTask(MUPr ofileServlet.ja va:464)
at editProfile.MUP rofileServlet.d oPost(MUProfile Servlet.java:68 )
at javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java(Comp iled Code))
at javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java(Comp iled Code))
at com.ibm.ws.cach e.servlet.Servl etWrapper.servi ceProxied(Servl etWrapper.java( Inlined Compiled Code))
at com.ibm.ws.cach e.servlet.Cache Hook.handleFrag ment(CacheHook. java(Compiled Code))
at com.ibm.ws.cach e.servlet.Cache Hook.handleServ let(CacheHook.j ava(Compiled Code))
at com.ibm.ws.cach e.servlet.Servl etWrapper.servi ce(ServletWrapp er.java(Compile d Code))
at com.ibm.ws.webc ontainer.servle t.ServletWrappe r.service(Servl etWrapper.java( Compiled Code))
at com.ibm.ws.webc ontainer.servle t.ServletWrappe r.handleRequest (ServletWrapper .java(Compiled Code))
at com.ibm.ws.webc ontainer.servle t.CacheServletW rapper.handleRe quest(CacheServ letWrapper.java (Compiled Code))
at com.ibm.ws.webc ontainer.WebCon tainer.handleRe quest(WebContai ner.java(Compil ed Code))
at com.ibm.ws.webc ontainer.channe l.WCChannelLink .ready(WCChanne lLink.java(Comp iled Code))
at com.ibm.ws.http .channel.inboun d.impl.HttpInbo undLink.handleD iscrimination(H ttpInboundLink. java(Compiled Code))
at com.ibm.ws.http .channel.inboun d.impl.HttpInbo undLink.handleN ewInformation(H ttpInboundLink. java(Compiled Code))
at com.ibm.ws.http .channel.inboun d.impl.HttpICLR eadCallback.com plete(HttpICLRe adCallback.java (Compiled Code))
at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. requestComplete (WorkQueueManag er.java(Compile d Code))
at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. attemptIO(WorkQ ueueManager.jav a(Compiled Code))
at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. workerRun(WorkQ ueueManager.jav a(Compiled Code))
at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager$ Worker.run(Work QueueManager.ja va(Compiled Code))
at com.ibm.ws.util .ThreadPool$Wor ker.run(ThreadP ool.java(Compil ed Code))

[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.servle t.CacheServletW rapper.handleRe quest(CacheServ letWrapper.java (Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.extens ion.InvokerExte nsionProcessor. handleRequest(I nvokerExtension Processor.java: 179)
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.webapp .WebAppRequestD ispatcher.forwa rd(WebAppReques tDispatcher.jav a(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at editProfile.MUP rofileServlet.p erformTask(MUPr ofileServlet.ja va:464)
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at editProfile.MUP rofileServlet.d oPost(MUProfile Servlet.java:68 )
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java(Comp iled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java(Comp iled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.cach e.servlet.Servl etWrapper.servi ceProxied(Servl etWrapper.java( Inlined Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.cach e.servlet.Cache Hook.handleFrag ment(CacheHook. java(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.cach e.servlet.Cache Hook.handleServ let(CacheHook.j ava(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.cach e.servlet.Servl etWrapper.servi ce(ServletWrapp er.java(Compile d Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.servle t.ServletWrappe r.service(Servl etWrapper.java( Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.servle t.ServletWrappe r.handleRequest (ServletWrapper .java(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.servle t.CacheServletW rapper.handleRe quest(CacheServ letWrapper.java (Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.WebCon tainer.handleRe quest(WebContai ner.java(Compil ed Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.webc ontainer.channe l.WCChannelLink .ready(WCChanne lLink.java(Comp iled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.http .channel.inboun d.impl.HttpInbo undLink.handleD iscrimination(H ttpInboundLink. java(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.http .channel.inboun d.impl.HttpInbo undLink.handleN ewInformation(H ttpInboundLink. java(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.http .channel.inboun d.impl.HttpICLR eadCallback.com plete(HttpICLRe adCallback.java (Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. requestComplete (WorkQueueManag er.java(Compile d Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. attemptIO(WorkQ ueueManager.jav a(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager. workerRun(WorkQ ueueManager.jav a(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.tcp. channel.impl.Wo rkQueueManager$ Worker.run(Work QueueManager.ja va(Compiled Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O at com.ibm.ws.util .ThreadPool$Wor ker.run(ThreadP ool.java(Compil ed Code))
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O Source Page is: /b2b/ErrorPage.jsp
[1/5/07 17:09:34:531 IST] 0000018c SystemOut O Connection being closed
=============== =============== =============== ============


Let me know if any additional information is required .

Thanks in advance.

Rergards,
Roh
1.) Does the error occur for the same page always?
2.)Do have access to code for the servlets.
Jan 8 '07 #2
roh
14 New Member
1.) Does the error occur for the same page always?
2.)Do have access to code for the servlets.
Thanks for the reply.

1.) Does the error occur for the same page always?
yes,the error occur for the same page always then we need to restart the server
to proceed further , after restarting the server we can access the same page with no errors.

2.)Do have access to code for the servlets.[/quote]
Yes we do have access to code.
Jan 8 '07 #3
r035198x
13,262 MVP
Thanks for the reply.

1.) Does the error occur for the same page always?
yes,the error occur for the same page always then we need to restart the server
to proceed further , after restarting the server we can access the same page with no errors.

2.)Do have access to code for the servlets.
Yes we do have access to code.[/quote]

Can you post code for the performTask method in the servlet MUProfileServle t with line 464 higlighted.

If it is too long just post the code for the area around line 464.
Jan 8 '07 #4
roh
14 New Member
Yes we do have access to code.
Can you post code for the performTask method in the servlet MUProfileServle t with line 464 higlighted.

If it is too long just post the code for the area around line 464.[/quote]

Please find following code.


else if (queryValue.toU pperCase().equa ls("SELECTED") )
{

try
{
/* Check for authorised User */
if (access == true || access2 == true)
{
String UserID = null;
String UserTypeIs = null;
String User = UtilBean.getPar ameter(getServl etConfig(),requ est, "selUser", true, false, false, "NA");
System.out.prin tln("********** **** Sel User ---> " + User);

StringTokenizer st = new StringTokenizer (User,":");
if (st.hasMoreToke ns())
{
UserID = st.nextToken();
}
if (st.hasMoreToke ns())
{
UserTypeIs = st.nextToken();
}

/* Check the UserType and forward to respective servlet */
if(UserTypeIs.t oUpperCase().eq ualsIgnoreCase( "DISTRIBUTO R"))
{
request.setAttr ibute("id", "Update");
request.setAttr ibute("UserID", UserID);
//System.out.prin tln("ClassName --> " + request.getClas s().toString() );
System.out.prin tln("Using request dispatcher");
RequestDispatch er rd = request.getRequ estDispatcher(" disProfile.DisP rofileServlet") ;
rd.forward(requ est,response);
//UtilBean.pageFo rward(getServle tContext(),requ est, response, "servlet/disProfile.DisP rofileServlet") ;

}
else /* sales force */
//if(UserTypeIs.t oUpperCase().eq uals("ASM") || UserTypeIs.toUp perCase().equal s("NSM") || UserTypeIs.toUp perCase().equal s("RSM") || UserTypeIs.toUp perCase().equal s("SRFO"))
{
//System.out.prin tln("********** *************** *************** ********");
request.setAttr ibute("mode", "Update");
request.setAttr ibute("UserID", UserID);
//System.out.prin tln("***User ID--->" + UserID);
request.setAttr ibute("UserType ", UserTypeIs);
//System.out.prin tln("***User Type--->" + UserTypeIs);
System.out.prin tln("Using Utilbean page forward");
UtilBean.pageFo rward(getServle tContext(),requ est, response, "servlet/salesProfile.Sa lesProfileContr olServlet");
//RequestDispatch er rd = getServlet.getR equestDispatche r("salesProfile .SalesProfileCo ntrolServlet");
//rd.forward(requ est,response);
}

}else /* Access denied to unathourised user */
{
Message = "MSG001";
errorOccured(re quest,response, mUBean,userType ,Message,retURL );

}
}
catch (Exception e)
{
Message = "CE00024";
e.printStackTra ce(System.out);
errorOccured(re quest,response, mUBean,userType ,Message,retURL );
}
finally
{
try
{
mUBean.closeCon nection();
}catch(Exceptio n e)
{}
}


let me know if any additional information is required.

Thanks
Jan 8 '07 #5
roh
14 New Member
if(UserTypeIs.t oUpperCase().eq ualsIgnoreCase( "DISTRIBUTO R"))
{
request.setAttr ibute("id", "Update");
request.setAttr ibute("UserID", UserID);
// Line no . 464

Thanks.
Jan 8 '07 #6
r035198x
13,262 MVP
Please find following code.


else if (queryValue.toU pperCase().equa ls("SELECTED") )
{

try
{
/* Check for authorised User */
if (access == true || access2 == true)
{
String UserID = null;
String UserTypeIs = null;
String User = UtilBean.getPar ameter(getServl etConfig(),requ est, "selUser", true, false, false, "NA");
System.out.prin tln("********** **** Sel User ---> " + User);

StringTokenizer st = new StringTokenizer (User,":");
if (st.hasMoreToke ns())
{
UserID = st.nextToken();
}
if (st.hasMoreToke ns())
{
UserTypeIs = st.nextToken();
}

/* Check the UserType and forward to respective servlet */
if(UserTypeIs.t oUpperCase().eq ualsIgnoreCase( "DISTRIBUTO R"))
{
request.setAttr ibute("id", "Update");
request.setAttr ibute("UserID", UserID);
//System.out.prin tln("ClassName --> " + request.getClas s().toString() );
System.out.prin tln("Using request dispatcher");
RequestDispatch er rd = request.getRequ estDispatcher(" disProfile.DisP rofileServlet") ;
rd.forward(requ est,response);
//UtilBean.pageFo rward(getServle tContext(),requ est, response, "servlet/disProfile.DisP rofileServlet") ;

}
else /* sales force */
//if(UserTypeIs.t oUpperCase().eq uals("ASM") || UserTypeIs.toUp perCase().equal s("NSM") || UserTypeIs.toUp perCase().equal s("RSM") || UserTypeIs.toUp perCase().equal s("SRFO"))
{
//System.out.prin tln("********** *************** *************** ********");
request.setAttr ibute("mode", "Update");
request.setAttr ibute("UserID", UserID);
//System.out.prin tln("***User ID--->" + UserID);
request.setAttr ibute("UserType ", UserTypeIs);
//System.out.prin tln("***User Type--->" + UserTypeIs);
System.out.prin tln("Using Utilbean page forward");
UtilBean.pageFo rward(getServle tContext(),requ est, response, "servlet/salesProfile.Sa lesProfileContr olServlet");
//RequestDispatch er rd = getServlet.getR equestDispatche r("salesProfile .SalesProfileCo ntrolServlet");
//rd.forward(requ est,response);
}

}else /* Access denied to unathourised user */
{
Message = "MSG001";
errorOccured(re quest,response, mUBean,userType ,Message,retURL );

}
}
catch (Exception e)
{
Message = "CE00024";
e.printStackTra ce(System.out);
errorOccured(re quest,response, mUBean,userType ,Message,retURL );
}
finally
{
try
{
mUBean.closeCon nection();
}catch(Exceptio n e)
{}
}


let me know if any additional information is required.

Thanks
Can you indicate which one is line 464?
Jan 8 '07 #7
roh
14 New Member
Can you indicate which one is line 464?
Sorry,

else if (queryValue.toU pperCase().equa ls("SELECTED") )
{

try
{
/* Check for authorised User */
if (access == true || access2 == true)
{
String UserID = null;
String UserTypeIs = null;
String User = UtilBean.getPar ameter(getServl etConfig(),requ est, "selUser", true, false, false, "NA");
System.out.prin tln("********** **** Sel User ---> " + User);

StringTokenizer st = new StringTokenizer (User,":");
if (st.hasMoreToke ns())
{
UserID = st.nextToken();
}
if (st.hasMoreToke ns())
{
UserTypeIs = st.nextToken();
}

/* Check the UserType and forward to respective servlet */
if(UserTypeIs.t oUpperCase().eq ualsIgnoreCase( "DISTRIBUTO R"))
{
request.setAttr ibute("id", "Update");
request.setAttr ibute("UserID", UserID);//System.out.prin tln("ClassName --> " + request.getClas s().toString() );
System.out.prin tln("Using request dispatcher");
RequestDispatch er rd = request.getRequ estDispatcher(" disProfile.DisP rofileServlet") ;
rd.forward(requ est,response);
//UtilBean.pageFo rward(getServle tContext(),requ est, response, "servlet/disProfile.DisP rofileServlet") ;

}
else /* sales force */
//if(UserTypeIs.t oUpperCase().eq uals("ASM") || UserTypeIs.toUp perCase().equal s("NSM") || UserTypeIs.toUp perCase().equal s("RSM") || UserTypeIs.toUp perCase().equal s("SRFO"))
{
//System.out.prin tln("********** *************** *************** ********");
request.setAttr ibute("mode", "Update");
request.setAttr ibute("UserID", UserID);
//System.out.prin tln("***User ID--->" + UserID);
request.setAttr ibute("UserType ", UserTypeIs);
//System.out.prin tln("***User Type--->" + UserTypeIs);
System.out.prin tln("Using Utilbean page forward");
UtilBean.pageFo rward(getServle tContext(),requ est, response, "servlet/salesProfile.Sa lesProfileContr olServlet");
//RequestDispatch er rd = getServlet.getR equestDispatche r("salesProfile .SalesProfileCo ntrolServlet");
//rd.forward(requ est,response);
}

}else /* Access denied to unathourised user */
{
Message = "MSG001";
errorOccured(re quest,response, mUBean,userType ,Mess age,retURL);

}
}
catch (Exception e)
{
Message = "CE00024";
e.printStackTra ce(System.out);
errorOccured(re quest,response, mUBean,userType ,Mess age,retURL);
}
finally
{
try
{
mUBean.closeCon nection();
}catch(Exceptio n e)
{}
}
Jan 8 '07 #8
r035198x
13,262 MVP
Sorry,

else if (queryValue.toU pperCase().equa ls("SELECTED") )
{

try
{
/* Check for authorised User */
if (access == true || access2 == true)
{
String UserID = null;
String UserTypeIs = null;
String User = UtilBean.getPar ameter(getServl etConfig(),requ est, "selUser", true, false, false, "NA");
System.out.prin tln("********** **** Sel User ---> " + User);

StringTokenizer st = new StringTokenizer (User,":");
if (st.hasMoreToke ns())
{
UserID = st.nextToken();
}
if (st.hasMoreToke ns())
{
UserTypeIs = st.nextToken();
}

/* Check the UserType and forward to respective servlet */
if(UserTypeIs.t oUpperCase().eq ualsIgnoreCase( "DISTRIBUTO R"))
{
request.setAttr ibute("id", "Update");
request.setAttr ibute("UserID", UserID);//System.out.prin tln("ClassName --> " + request.getClas s().toString() );
System.out.prin tln("Using request dispatcher");
RequestDispatch er rd = request.getRequ estDispatcher(" disProfile.DisP rofileServlet") ;
rd.forward(requ est,response);
//UtilBean.pageFo rward(getServle tContext(),requ est, response, "servlet/disProfile.DisP rofileServlet") ;

}
else /* sales force */
//if(UserTypeIs.t oUpperCase().eq uals("ASM") || UserTypeIs.toUp perCase().equal s("NSM") || UserTypeIs.toUp perCase().equal s("RSM") || UserTypeIs.toUp perCase().equal s("SRFO"))
{
//System.out.prin tln("********** *************** *************** ********");
request.setAttr ibute("mode", "Update");
request.setAttr ibute("UserID", UserID);
//System.out.prin tln("***User ID--->" + UserID);
request.setAttr ibute("UserType ", UserTypeIs);
//System.out.prin tln("***User Type--->" + UserTypeIs);
System.out.prin tln("Using Utilbean page forward");
UtilBean.pageFo rward(getServle tContext(),requ est, response, "servlet/salesProfile.Sa lesProfileContr olServlet");
//RequestDispatch er rd = getServlet.getR equestDispatche r("salesProfile .SalesProfileCo ntrolServlet");
//rd.forward(requ est,response);
}

}else /* Access denied to unathourised user */
{
Message = "MSG001";
errorOccured(re quest,response, mUBean,userType ,Mess age,retURL);

}
}
catch (Exception e)
{
Message = "CE00024";
e.printStackTra ce(System.out);
errorOccured(re quest,response, mUBean,userType ,Mess age,retURL);
}
finally
{
try
{
mUBean.closeCon nection();
}catch(Exceptio n e)
{}
}
That line does not look like it can possibly throw a class cast exception unless maybe if the User id is not set in which case I'd expect a null pointer exception.

Note, however, that the code

try
{
mUBean.closeCon nection();
}catch(Exceptio n e)
{}

does not handle any exceptions, instead it hides it which is not good pratice. If an exception occurs there you cannot tell if it happened or not.
Back to that error Is that servlet trying to forward to another servlet?
Jan 8 '07 #9
roh
14 New Member
Thanks for your suggestion i will handle that exception .

Yes , Servlet is forwarding request to the another servlet.
Jan 8 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2285
by: Agoston Bejo | last post by:
Hi. x1.asp: <form method="post" action="x2.asp"> .... </form> x2.asp: DoSomeAdministration() Response.Redirect "x3.asp?" & Request.Form x3.asp: further processsing of data
8
1452
by: John J | last post by:
Thankyou to those people in this newsgroup that have answered my questions and helped me to learn whilst developing my yacht race classes. I have now completed the three classes (Yacht, Race and Entry) and created ..cpp to test the classes. Everything compiles without fault; however, when I run the program the first part of the expected output is not displayed. I thought there may have been a buffer setting in my compiler so I tried...
6
5989
by: Samuel M. Smith | last post by:
I have been playing around with a subclass of dict wrt a recipe for setting dict items using attribute syntax. The dict class has some read only attributes that generate an exception if I try to assign a value to them. I wanted to trap for this exception in a subclass using super but it doesn't happen. I have read Guido's tutorial on new style classes and Shalabh's tuturial on new style attributes and methods, and thought I understood...
3
4066
by: Rahul Anand | last post by:
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously from a .NET Web Application hosted on IIS. In our setup the web request form a client can be running for long duration (may be more than 4 hours). We are getting exceptions during the HTTP send/receive inside the web service method. The exception...
0
1571
by: Mahesh Devjibhai Dhola | last post by:
Hi, I am getting the following exception when using webservice.. "The underlying connection was closed: An unexpected error occurred on a receive" I am not getting any innerexception so no clue for the reason. While i was seaching on web, i found the solutions but its not working for me. I have already override the method on client proxy but its not working, protected override System.Net.WebRequest GetWebRequest(Uri uri) {
5
4082
by: shreya | last post by:
I have a jsp CustomerLogin.jsp which takes customerid and a servlet forwarding request object to another jsp records.jsp. In this records.jsp i have a button calling another jsp Customer.jsp.I want request object i.e customerid here.How can i get that.Using request dispatcher displays both records.jsp and customer.jap in same page.I dont want that Pls help..
1
2487
by: thomas | last post by:
Hello all, It seems like subdomain forwarding prevents ASP.Net session state from working correctly. Example: two websites http://www.jgphotographers.com/test and http://picturestore.newpicturestore.com/test - the first one works - the counter using session state increases every time the button is clicked. The second one uses subdomain forwarding with masking. The "picturestore"
2
2064
by: Dimitri Furman | last post by:
SQL Server 2000 SP4. Running the script below prints 'Unexpected': ----------------------------- DECLARE @String AS varchar(1) SELECT @String = 'z' IF @String LIKE ''
6
3491
by: mcl | last post by:
I have a domain name which is set up for web forwarding with a frame. I have a link on one of the site's pages to an external site. When I select the link the external site is displayed correctly with its own URL in the address bar. When I select the <backbutton in the browser, my domain name appears temporarily in the browser, but it returns to the external site. If I look at back History (In Firefox) there are two entries for my...
0
8395
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6166
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.