mardi 3 mars 2015

Spring.Rest and Common.Logging 3.0 Compatability issues

I am deep in dll hell and have resorted to an open ended question here for some help. I use the springframework.net port in my web application and have recently upgraded to the pre-release 2.0 version. Everything is working correctly except for the new dependancy on commons.logging.


After a fair amount of googling I see that the previous common.logging 2.0 and the latest 3.0 are not compatable, but there is a workaround in the form of common.logging.core 3.0. After implementing that everything works fine.


However now I have had to upgrade Spring.Social.Twitter and Spring.Social.LinkedIn, which both have a dependancy on Spring.Rest ( 1.1.1.35040 ). The Spring.Rest library still has a dependancy on common.logging 2.0.


I thought that by simply slipping a binding redirect into my web.config all would be well, but it is not. When accessing anything from the Spring.Rest.RestTemplate class it fails with "Method not found: 'Common.Logging.ILog Common.Logging.LogManager.GetLogger(System.Type)'."


The culprit is here inside RestTemplate



private static readonly Common.Logging.ILog LOG = Common.Logging.LogManager.GetLogger(typeof(RestTemplate));


here is my binding redirect



<dependentAssembly>
<assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>


I have tried every solution I can think of to get around this but am lost and desperately need a fix. Any help would really be appreciated.


Aucun commentaire:

Enregistrer un commentaire