Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49112

Get more information of 'java.nio.charset.UnmappableCharacterException'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins v2.103
      Win7 x86
      Java 1.8.0_152
    • Similar Issues:

      Description

      When building with Jenkins the PostBuildStep fails with an Exception

      17:01:07 ERROR: Step ‘Post build task’ aborted due to exception:
      17:01:07 java.nio.charset.UnmappableCharacterException: Input length = 1
      17:01:07     at java.nio.charset.CoderResult.throwException(CoderResult.java:282)
      17:01:07     at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
      17:01:07     at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
      17:01:07     at java.io.InputStreamReader.read(InputStreamReader.java:184)
      17:01:07     at java.io.BufferedReader.fill(BufferedReader.java:161)
      17:01:07     at java.io.BufferedReader.read1(BufferedReader.java:212)
      17:01:07     at java.io.BufferedReader.read(BufferedReader.java:286)
      17:01:07     at hudson.Util.loadFile(Util.java:199)
      17:01:07     at hudson.model.Run.getLog(Run.java:1953)
      17:01:07     at hudson.plugins.postbuildtask.PostbuildTask.perform(PostbuildTask.java:99)
      17:01:07     at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      17:01:07     at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      17:01:07     at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      17:01:07     at hudson.model.Build$BuildExecution.post2(Build.java:186)
      17:01:07     at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      17:01:07     at hudson.model.Run.execute(Run.java:1752)
      17:01:07     at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      17:01:07     at hudson.model.ResourceController.execute(ResourceController.java:97)
      17:01:07     at hudson.model.Executor.run(Executor.java:429)

       

      How do I find more information on this and the cause of this error?
      The build failed without any configuration changes or updates on jenkins.

        Attachments

          Issue Links

            Activity

            Show
            oleg_nenashev Oleg Nenashev added a comment - CC Daniel Trebbien . Maybe it's another follow-up to https://github.com/jenkinsci/jenkins/commit/67076834a24f03b832ab03b1bf9b96e05a5da81e#diff-7bec82f0a647b1592b682a66e7cc6bcf
            Hide
            dtrebbien Daniel Trebbien added a comment -

            Oleg, yes, it appears so. Until charset handling is really fixed (e.g. by JENKINS-48923), I think the best course of action here is to revert the change to Util.loadFile(), add an exception block similar to https://github.com/jenkinsci/jenkins/pull/3255, and add a comment within Util.loadFile() explaining why Files.newBufferedReader() is not used.

            I will prepare a pull request...

            Show
            dtrebbien Daniel Trebbien added a comment - Oleg, yes, it appears so. Until charset handling is really fixed (e.g. by JENKINS-48923 ), I think the best course of action here is to revert the change to Util.loadFile(), add an exception block similar to https://github.com/jenkinsci/jenkins/pull/3255 , and add a comment within Util.loadFile() explaining why Files.newBufferedReader() is not used. I will prepare a pull request...
            Hide
            oleg_nenashev Oleg Nenashev added a comment -
            Show
            oleg_nenashev Oleg Nenashev added a comment - Daniel Trebbien thanks!
            Show
            dtrebbien Daniel Trebbien added a comment - https://github.com/jenkinsci/jenkins/pull/3259
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Trebbien
            Path:
            core/src/main/java/hudson/Util.java
            http://jenkins-ci.org/commit/jenkins/e798f64854be85141ab7ba610c3a8ee0b093f36b
            Log:
            JENKINS-49112 Revert use of Files.newBufferedReader() in Util.loadFile() (#3259)

            • JENKINS-49112 Revert use of Files.newBufferedReader() in Util.loadFile()

            This partially reverts 67076834a24f03b832ab03b1bf9b96e05a5da81e.

            • Restore the use of StringBuilder and reading into buf
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Trebbien Path: core/src/main/java/hudson/Util.java http://jenkins-ci.org/commit/jenkins/e798f64854be85141ab7ba610c3a8ee0b093f36b Log: JENKINS-49112 Revert use of Files.newBufferedReader() in Util.loadFile() (#3259) JENKINS-49112 Revert use of Files.newBufferedReader() in Util.loadFile() This partially reverts 67076834a24f03b832ab03b1bf9b96e05a5da81e. Restore the use of StringBuilder and reading into buf
            Hide
            danielbeck Daniel Beck added a comment -

            Resolved towards 2.104.

            Show
            danielbeck Daniel Beck added a comment - Resolved towards 2.104.

              People

              • Assignee:
                dtrebbien Daniel Trebbien
                Reporter:
                pedde Patrick Feistel
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: