Issue Details (XML | Word | Printable)

Key: AXIS-439
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Assignee: Axis Developers Mailing List
Reporter: Tom Gerber
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Axis

AxisServletBase throws NullPointerException when destroying on Tomcat 3.3.1

Created: 16/Oct/02 02:59 PM   Updated: 24/Feb/04 12:24 AM
Return to search
Component/s: Basic Architecture
Affects Version/s: 1.0
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Operating System: Other
Platform: PC

Bugzilla Id: 13682


 Description  « Hide
Tomcat used to automagically reload my classes when I compiled. This does no
more work with Axis 1.0 (by the way, there is not version entry '1.0' for Axis
in Bugzilla).

The reason is that the destroying of the servlet fails. Stack trace:
2002-10-16 09:48:46 - Ctx(/axis) : Error in destroy -
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:380)
at org.apache.tomcat.core.Context.setAttribute(Context.java:792)
at org.apache.tomcat.facade.ServletContextFacade.setAttribute
(ServletContextFacade.java:121)
at org.apache.axis.transport.http.AxisServletBase.storeEngine
(AxisServletBase.java:238)
at org.apache.axis.transport.http.AxisServletBase.destroy
(AxisServletBase.java:174)
at org.apache.tomcat.facade.ServletHandler.doDestroy
(ServletHandler.java:379)

Fix: change the following method in
org/apache/axis/transport/http/AxisServletBase.java from:
//>>> old
    private static void storeEngine(ServletContext context, AxisServer engine) {
        context.setAttribute(ATTR_AXIS_ENGINE, engine);
    }
//<<< old

to this:

//>>> new
    private static void storeEngine(ServletContext context, AxisServer engine) {
        if (engine == null) {
            context.removeAttribute(ATTR_AXIS_ENGINE);
        } else {
            context.setAttribute(ATTR_AXIS_ENGINE, engine);
        }
    }
//<<< new

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.