[SWS-459] Spring 1.5.x should depend on Spring 2.0.x as a minimum requirement Created: 09/Dec/08  Updated: 04/May/12  Resolved: 12/Jan/09

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.5.6

Type: Refactoring Priority: Major
Reporter: Stefan Schmidt Assignee: Tareq Abedrabbo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File SWS-459-jdk1.4.patch     Text File SWS-459.patch    
Issue Links:
Duplicate
is duplicated by SWS-467 Issues while generating of WSDL using... Closed

 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.



 Comments   
Comment by Tareq Abedrabbo [ 09/Dec/08 ]

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?

Comment by Arjen Poutsma [ 09/Dec/08 ]

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.

Comment by Tareq Abedrabbo [ 16/Dec/08 ]
  • 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.

Comment by Tareq Abedrabbo [ 23/Dec/08 ]

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

Comment by Arjen Poutsma [ 23/Dec/08 ]

Reopened to apply the patch.

Comment by Arjen Poutsma [ 12/Jan/09 ]

Applied the patch.

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Thu Dec 14 09:48:45 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.