Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-198

SaajUtils wrong way to detect SAAJ version

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0.2
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Weblogic 9

      Description

      WL9 only supports J2EE1.4 (SAAJ1.2) but somehow has a SAAJ1.3 class javax.xml.soap.SAAJMetaFactory. we checked the application WEB-INF/lib does not have any saaj-api.jar, we checked other jars free of a similarly named class.
      Now SaajUtils.java in spring-ws uses Class.forName to load that class to decide that the SAAJ version is 1.3 but at runtime you get the NoSuchMethod trying to instantiate the MessageFactory with the new 1.3 newInstance() which takes a string url instead of the 1.2 newInstance() which does not take any arguments.
      I logged a bug because this is a bad way to detect the version and WL9 proves this point. maybe you can add a property to tell SaajUtils which version of SAAJ or fall back on the NoSuchMethod Exception instead of ClassNotFound if that is the only difference from spring perspective. several people are hitting this issue and are forced to hack around it but the real resolution should be in code. Hope this makes since.

        Attachments

          Activity

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              ielian Iyad Elian
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: