aspose file tools*
The moose likes JSP and the fly likes exception thrown from the servlet service function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "exception thrown from the servlet service function" Watch "exception thrown from the servlet service function" New topic
Author

exception thrown from the servlet service function

Ishu Saxena
Greenhorn

Joined: Jun 24, 2008
Posts: 25
Fellow Ranchers,

There's this application I have been working on for some time now and has been running very well till the 28th of Feb'11. Staring 01st March, I started getting the following error accessing that page.



I pulled out the server logs and all they mention is the following:






This is just a snippet I pulled out from the log file. Not very sure what could be causing this problem. Any pointers/inputs would be highly appreciated.

Regards


--<br />SCJP 5.0
Ishu Saxena
Greenhorn

Joined: Jun 24, 2008
Posts: 25
Just to add on here, this application was written way back circa 2001-02 and contains just JSP, HTML, CSS files and POJO's
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1398
    
    6

Without looking at the code of TNE_Expense_Local_Action.jsp, its tough to say what might be going wrong.


Swastik
Ishu Saxena
Greenhorn

Joined: Jun 24, 2008
Posts: 25
Thanks for your reply. Here is the file. Not sure if it would be very helpful though

Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1398
    
    6

Does the log says any thing else like type of exception? And avoid using scriptlets in jsp, use el,jstl etc. Using scriplets is a very old practice.
Ishu Saxena
Greenhorn

Joined: Jun 24, 2008
Posts: 25
Well, it doesn't say pretty much anything else. Here's the log for 04th March:




And yeah, you're right abount not using scriptlets, but as I mentioned, this was developed way back and redoing this unfortunately is not an option.
Regards
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1398
    
    6



May be you should have another look TNE_Fin_Expense_Form_jsp.

Probably you could try another way, surround the entire code in try catch, print the exception stacktrace and see if you get something.

Ishu Saxena
Greenhorn

Joined: Jun 24, 2008
Posts: 25
I tried wrapping the whole thing in 'try-catch' block...it doesn't seem to work..
Just wondering if this could be something related to configuration settings of APACHE/iPlanet?
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1398
    
    6

Even the stack trace doesn't show anything?
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
Could be related to configuration, but more likely to be your code.

I don't see that much date related stuff in this code. You say it happened after 1 Mar. That sounds like an artificial boundary to me.
As in somewhere you have configured in the system "valid dates" and that list now needs to be added to.

Thats a big JSP. A lot of it seems to be duplicate code, and fingers itch for refactoring...
Can you narrow down which area of code might be a problem? Does this error occur happen on various parameter values?

You are finding out first hand why it is recommended not to use scriptlets in JSP - they are a demon to debug.
This particular exception being logged (from the exception handler) is hiding the real cause of the problem.

What server is this you are using? Tomcat? iPlanet? What version?
What version of java?

If you can't get a stacktrace that shows the root error, then the next resort would be peppering the JSP with log statements so that you can track at which point it is blowing up on you.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

See how much time you are wasting? Step 1 should have been to move all of this code out of the JSP and into a Java class where it belongs and where it is much easier to debug and refactor.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exception thrown from the servlet service function
 
Similar Threads
Scope of the object
jsp:include not working on iP6
an error I cannot figure out
log and application.log difference
Java code File and FileWriter