Xalan: XSLTC ErrorMsg is sometimes constructed incorrectly, leading to java.util.MissingResourceException

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 8
    • Component/s: xml
    • None

      There are two places where this can happen:

      Parser.java: method parse(InputSource input) - line 492:

              catch (SAXException e) {
                  reportError(ERROR, new ErrorMsg(e.getMessage()));
              }

      ErrorMsg(String) expects a localization bundle key - a _code - but is passed an exception message.

      TransformerFactoryImpl.java: method newTemplates(Source source) - lines 789-792:

                  catch (Exception e) {
                      ErrorMsg err = new ErrorMsg(
                                           new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)
                                           + e.getMessage());
                      throw new TransformerConfigurationException(err.toString());
                  }

      Here again the first ErrorMsg(String) expects a localization bundle key - a _code - but is passed an exception message.

      This affects version 8 - but the fix can probably be backported to version 7...

            Assignee:
            Joe Wang
            Reporter:
            Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: