Project

Profile

Help

Bug #4253

IKVM.NET throws java.lang.NoClassDefFoundError: 'com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl'

Added by Jiri Dolejsi over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
.NET API
Sprint/Milestone:
-
Start date:
2019-07-15
Due date:
% Done:

100%

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

Description

.NET Framework 4.7, Saxon EE 9.9.1.4 When calling parse-xml-fragment:

` class Program { static Processor processor = new Processor(true);

    static string xslt = 
        @"<xsl:transform version='3.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>" +
        @" <xsl:template name='xsl:initial-template' > " +
        @"  <xsl:variable name='doc'>to je test</xsl:variable>" +
        @"  <xsl:sequence select='parse-xml-fragment($doc)'/>" +
        @" </xsl:template>" +
        @"</xsl:transform>";

    static void Main(string[] args)
    {
        XsltCompiler xsltCompiler = processor.NewXsltCompiler();
        xsltCompiler.XsltLanguageVersion = "3.0";
        XsltExecutable exec = xsltCompiler.Compile(new StringReader(xslt));
        Xslt30Transformer transf = exec.Load30();
        Serializer ser = processor.NewSerializer();
        StringWriter sw = new StringWriter();
        ser.SetOutputWriter(sw);
        transf.CallTemplate(null, ser);
        Console.WriteLine(sw.ToString());
     }

}`

History

#1 Updated by O'Neil Delpratt over 2 years ago

  • Category set to .NET API
  • Assignee set to O'Neil Delpratt
  • Applies to branch trunk added

Thanks for reporting this issue. We will investigate it and report back shortly.

#2 Updated by O'Neil Delpratt over 2 years ago

  • Status changed from New to In Progress

We have reproduced the error reported. This is indeed a bug. Related to the bug fix in the bug issue #4127.

This did slip through our maintenance release tests. What is happening here is the delegated XML parser used in parseXmlFragment is specifically the javax.xml.parsers.SAXParserFactory, which is not available in the .NET release. The fix here is to use the Xerces parser.

Working on the fix which will be available in the next maintenance release.

#3 Updated by O'Neil Delpratt over 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Fix Committed on Branch 9.9, trunk added

Bug fixed and committed to subversion available for the next maintenance release.

#4 Updated by O'Neil Delpratt over 2 years ago

  • Status changed from Resolved to In Progress

Leave bug issue open until we have reinstated tests

#5 Updated by O'Neil Delpratt over 2 years ago

I have added a test case for this bug issue to the nunit tests.

#6 Updated by Michael Kay over 2 years ago

The current state of the code on the Java platform is that JAXP is always being used to find a parser for parse-xml-fragment(), which brings us back to bug #4127. I have changed the code in JavaPlatform so that it attempts to instantiate com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl when doing parse-xml-fragment(), reverting to the JAXP-selected parser if the com.sun one is not available (e.g with a non-Oracle JDK).

#7 Updated by Michael Kay over 2 years ago

  • Status changed from In Progress to Resolved

Marking as resolved

#8 Updated by O'Neil Delpratt over 2 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.9.1.5 added

Bug fix applied in the Saxon 9.9.1.5 maintenance release.

Please register to edit this issue

Also available in: Atom PDF