dev@glassfish.java.net

Re: Classloading Issue When Deploying App

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Tue, 01 Sep 2009 14:34:16 -0400

An update on this:

The cause for this was identified. The webbeans RI code is using the
thread context classloader to load certain classes and the thread
context classloader was not set properly in that code path. In the
deployment framework, we were only setting the thread context
classloader properly in the normal code paths (for
Deployer.prepare/load, ApplicationContainer.start). And in this
particular case, the web beans integration code was using the events and
the thread context classloader was not set properly there.

I have a fix which I have tested locally. I will check it in after
running the usual tests. And then Roger can verify once more from his
end with the latest workspace.

- Hong

Hong Zhang wrote:

> Hi, Roger
>
>> I've determined that
>> http://download.java.net/glassfish/v3/nightly/glassfish-v3-b60-08_16_2009.zip
>> works fine,
>> but the following build:
>> http://download.java.net/glassfish/v3/nightly/glassfish-v3-b61-08_20_2009.zip
>>
>> does not. There also seems to be a gap in the nightlies: from the
>> 16th to the 20th.
>>
> Thanks for narrowing down the timeframe.
>
> What's the steps to reproduce this issue? Can you send the test case
> and the steps?
>
> - Hong
>
>>
>> Hong Zhang wrote:
>>
>>> Hi, Roger
>>> Can you try to narrow down the timeframe when the regression
>>> happened?
>>> What's the complete stack trace? And how to reproduce the problem?
>>>
>>> - Hong
>>>
>>>
>>> Roger Kitain wrote:
>>>
>>>> Hi Amy -
>>>>
>>>> No, I am not running in embedded mode.
>>>>
>>>> -roger
>>>> Amy Roh wrote:
>>>>
>>>>> Hi Roger,
>>>>>
>>>>> Did you get the xerces NPE from deploying a WebBeans app to v3
>>>>> (non-embedded)? I was getting this in embedded mode and thought
>>>>> it was an issue with embedded mode (in embedded jar). Perhaps,
>>>>> this is an overall v3 issue if it happens in non-embedded mode also.
>>>>>
>>>>> Amy
>>>>>
>>>>> Roger Kitain wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I've checked out and build the latest v3 source.
>>>>>> I'm running to some classloading issues when deploying a WebBeans
>>>>>> application.
>>>>>> The same application deploys fine from an older v3 build (Aug 12).
>>>>>>
>>>>>> Code such as:
>>>>>>
>>>>>> Thread.currentThread().getContextClassLoader().loadClass("javax.faces.context.FacesContext")
>>>>>> is
>>>>>> evals to null whereas in previous build of v3 it worked fine.
>>>>>>
>>>>>> In addition I'm also running into xerces related errors:
>>>>>>
>>>>>> javax.xml.parsers.FactoryConfigurationError: Provider
>>>>>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
>>>>>> could not be instantiated: java.lang.NullPointerException
>>>>>> at
>>>>>> javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:129)
>>>>>>
>>>>>> at
>>>>>> org.jboss.webbeans.xml.BeansXmlParser.parse(BeansXmlParser.java:120)
>>>>>> at
>>>>>> org.jboss.webbeans.bootstrap.BeanDeployment.parseBeansXml(BeanDeployment.java:101)
>>>>>>
>>>>>>
>>>>>> Again - this all worked fine in a previous build.
>>>>>>
>>>>>> -roger
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>>
>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>