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

NoSuchMethodError after upgrading to AXIOM 1.2.14

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.1.3
    • Component/s: None
    • Labels:
      None

      Description

      SEVERE: Servlet.service() for servlet [ws] in context with path [/settleinv] threw exception [Request processing failed; nested exception is java.lang.NoSuchMethodError: org.apache.axiom.soap.SOAPFactory.createSOAPMessage(Lorg/apache/axiom/om/OMXMLParserWrapper;)Lorg/apache/axiom/soap/SOAPMessage;] with root cause
      java.lang.NoSuchMethodError: org.apache.axiom.soap.SOAPFactory.createSOAPMessage(Lorg/apache/axiom/om/OMXMLParserWrapper;)Lorg/apache/axiom/soap/SOAPMessage;
      	at org.springframework.ws.soap.axiom.AxiomSoapMessage.<init>(AxiomSoapMessage.java:99)
      	at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:189)
      	at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:81)

      I attempted to add the compat additional JAR but that did not fix the problem looks like that Factory Method no longer takes an argument see https://issues.apache.org/jira/browse/AXIOM-412.

      http://ws.apache.org/axiom/userguide/ch04.html#changes-1.2.14

      1. SWS-822.patch
        0.8 kB
        Andreas Veithen
      2. SWS-822-part2.patch
        5 kB
        Andreas Veithen

        Activity

        mdiskin Mark Diskin created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Assignee Arjen Poutsma [ arjen.poutsma ]
        arjen.poutsma Arjen Poutsma made changes -
        Fix Version/s 2.1.3 [ 13897 ]
        Hide
        veithen Andreas Veithen added a comment -

        The issue is also described here:

        https://issues.apache.org/jira/browse/AXIOM-444

        I'm currently working on a fix in Axiom to restore compatibility, but the code in Spring-WS should definitely be changed because the method it attempts to use is considered an internal method.

        Show
        veithen Andreas Veithen added a comment - The issue is also described here: https://issues.apache.org/jira/browse/AXIOM-444 I'm currently working on a fix in Axiom to restore compatibility, but the code in Spring-WS should definitely be changed because the method it attempts to use is considered an internal method.
        Hide
        veithen Andreas Veithen added a comment -

        Attached a patch for this issue.

        Show
        veithen Andreas Veithen added a comment - Attached a patch for this issue.
        veithen Andreas Veithen made changes -
        Attachment SWS-822.patch [ 20839 ]
        Hide
        veithen Andreas Veithen added a comment -

        While working on the fix for Axiom, I discovered another potential issue (although I didn't see any test failures). The problem is that Spring-WS instantiates the SOAP factories (SOAP11Factory and SOAP12Factory) directly, while the recommended approach is to use OMAbstractFactory to locate the (singleton) factories. However, there is some code in Axiom that makes the assumption that factories are singletons, so this may cause problems.

        It should also be noted that SOAP11Factory and SOAP12Factory are part of axiom-impl, but application code is expected to only use classes from axiom-api (and in Maven projects, axiom-impl should be a dependency with scope runtime).

        I'll try to provide a patch for this issue as well.

        Show
        veithen Andreas Veithen added a comment - While working on the fix for Axiom, I discovered another potential issue (although I didn't see any test failures). The problem is that Spring-WS instantiates the SOAP factories (SOAP11Factory and SOAP12Factory) directly, while the recommended approach is to use OMAbstractFactory to locate the (singleton) factories. However, there is some code in Axiom that makes the assumption that factories are singletons, so this may cause problems. It should also be noted that SOAP11Factory and SOAP12Factory are part of axiom-impl, but application code is expected to only use classes from axiom-api (and in Maven projects, axiom-impl should be a dependency with scope runtime). I'll try to provide a patch for this issue as well.
        Hide
        veithen Andreas Veithen added a comment -

        Attached a patch for the SOAP factory issue.

        Show
        veithen Andreas Veithen added a comment - Attached a patch for the SOAP factory issue.
        veithen Andreas Veithen made changes -
        Attachment SWS-822-part2.patch [ 20840 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Fixed! Thanks for the patches.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Fixed! Thanks for the patches.
        arjen.poutsma Arjen Poutsma made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        83d 21h 7m 1 Arjen Poutsma 04/Apr/13 3:06 AM
        In Progress In Progress Resolved Resolved
        41m 1s 1 Arjen Poutsma 04/Apr/13 3:47 AM

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            mdiskin Mark Diskin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: