• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Strange null exception on Tomcat 6.0.18

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a big problem with removing attributes by Tomcat 6.0.18. This happens after migrating from Tomcat 5.5.23 (on this version there wasn't such error). Exception occur occasionally and for now I don't know how to resolve it. Below there is a stack trace from error:



Anyone know how to resolve it, please?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looking at the source code around line 1354 for Tomcat 6.0.18 we find:


Looks like if context is null you get an NPE

Around line 500 there are setContext and getContext methods - this is the normal javax.servlet.ServletContext we are talking about.

To further track this down, you might try calling the request getContext method to see if it is null before calling the removeAtribute method.

Bill
 
Slawek Ch
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now I'm using Tomcat 6.0.9 problem doesn't occur. It happens only from version 6.0.10 or higher. Maybe it is Tomcat new bug.

Anyway thanks for suggestion.
 
If you're gonna buy things, buy this thing and I get a fat kickback:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic