users@glassfish.java.net

Re: Glasfish v3 Webservice does not work after restart

From: <glassfish_at_javadesktop.org>
Date: Wed, 19 May 2010 14:13:17 PDT

Unfortunately I haven't made up a reproducible case yet.

I use GF2.1.1 with JDK 6 update 20.
Web services are created through NetBeans as I said in a previous post.
I always deploy my war through autodeploy feature.
My war contains 6 web services, but the problem happens with just 2 of them, always the same. Sometimes one is available and the other isn't, sometimes the other way round.

Some more info I have gathered through a debugging session: the problem is in the getAdapter() method in ContextAdapter class defined in JAXWSAdapterRegistry.
The ws for which the wsdl is unavailable cannot be found in the fixedUrlPatternEndpoints map and the pathUrlPatternEndpoints map is empty.
This results in a null targetEndpoint returned to JAXWSServlet doGet():

// normal WSDL retrieval invocation
        try {
            ServletAdapter targetEndpoint = (ServletAdapter) getEndpointFor(request);
            if (targetEndpoint != null) {
                targetEndpoint.publishWSDL(getServletContext(), request, response);
            } else {
                String message =
                "Invalid wsdl request " + request.getRequestURL();
                (new WsUtil()).writeInvalidMethodType(response, message);
            }
        } catch(Throwable t) {
            ServletException se = new ServletException();
            se.initCause(t);
            throw se;
        }


Is there a way to debug the filling of these maps ? I guess I have to trace GF startup process rather than attaching to it when startup is complete but I could not find a way to do that.

--
[Message sent by forum member 'raypettas']
http://forums.java.net/jive/thread.jspa?messageID=470568