You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Jochen Walz <jo...@googlemail.com> on 2022/06/17 13:16:29 UTC

Karaf 4.3.6: XMLSchemaFactory not found.

Hi,

When calling SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI) to prepare validation of an XML structure with an XSD, I get an error that the Xerces XMLSchemaFactory is not found although the Servicemix Xerces bundle is installed and the respective package exported. We use Java 17.02 to run Karaf.

Temporarily using the system class loader for that call and then setting it back to the previous class loader helps. But that looks bit like a hack.

Is there a better way to make it work?

For the JAXB marshaller/unmarshaller, there was a similar issue some time ago. I haven't checked whether that's still there, too.

Thanks!

Regards,
Jochen

Re: Karaf 4.3.6: XMLSchemaFactory not found.

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Jochen

Which SMX Xerces bundle version are you using ?

Regards
JB

On Fri, Jun 17, 2022 at 3:16 PM Jochen Walz
<jo...@googlemail.com> wrote:
>
> Hi,
>
> When calling SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI) to prepare validation of an XML structure with an XSD, I get an error that the Xerces XMLSchemaFactory is not found although the Servicemix Xerces bundle is installed and the respective package exported. We use Java 17.02 to run Karaf.
>
> Temporarily using the system class loader for that call and then setting it back to the previous class loader helps. But that looks bit like a hack.
>
> Is there a better way to make it work?
>
> For the JAXB marshaller/unmarshaller, there was a similar issue some time ago. I haven't checked whether that's still there, too.
>
> Thanks!
>
> Regards,
> Jochen