java.io.IOException: Underlying input stream returned zero bytes

Jenkins JIRA | DEMEY Emmanuel | 2 years ago
  1. 0

    Hi everyone, I spent few hours on that issue yesterday afternoon and this morning, without any solutions :(. I have a freestyle job that will generate a JSLint XML report thanks to the ESLint Quality tool. (pwd and ls are just debugging ;)) {code} npm install ./node_modules/bower/bin/bower install node ./node_modules/eslint/bin/eslint --config config/eslint.json --rulesdir config/rules --format jslint-xml -o lint.xml --quiet app/javascript || true pwd ls {code} I have configured the Warning Plugin to parse the lint.xml file with the JSLint parser. When I run my Job, here is the output : {code} [testworkflowgrunt-ci-1] $ /bin/bash -xe /tmp/hudson3519419950863763056.sh + npm install npm WARN package.json tutoGruntWorkflow@1.0.0 No repository field. + ./node_modules/bower/bin/bower install + node ./node_modules/eslint/bin/eslint --config config/eslint.json --rulesdir config/rules --format jslint-xml -o lint.xml --quiet app/javascript + true + pwd /DATA/jenkins/workspace/testworkflowgrunt-ci-1 + ls app bower.json checkstyle.xml config grunt Gruntfile.js jslint.xml lint.xml node_modules package.json README.md [WARNINGS] Parsing warnings in files 'lint.xml' with parser JSLint [WARNINGS] Finding all files that match the pattern lint.xml [WARNINGS] Parsing 1 files in /DATA/jenkins/workspace/testworkflowgrunt-ci-1 [WARNINGS] Parsing of file /DATA/jenkins/workspace/testworkflowgrunt-ci-1/lint.xml failed due to an exception: java.io.IOException: Underlying input stream returned zero bytes at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:287) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.Reader.read(Reader.java:140) at org.apache.tools.ant.util.ReaderInputStream.read(ReaderInputStream.java:117) at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source) at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:195) at hudson.plugins.warnings.parser.LintParser.parse(LintParser.java:49) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:315) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:294) at hudson.plugins.warnings.parser.FileWarningsParser.parse(FileWarningsParser.java:53) at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264) at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2394) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Finished: SUCCESS {code} Have you already ssen this stacktrace ? I have checked the content of the XML file, and it looks OK : {code} <?xml version="1.0" encoding="utf-8"?><jslint><file name="app/javascript/test.js"><issue line="2" char="8" evidence="angular" reason="&apos;angular&apos; is not defined. (no-undef)" /></file></jslint> {code} Thanks a lot by advance. Manu

    Jenkins JIRA | 2 years ago | DEMEY Emmanuel
    java.io.IOException: Underlying input stream returned zero bytes
  2. 0

    Hi everyone, I spent few hours on that issue yesterday afternoon and this morning, without any solutions :(. I have a freestyle job that will generate a JSLint XML report thanks to the ESLint Quality tool. (pwd and ls are just debugging ;)) {code} npm install ./node_modules/bower/bin/bower install node ./node_modules/eslint/bin/eslint --config config/eslint.json --rulesdir config/rules --format jslint-xml -o lint.xml --quiet app/javascript || true pwd ls {code} I have configured the Warning Plugin to parse the lint.xml file with the JSLint parser. When I run my Job, here is the output : {code} [testworkflowgrunt-ci-1] $ /bin/bash -xe /tmp/hudson3519419950863763056.sh + npm install npm WARN package.json tutoGruntWorkflow@1.0.0 No repository field. + ./node_modules/bower/bin/bower install + node ./node_modules/eslint/bin/eslint --config config/eslint.json --rulesdir config/rules --format jslint-xml -o lint.xml --quiet app/javascript + true + pwd /DATA/jenkins/workspace/testworkflowgrunt-ci-1 + ls app bower.json checkstyle.xml config grunt Gruntfile.js jslint.xml lint.xml node_modules package.json README.md [WARNINGS] Parsing warnings in files 'lint.xml' with parser JSLint [WARNINGS] Finding all files that match the pattern lint.xml [WARNINGS] Parsing 1 files in /DATA/jenkins/workspace/testworkflowgrunt-ci-1 [WARNINGS] Parsing of file /DATA/jenkins/workspace/testworkflowgrunt-ci-1/lint.xml failed due to an exception: java.io.IOException: Underlying input stream returned zero bytes at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:287) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.Reader.read(Reader.java:140) at org.apache.tools.ant.util.ReaderInputStream.read(ReaderInputStream.java:117) at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source) at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:195) at hudson.plugins.warnings.parser.LintParser.parse(LintParser.java:49) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:315) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:294) at hudson.plugins.warnings.parser.FileWarningsParser.parse(FileWarningsParser.java:53) at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264) at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2394) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Finished: SUCCESS {code} Have you already ssen this stacktrace ? I have checked the content of the XML file, and it looks OK : {code} <?xml version="1.0" encoding="utf-8"?><jslint><file name="app/javascript/test.js"><issue line="2" char="8" evidence="angular" reason="&apos;angular&apos; is not defined. (no-undef)" /></file></jslint> {code} Thanks a lot by advance. Manu

    Jenkins JIRA | 2 years ago | DEMEY Emmanuel
    java.io.IOException: Underlying input stream returned zero bytes
  3. 0

    ktest --- timeout does not work well, exceptions thrown

    GitHub | 3 years ago | grosu
    java.util.concurrent.ExecutionException: java.io.IOException: Stream closed
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.io.IOException: Premature EOF in REST in java using jersey

    Stack Overflow | 4 years ago | Ali
    java.io.IOException: Premature EOF
  6. 0

    InputStreamReader java.io.IOException: Stream is closed

    Stack Overflow | 3 years ago | dodo
    java.io.IOException: Stream is closed

    7 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.io.IOException

      Underlying input stream returned zero bytes

      at sun.nio.cs.StreamDecoder.readBytes()
    2. Java RT
      Reader.read
      1. sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:287)
      2. sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
      3. sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
      4. java.io.InputStreamReader.read(InputStreamReader.java:184)
      5. java.io.Reader.read(Reader.java:140)
      5 frames
    3. Ant
      ReaderInputStream.read
      1. org.apache.tools.ant.util.ReaderInputStream.read(ReaderInputStream.java:117)
      1 frame
    4. Xerces2-j
      SAXParserImpl.parse
      1. org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)
      2. org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
      3. org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
      4. org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
      5. org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
      6. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      7. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      8. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      9. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      10. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      11. org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      12. org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
      12 frames
    5. Java RT
      SAXParser.parse
      1. javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
      1 frame
    6. hudson.plugins.warnings
      FileWarningsParser.parse
      1. hudson.plugins.warnings.parser.LintParser.parse(LintParser.java:49)
      2. hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:315)
      3. hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:294)
      4. hudson.plugins.warnings.parser.FileWarningsParser.parse(FileWarningsParser.java:53)
      4 frames
    7. Static Analysis Utilities
      FilesParser.invoke
      1. hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306)
      2. hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
      3. hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
      4. hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
      5. hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      5 frames
    8. Hudson
      FilePath$FileCallableWrapper.call
      1. hudson.FilePath$FileCallableWrapper.call(FilePath.java:2394)
      1 frame
    9. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:326)
      4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      4 frames
    10. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames