dev@glassfish.java.net

Re: default StaX provider is com.bea ...???

From: Bhakti Mehta <Bhakti.Mehta_at_Sun.COM>
Date: Fri, 02 Mar 2007 11:34:44 -0800

Yes in javax.xml.stream.XMLInputFactory and XMLEventFactory there are
fallback classes hardcoded to bea's implementations.
JAXP uses the following lookup to bootstrap an implementation class
1.System property
2.META-INF/services of jars in classpath
3. Else it will fallback to the default implementation class which in
this case is bea

However if you have webservices-rt.jar in classpath you should be able
to use our stax implementation.
Let me know if you have issues
Regards,
Bhakti

kedar wrote:
> Hi Bhakti,
>
> Thanks for your response.
> Follow-up questions though -- is it that this name is
> hard-coded in one of the "API" classes? If yes, which
> API (javaee.jar) class is it declared in?
>
> Does similar happen with JAXP as well (for other parsers
> and their providers)?
>
> Regards,
> Kedar
>
> Bhakti Mehta wrote:
>> JSR 173 is the spec led by BEA and the jsr173_api,jar which gets
>> pulled into javaee.jar comes from BEA hence the default provider is
>> com.bea...
>> You are right that our implementation is in webservices-rt.jar
>>
>> Regards,
>> Bhakti
>>
>> kedar wrote:
>>> I ran a program to parse an XML using GlassFish V2 and JDK 5.
>>> I have javaee.jar in the classpath. And I am surprised to find
>>> that the default value of the provider implementation class
>>> is:
>>>
>>> com.bea.xml.stream.MXParserFactory!
>>>
>>> I understand that javaee.jar contains only the API, but then
>>> why is the default provider coming from "com.bea"? The detailed
>>> error is below.
>>>
>>> The StaX implementation integrated with GlassFish V2
>>> is in webservices-rt.jar, right?
>>>
>>> Thanks.
>>>
>>> 1.
>>>
>>> javax.xml.stream.FactoryConfigurationError: Provider
>>> com.bea.xml.stream.MXParserFactory not found
>>> at
>>> javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)
>>> at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176)
>>> at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
>>> at
>>> javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>