I have been having some difficulty using Axis beta3 with Weblogic 6.0, and have seen 
others having
similar problems in the mailing list archive - without resolution.

http://marc.theaimsgroup.com/?l=axis-user&m=101068604131056&w=2

I was getting an AbstractMethodError on the server from line 199 of
org.apache.axis.utils.XMLUtils.  Axis was expecting to be able to call getXMLReader() 
on an
instance of a SAXParser.  It should be able to expect this, after all it has been part 
of the JAXP
spec since 1.1.

Weblogic does provide a way to configure a different SAXParserFactory.  This is done 
by creating
an XMLRegistry (in config.xml) and then assigning it to your server.  Unfortunately, 
creating this
registry doesn't cause calls to SAXParserFactory.newInstance() to return your 
SAXParserFactoryImpl
- it doesn't set the system property javax.xml.parsers.SAXParserFactory to your 
supplied parser
factory class name.  Instead, it sets the system property to
weblogic.xml.jaxp.RegistrySAXParserFactory.  This smart/magic parser factory looks at 
your
currently configured XMLRegistry, and gives your application an instance of a 
RegistryParser that
proxies to the REAL parser.  I'm sure BEA did this for good reasons, like they want to 
reuse
instances of parsers or something.  The unfortunate result is that
weblogic.xml.jaxp.RegistryParser implements an old version of the org.xml.sax.Parser 
interface;
one without a getXMLReader() method.

    <XMLRegistry
        Name="crimsonXMLRegistry"
        DocumentBuilderFactory="org.apache.crimson.jaxp.DocumentBuilderFactoryImpl"
        SAXParserFactory="org.apache.crimson.jaxp.SAXParserFactoryImpl"/>

This means that no matter what shiny new interface is available to Axis, and no matter 
which of
these methods your impl supports, you will never be able to use them as long as you 
are accessing
them through an old proxy.

My current work around (ugly) is to have XMLUtils.initSAXFactory set the static member 
saxFactory
to a new org.apache.crimson.jaxp.SAXParserFactoryImpl.  For this to work, a new 
jaxp-api.jar
should be in the system classpath.

I propose that it be made possible to configure Axis's DocumentBuilderFactory and 
SAXParserFactory
independent of the system's default.  It is fine to use the default, but it would be 
nice to be
able to override this behavior - especially when working with an older application 
server.

Thanks,
Jeff

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

Reply via email to