• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception thrown from the servlet service function

 
Ishu Saxena
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ishu Saxena
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without looking at the code of TNE_Expense_Local_Action.jsp, its tough to say what might be going wrong.
 
Ishu Saxena
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply. Here is the file. Not sure if it would be very helpful though

 
Swastik Dey
Rancher
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even the stack trace doesn't show anything?
 
Stefan Evans
Bartender
Pie
Posts: 1669
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic