geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor (Commented) (JIRA)" <>
Subject [jira] [Commented] (GERONIMO-6185) SchemaFactory.newInstance() fails on IBM JDK
Date Fri, 07 Oct 2011 16:05:30 GMT


Jarek Gawor commented on GERONIMO-6185:

Here's what I figured so far.

SchemaFactory uses TCCL to find and load the implementation class. Since the TCCL is set to
the web/wab classloader which delegate to the system bundle classloader and since the bootdelegation
setting does not list org.apache.xerces.jaxp.* as a delegated package, the class load fails.
The same call works fine on Sun JVM since the SchemaFactory provider starts with com.sun package
name and we already list com.sun.* in bootdelegation property.

Adding org.apache.xerces.jaxp.* to tbe bootdelegation fixes the problem but I think it might
create problems on other JVMs. There is also a "osgi.compatibility.bootdelegation" system
property that can be set on Equinox (to true) which will check the system classloader as the
very last resort (after trying all the imports, dynamic imports, require-bundle, etc.) that
also works fine.

> SchemaFactory.newInstance() fails on IBM JDK
> --------------------------------------------
>                 Key: GERONIMO-6185
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: web
>    Affects Versions: 3.0
>            Reporter: Jarek Gawor
> On IBM JDK call to SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI) will
fail with the following exception if the TCCL is set to some other classloader besides the
system classloader (e.g. in calling this function in a web or wab application):
> java.lang.IllegalArgumentException: Provider org.apache.xerces.jaxp.validation.XMLSchemaFactory
not found
> 	at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message