java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V

Sakai JIRA | Pascal-Nicolas Becker | 2 years ago
  1. 0

    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.

    Sakai JIRA | 2 years ago | Pascal-Nicolas Becker
    java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V
  2. 0

    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.

    Sakai JIRA | 2 years ago | Pascal-Nicolas Becker
    java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V
  3. 0

    Problem with proxy authentication

    GitHub | 8 months ago | un1kum
    java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Seeing this after updating service desk 1.2.5: {code} 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.ProxyAuthenticationStrategy.select(ProxyAuthenticationStrategy.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.createTunnelToTarget(DefaultRequestDirector.java:876) at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:781) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:614) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) 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:57) at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:380) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:229) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3398) at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1095) at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:977) at com.atlassian.analytics.client.upload.AnalyticsS3Client.getS3ObjectInputStream(AnalyticsS3Client.java:65) at com.atlassian.analytics.client.eventfilter.reader.RemoteListReader.getRemoteListObject(RemoteListReader.java:22) at com.atlassian.analytics.client.eventfilter.reader.RemoteListReader.readFilterList(RemoteListReader.java:17) at com.atlassian.analytics.client.eventfilter.parser.SimpleListParser.readSimpleFilterList(SimpleListParser.java:39) at com.atlassian.analytics.client.eventfilter.BlacklistFilter.readRemoteList(BlacklistFilter.java:52) at com.atlassian.analytics.client.upload.RemoteFilterRead.execute(RemoteFilterRead.java:27) at com.atlassian.sal.jira.scheduling.JiraPluginSchedulerService.run(JiraPluginSchedulerService.java:94) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) {code}

    Atlassian JIRA | 3 years ago | David Yu
    java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V
  6. 0

    Seeing this after updating service desk 1.2.5: {code} 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.ProxyAuthenticationStrategy.select(ProxyAuthenticationStrategy.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.createTunnelToTarget(DefaultRequestDirector.java:876) at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:781) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:614) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) 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:57) at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:380) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:229) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3398) at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1095) at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:977) at com.atlassian.analytics.client.upload.AnalyticsS3Client.getS3ObjectInputStream(AnalyticsS3Client.java:65) at com.atlassian.analytics.client.eventfilter.reader.RemoteListReader.getRemoteListObject(RemoteListReader.java:22) at com.atlassian.analytics.client.eventfilter.reader.RemoteListReader.readFilterList(RemoteListReader.java:17) at com.atlassian.analytics.client.eventfilter.parser.SimpleListParser.readSimpleFilterList(SimpleListParser.java:39) at com.atlassian.analytics.client.eventfilter.BlacklistFilter.readRemoteList(BlacklistFilter.java:52) at com.atlassian.analytics.client.upload.RemoteFilterRead.execute(RemoteFilterRead.java:27) at com.atlassian.sal.jira.scheduling.JiraPluginSchedulerService.run(JiraPluginSchedulerService.java:94) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) {code}

    Atlassian JIRA | 3 years ago | David Yu
    java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.apache.commons.codec.binary.Base64.<init>(I)V

      at org.apache.http.impl.auth.BasicScheme.<init>()
    2. Apache HttpClient
      CloseableHttpClient.execute
      1. org.apache.http.impl.auth.BasicScheme.<init>(BasicScheme.java:65)
      2. org.apache.http.impl.auth.BasicScheme.<init>(BasicScheme.java:84)
      3. org.apache.http.impl.auth.BasicSchemeFactory.newInstance(BasicSchemeFactory.java:64)
      4. org.apache.http.auth.AuthSchemeRegistry.getAuthScheme(AuthSchemeRegistry.java:113)
      5. org.apache.http.auth.AuthSchemeRegistry$1.create(AuthSchemeRegistry.java:149)
      6. org.apache.http.impl.client.AuthenticationStrategyImpl.select(AuthenticationStrategyImpl.java:175)
      7. org.apache.http.impl.client.TargetAuthenticationStrategy.select(TargetAuthenticationStrategy.java:43)
      8. org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge(HttpAuthenticator.java:154)
      9. org.apache.http.impl.client.HttpAuthenticator.authenticate(HttpAuthenticator.java:58)
      10. org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1057)
      11. org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:515)
      12. org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
      13. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
      14. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
      14 frames
    3. DSpace Kernel :: API and Implementation
      DOIOrganiser.main
      1. org.dspace.identifier.doi.DataCiteConnector.sendHttpRequest(DataCiteConnector.java:870)
      2. org.dspace.identifier.doi.DataCiteConnector.sendGetRequest(DataCiteConnector.java:792)
      3. org.dspace.identifier.doi.DataCiteConnector.sendMetadataGetRequest(DataCiteConnector.java:768)
      4. org.dspace.identifier.doi.DataCiteConnector.isDOIReserved(DataCiteConnector.java:248)
      5. org.dspace.identifier.doi.DataCiteConnector.updateMetadata(DataCiteConnector.java:671)
      6. org.dspace.identifier.DOIIdentifierProvider.updateMetadataOnline(DOIIdentifierProvider.java:412)
      7. org.dspace.identifier.doi.DOIOrganiser.update(DOIOrganiser.java:669)
      8. org.dspace.identifier.doi.DOIOrganiser.runCLI(DOIOrganiser.java:265)
      9. org.dspace.identifier.doi.DOIOrganiser.main(DOIOrganiser.java:82)
      9 frames