Bug #5096


.NET: FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found

Added by T Hata about 2 years ago. Updated 7 months ago.

Start date:
Due date:
% Done:


Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:


I'm upgrading Saxon .NET to 10.6. Now, setting the catalog file throws an exception.

Unhandled Exception: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl, saxon-ee-10.6, Version=10.6, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6 not found

Sample code:

System.Uri catalog = new System.Uri( @"c:\test\catalog.xml" );
Saxon.Api.Processor processor = new Saxon.Api.Processor();
processor.SchemaManager.Catalog = catalog.ToString();

Related issues

Related to Saxon - Bug #5306: Saxon 11.1 breaks my code (SAXParserFactory.newInstance() problem is back)ClosedNorm Tovey-Walsh2022-02-11

Actions #1

Updated by Michael Kay almost 2 years ago

This looks like a recurrence of bug #2305, though the dynamic loading failure might be for different reasons.

Actions #2

Updated by Michael Kay over 1 year ago

I suspect the problem might be the change from four-part to two-part version numbers. For the dynamic loading, we need to give the version number of the DLL as .NET understands it, which is probably or similar, rather than 10.6. In DotNetPlatform.setDefaultSAXParserFactory we're picking up the version number using Version.getProductVersion(), which gives us the two-part version number.

Actions #3

Updated by Michael Kay over 1 year ago

  • Related to Bug #5306: Saxon 11.1 breaks my code (SAXParserFactory.newInstance() problem is back) added
Actions #4

Updated by Michael Kay about 1 year ago

I'm not able to reproduce the problem, which makes it difficult to test a fix.

However, the code introduced by bug #2305 is still present in DotNetPlatform line 496:

System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl, saxon-"+editionCode+"-"+ Version.getProductVersion() +", Version="+ Version.getProductVersion()+", Culture=neutral, PublicKeyToken=e1fdd002d5083fe6");

and this produces the string "Version=10.8" (on the current build), whereas the actual assembly version is

I'm therefore going to take a punt on this and append ".0.0" to the version number in this line of code, and hope that the problem goes away.

Actions #5

Updated by Michael Kay about 1 year ago

  • Category set to .NET API
  • Status changed from New to Resolved
  • Assignee set to Michael Kay
  • Applies to branch 10 added
  • Fix Committed on Branch 10 added
  • Platforms .NET added

Closing this in the hope that the version number mismatch is the actual issue.

Actions #6

Updated by O'Neil Delpratt 7 months ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 10.9 added

Bug fix applied in the Saxon 10.9 maintenance release.

Please register to edit this issue

Also available in: Atom PDF