Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-2127

Upgrade commons-codec to version 1.9

    Details

    • Attachments:
      0
    • Comments:
      4
    • Documentation Status:
      Not Required

      Description

      Before releasing DSpace 5.0 we should upgrad commons-codec to a version >= 1.4. The newest version in maven central is 1.9 so I would suggest to use it.

      I yesterday noticed that the code to register DOIs at DataCite in the actual master branch produces the following error:
      Exception: org.apache.commons.codec.binary.Base64.<init>(I)V
      java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V
      at org.apache.http.impl.auth.BasicScheme.<init>(BasicScheme.java:65)
      at org.apache.http.impl.auth.BasicScheme.<init>(BasicScheme.java:84)
      at org.apache.http.impl.auth.BasicSchemeFactory.newInstance(BasicSchemeFactory.java:64)
      at org.apache.http.auth.AuthSchemeRegistry.getAuthScheme(AuthSchemeRegistry.java:113)
      at org.apache.http.auth.AuthSchemeRegistry$1.create(AuthSchemeRegistry.java:149)
      at org.apache.http.impl.client.AuthenticationStrategyImpl.select(AuthenticationStrategyImpl.java:175)
      at org.apache.http.impl.client.TargetAuthenticationStrategy.select(TargetAuthenticationStrategy.java:43)
      at org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge(HttpAuthenticator.java:154)
      at org.apache.http.impl.client.HttpAuthenticator.authenticate(HttpAuthenticator.java:58)
      at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1057)
      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:515)
      at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
      at org.dspace.identifier.doi.DataCiteConnector.sendHttpRequest(DataCiteConnector.java:870)
      at org.dspace.identifier.doi.DataCiteConnector.sendGetRequest(DataCiteConnector.java:792)
      at org.dspace.identifier.doi.DataCiteConnector.sendMetadataGetRequest(DataCiteConnector.java:768)
      at org.dspace.identifier.doi.DataCiteConnector.isDOIReserved(DataCiteConnector.java:248)
      at org.dspace.identifier.doi.DataCiteConnector.updateMetadata(DataCiteConnector.java:671)
      at org.dspace.identifier.DOIIdentifierProvider.updateMetadataOnline(DOIIdentifierProvider.java:412)
      at org.dspace.identifier.doi.DOIOrganiser.update(DOIOrganiser.java:669)
      at org.dspace.identifier.doi.DOIOrganiser.runCLI(DOIOrganiser.java:265)
      at org.dspace.identifier.doi.DOIOrganiser.main(DOIOrganiser.java:82)

      I found several questions and answers on Stackoverflow, resolving such issues by using commons-codec in a version >= 1.4, g.e.: http://stackoverflow.com/questions/7688644/java-lang-nosuchmethoderror-org-apache-commons-codec-binary-base64-encodebase64. This actually helped and the error above disappeared when I was compiling DSpace with commons-codec 1.9. I think the hole problem came up with upgrading commons-httpcomponents (DS-2091).

      The following classes in DSpace-API references commons-codec: org.dspace.eperson.EPerson, org.dspace.eperson.PasswordHash, org.dspace.content.packager/RoleIngester and some test classes. Beside dspace-api dspace-lni and dspace-sword use commons-codec as well. I use neither dspace-lni nor dspace-sword currently. So it would be great if anyone using could test it with an upgraded version of commons-codec.

      I think we should upgrade commons-codec as soon as possible and test it during the DSpace-5.0 testathron.

        Attachments

          Activity

            People

            • Assignee:
              pbecker Pascal-Nicolas Becker
              Reporter:
              pbecker Pascal-Nicolas Becker
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: