java.lang.RuntimeException: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic dmFsdWF0aW9uczp7dWZYc01lMVZGUVVISzMxcCtoZWx6N3VYdTAyUk1RK3FWVEdod0lGMnhYMD19

Jenkins JIRA | ashley_mercer | 7 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    We have a maven repository set up to require basic HTTP auth, and the passwords are encrypted in the settings.xml using the master password in security-settings.mxl in the usual way. In an M2 build, setting the build goal to "clean deploy" works fine, and the jars are correctly pushed to the repository. Using the post-build "Deploy artifacts to maven repository" task, however, fails with the following error: FATAL: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic dmFsdWF0aW9uczp7dWZYc01lMVZGUVVISzMxcCtoZWx6N3VYdTAyUk1RK3FWVEdod0lGMnhYMD19 java.lang.RuntimeException: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic dmFsdWF0aW9uczp7dWZYc01lMVZGUVVISzMxcCtoZWx6N3VYdTAyUk1RK3FWVEdod0lGMnhYMD19 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:883) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1904) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:376) at org.apache.maven.wagon.providers.http.LightweightHttpWagon.put(LightweightHttpWagon.java:153) at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:244) at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:160) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:80) at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:119) at hudson.maven.reporters.MavenAggregatedArtifactRecord.deploy(MavenAggregatedArtifactRecord.java:79) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:96) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:541) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:527) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:594) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:499) at hudson.model.Run.run(Run.java:1199) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:123) Given the extra line breaks after the encoded password, this appears to be related to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4615330 - so it looks like somewhere the password has \n appended when it's encoded.

    Jenkins JIRA | 7 years ago | ashley_mercer
    java.lang.RuntimeException: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic dmFsdWF0aW9uczp7dWZYc01lMVZGUVVISzMxcCtoZWx6N3VYdTAyUk1RK3FWVEdod0lGMnhYMD19
  2. 0

    Deploy with windows box throws error

    archiva-users | 7 years ago | Thorsten Scherler
    java.lang.RuntimeException: java.lang.IllegalArgumentException: Illegal characte r(s) in message header value: Basic bWlndWVsLnZhbGVuY2lhOns5ODBRQ29BaTNVZ0hyQy82 SkJCOGpTSCtic1EzTFE5SnZOZFprWG5i bzJnPX0=
  3. 0

    Unable to get past a java exception on host = null

    Stack Overflow | 2 years ago | Andy
    java.lang.RuntimeException: java.lang.IllegalArgumentException: protocol = http host = null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Bug ID: JDK-6459815 Long passwords cause Basic Auth to fail with a java.net.Authenticator

    java.com | 1 year ago
    java.lang.RuntimeException: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic ZGJvZGVuOntsbDEwfWRib2RlbnwxMTU1MDcyNjAzNTQwfDExNTUxMjY5Njk2Njh8dncrSjZZc2Zm V1BObzdFQnFlZXgyNVE0YThrPQ==

    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.RuntimeException

      java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic dmFsdWF0aW9uczp7dWZYc01lMVZGUVVISzMxcCtoZWx6N3VYdTAyUk1RK3FWVEdod0lGMnhYMD19

      at sun.net.www.protocol.http.HttpURLConnection.getInputStream()
    2. Java RT
      HttpURLConnection.getResponseCode
      1. sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:883)
      2. sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1904)
      3. java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:376)
      3 frames
    3. Maven
      DefaultArtifactDeployer.deploy
      1. org.apache.maven.wagon.providers.http.LightweightHttpWagon.put(LightweightHttpWagon.java:153)
      2. org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:244)
      3. org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:160)
      4. org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:80)
      4 frames
    4. Legacy Maven 2 job type Plugin
      MavenAggregatedArtifactRecord.deploy
      1. hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:119)
      2. hudson.maven.reporters.MavenAggregatedArtifactRecord.deploy(MavenAggregatedArtifactRecord.java:79)
      2 frames
    5. Hudson Maven Embedder
      RedeployPublisher.perform
      1. hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:96)
      1 frame
    6. Hudson
      AbstractBuild$AbstractRunner.performAllBuildStep
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:541)
      3. hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:527)
      3 frames
    7. Hudson Maven Embedder
      MavenModuleSetBuild$RunnerImpl.post2
      1. hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:594)
      1 frame
    8. Hudson
      Run.run
      1. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:499)
      2. hudson.model.Run.run(Run.java:1199)
      2 frames
    9. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
      1 frame
    10. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:88)
      2. hudson.model.Executor.run(Executor.java:123)
      2 frames