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

Spring 1.5.x should depend on Spring 2.0.x as a minimum requirement

    Details

    • Type: Refactoring
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.6
    • Component/s: Core
    • Labels:
      None

      Description

      Spring 1.5.x should depend on Spring 2.0.x as a minimum requirement and not Spring 2.5.x.

      Log4J trace logging causes problems when using Spring 2.0.x because the toURI() method in org.springframework.util.ResourceUtils is not available in Spring core 2.0.x.

      As a workaround, changing the log level to INFO should resolve the issue.

      We should run the test suite against Spring 2.0.x to see if other problems arise.

      1. SWS-459-jdk1.4.patch
        0.9 kB
        Tareq Abedrabbo
      2. SWS-459.patch
        1 kB
        Tareq Abedrabbo

        Issue Links

          Activity

          Hide
          tareq Tareq Abedrabbo added a comment -

          The real culprit is org.springframework.ws.transport.http.HttpUrlConnection#getUri which calls org.springframework.util.ResourceUtils#toURI. The former method is called from within org.springframework.ws.soap.addressing.client.ActionCallback#getTo, org.springframework.ws.server.endpoint.mapping.UriEndpointMapping#getLookupKeyForMessage as well as for logging purposes in a couple of classes and unit tests.
          An easy way to deal with org.springframework.util.ResourceUtils#toURI would be to inline it or copy it to a Spring-WS specific class. However, in order to insure a Spring 2.0 compatibility we might need to downgrade Spring's version in the POM as to make sure that no other Spring 2.5 specific method is being called or will be called for future versions.
          Sounds reasonable?

          Show
          tareq Tareq Abedrabbo added a comment - The real culprit is org.springframework.ws.transport.http.HttpUrlConnection#getUri which calls org.springframework.util.ResourceUtils#toURI. The former method is called from within org.springframework.ws.soap.addressing.client.ActionCallback#getTo, org.springframework.ws.server.endpoint.mapping.UriEndpointMapping#getLookupKeyForMessage as well as for logging purposes in a couple of classes and unit tests. An easy way to deal with org.springframework.util.ResourceUtils#toURI would be to inline it or copy it to a Spring-WS specific class. However, in order to insure a Spring 2.0 compatibility we might need to downgrade Spring's version in the POM as to make sure that no other Spring 2.5 specific method is being called or will be called for future versions. Sounds reasonable?
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          I think we should use SpringVersion to detect the version, and use some fancy reflection magic to work around this. This means that we can still leverage Spring 2.5, but not depend on it.

          Building on Spring 2.0 is not a good idea, IMO, because of the reason mentioned above. Running the testsuite against it should work, though. Unfortunately, the layout of the modules changed quite drastically in 2.5, so it's not as simple as just changing the spring.version property in the pom.

          Show
          arjen.poutsma Arjen Poutsma added a comment - I think we should use SpringVersion to detect the version, and use some fancy reflection magic to work around this. This means that we can still leverage Spring 2.5, but not depend on it. Building on Spring 2.0 is not a good idea, IMO, because of the reason mentioned above. Running the testsuite against it should work, though. Unfortunately, the layout of the modules changed quite drastically in 2.5, so it's not as simple as just changing the spring.version property in the pom.
          Hide
          tareq Tareq Abedrabbo added a comment -
          • inlined org.springframework.util.ResourceUtils#toURI in org.springframework.ws.transport.http.HttpUrlConnection#getUri
          • similar issue in org.springframework.xml.sax.SaxUtils#getSystemId: replaced resource.getURI() with resource.getURL().toURI()

          Hopefully that does the trick.

          Show
          tareq Tareq Abedrabbo added a comment - inlined org.springframework.util.ResourceUtils#toURI in org.springframework.ws.transport.http.HttpUrlConnection#getUri similar issue in org.springframework.xml.sax.SaxUtils#getSystemId: replaced resource.getURI() with resource.getURL().toURI() Hopefully that does the trick.
          Hide
          tareq Tareq Abedrabbo added a comment -

          Restored compatibility to jdk 1.4 by replacing jdk 1.5 specific method calls. Tested on jdk 1.4.2/Tomcat 4.1.

          Show
          tareq Tareq Abedrabbo added a comment - Restored compatibility to jdk 1.4 by replacing jdk 1.5 specific method calls. Tested on jdk 1.4.2/Tomcat 4.1.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Reopened to apply the patch.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Reopened to apply the patch.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Applied the patch.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Applied the patch.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing old issues

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing old issues

            People

            • Assignee:
              tareq Tareq Abedrabbo
              Reporter:
              sschmidt Stefan Schmidt
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: