Hi,

That piece of code was not changed since 2008 March and the application was 
working fine with this code more than half year.
I can't see any suspicious in that class, maybe you can:

    public void doFilter(ServletRequest request, ServletResponse response,
            FilterChain filterChain) throws IOException, ServletException {
        if (isMetadataRequest(request)) {           
            log.info("Metadata request (wsdl/xsd) received, performing 
synchronization.");

            synchronized (lock) {
                filterChain.doFilter(request, response);
            }
        } else {
            filterChain.doFilter(request, response); // row 54
        }
    }

    private boolean isMetadataRequest(ServletRequest request) {
        return request.getParameter("wsdl") != null || 
request.getParameter("WSDL") != null ||
                request.getParameter("xsd") != null;
    }

Cheers,

Bertalan Kis 

-----Original Message-----
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: 02 February 2010 12:53
To: Tomcat Users List
Subject: RE: NullPointerException in MimeHeaders

> From: Bertalan Kis [mailto:bertalan....@razorfish.com]
> Subject: RE: NullPointerException in MimeHeaders
> 
> com.dnaO2.openspace.client.filter.MetadataRequestSynchFilter.doFilter
> (MetadataRequestSynchFilter.java:54)

The above is the spot you should be looking at, since that's the only stack 
entry for your code.

One possible problem is incorrect variable scope, such as using a static or 
instance variable in a filter or servlet when you should be using a local one.  
Static and instance variables are shared by all requests, so any concurrent 
threads using them can trip each other up.  The same issue applies to 
request-specific information being stored in a session while multiple requests 
are being processed.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to