Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1553

TunedDocumentLoader fails to resolve xsi prefix properly when not using WSTX.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.1, 2.0.7
    • Component/s: Configuration
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      I want to use Xerces, not WSTX. But if I remove WSTX from the CLASSPATH, the fallback mechanism at line 75 of TunedDocumentLoader fails. I believe WSTX defaults the "http://xml.org/sax/features/namespaces" property to true, whereas Xerces defaults it to false. As a result, you get a cryptic error:

      NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces

      The fix is to add this line:

      nsasaxParserFactory.setFeature("http://xml.org/sax/features/namespaces", true);

      After line 85 of org.apache.cxf.bus.spring.TunedDocumentLoader.

      On a side note, what is the reason for the fallback mechanism at org.apache.cxf.bus.spring.TunedDocumentLoader.java:75? Why not just rely on the JAXP mechanism to find implementations?

      • Chris

        Attachments

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              prophet36 Chris McClelland
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified