dev@glassfish.java.net

Re: Issue 247 NPE when acessing web resource

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Mon, 14 Aug 2006 09:17:22 -0700

Sameer Tyagi wrote On 08/14/06 07:35,:

> Actually the error returned is not a 503 but is a 404.
> HTTP Status 404 - Not found.


I should have been more precise: As of AS 9.1 b12, the
response error code is 503.

Jan



>
> /s
>
>
>
>
>
> Vijay Ramachandran wrote:
>
>> Reposting Jan's analysis to jaxws mailing lists
>>
>> JAXWS team - can you please take a look
>>
>> Thanks
>>
>> Vijay
>>
>> On Thu, 2006-08-10 at 17:31, Jan Luehe wrote:
>>
>>
>>> Vijay Ramachandran wrote On 08/10/06 10:11,:
>>>
>>>
>>>
>>>> Jan - can you please take a look at this ?
>>>>
>>>>
>>>>
>>>
>>> From the stacktrace, I can see that you are getting the
>>> ClassCastException (involving
>>> com.sun.xml.xwss.SystemHandlerDelegateFactory) during deployment, when
>>> your webapp is started and its context listener is invoked.
>>>
>>> I've searched all GlassFish issues for this exception and found:
>>>
>>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=247
>>>
>>> At that time, the exact exception was:
>>>
>>> Caused by: java.lang.ClassCastException:
>>> com.sun.xml.xwss.SystemHandlerDelegateFactory cannot be cast to
>>> com.sun.xml.ws.spi.runtime.SystemHandlerDelegateFactory
>>>
>>> Before 247 issue was fixed, accessing
>>>
>>> http://localhost:8080/WSpex-latest/TestService
>>>
>>> would cause a NPE.
>>>
>>> We've fixed 247 so that you now get a
>>>
>>> HTTP/1.1 503 Service Unavailable
>>>
>>> response, which is expected, since the webapp could not be
>>> started (due to the ClassCastException during execution of its context
>>> listener) and was therefore marked as unavailable.
>>>
>>> However, the underlying ClassCastException was never addressed,
>>> because 247 was just about the NPE!
>>>
>>> As you mention, this ClassCastException occurs only when bundling
>>> JAX-WS FCS and setting your classloader's "delegate" attribute to
>>> FALSE (in sun-web.xml).
>>>
>>> The ClassCastException suggests that in
>>>
>>> (com.sun.xml.ws.spi.runtime.SystemHandlerDelegateFactory) obj
>>>
>>> the
>>>
>>> com.sun.xml.ws.spi.runtime.SystemHandlerDelegateFactory
>>>
>>> extended by "obj" and the
>>>
>>> com.sun.xml.ws.spi.runtime.SystemHandlerDelegateFactory
>>>
>>> it is being cast to have been loaded by different classloaders.
>>>
>>> I think someone from jax-ws needs to take it from here.
>>>
>>>
>>> Jan
>>>
>>>
>>>
>>>> Thanks
>>>>
>>>> Vijay
>>>>
>>>> On Thu, 2006-08-10 at 10:09, Sameer Tyagi wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> I m trying to use JAX-WS Fcs but bunding it in web-inf/lib and
>>>>> using delegate
>>>>> in sun-web.xml
>>>>> This works for tango and rearch but not for FcS bits....
>>>>>
>>>>> /s
>>>>>
>>>>>
>>>>>
>>>>> Vijay Ramachandran wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Are you trying to use jaxws-rearch bits are jaxws2.0 bits ?
>>>>>>
>>>>>> Are you trying 109 based deployment or otherwise ?
>>>>>>
>>>>>> Including the jaxws mailing alias for their comment on this stack.
>>>>>>
>>>>>> Vijay
>>>>>>
>>>>>> On Thu, 2006-08-10 at 08:30, Sameer Tyagi wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Has this been resolved ?
>>>>>>> I just tried the latest build and tried to override the includes
>>>>>>> jars with other jars and
>>>>>>> get the same error again.
>>>>>>> I thought this had been fixed - looks like it has resurfaced ?
>>>>>>>
>>>>>>> Exception sending context initialized event to listener instance
>>>>>>> of class
>>>>>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
>>>>>>> WSSERVLET11: failed to parse runtime descriptor:
>>>>>>> javax.xml.ws.WebServiceException: java.lang.ClassCastException:
>>>>>>> com.sun.xml.xwss.SystemHandlerDelegateFactory
>>>>>>> at
>>>>>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:130)
>>>>>>>
>>>>>>> at
>>>>>>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)
>>>>>>>
>>>>>>> at
>>>>>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
>>>>>>>
>>>>>>> at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
>>>>>>> at org.apache.catalina.core.ContainerBase.addChildInternal(Contai
>>>>>>>
>>>>>>>
>>>>>>> /s
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>