java.io.IOException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Create a job name in Hudson to build Nexus OSS using job name of "Nexus OSS". When org.sonatype.nexus.plugins.rest.SimpleDocumentationNexusResourceBundleTest.testDoc gets run, it fails. Looks like the encoded space gets translated to filesystem. {noformat} Error Message expected:<22> but was:<0> Stacktrace junit.framework.AssertionFailedError: expected:<22> but was:<0> at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.failNotEquals(Assert.java:280) at junit.framework.Assert.assertEquals(Assert.java:64) at junit.framework.Assert.assertEquals(Assert.java:198) at junit.framework.Assert.assertEquals(Assert.java:204) at org.sonatype.nexus.plugins.rest.SimpleDocumentationNexusResourceBundleTest.testDoc(SimpleDocumentationNexusResourceBundleTest.java:35) Standard Output [ERROR] Error discovering plugin documentation test java.io.IOException: error in opening zip file: /opt/grid/data/master/state/jobs/Nexus%20OSS/workspace/nexus/nexus-api/target/test-classes/docs.zip at org.sonatype.nexus.plugins.rest.SimpleDocumentationResourceBundle.getZipFile(SimpleDocumentationResourceBundle.java:49) at org.sonatype.nexus.plugins.rest.AbstractDocumentationNexusResourceBundle.getContributedResouces(AbstractDocumentationNexusResourceBundle.java:56) at org.sonatype.nexus.plugins.rest.SimpleDocumentationNexusResourceBundleTest.testDoc(SimpleDocumentationNexusResourceBundleTest.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102) at org.apache.maven.surefire.Surefire.run(Surefire.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:114) at java.util.zip.ZipFile.<init>(ZipFile.java:75) at org.sonatype.nexus.plugins.rest.SimpleDocumentationResourceBundle.getZipFile(SimpleDocumentationResourceBundle.java:45) ... 28 more Standard Error log4j:WARN No appenders could be found for logger (eu.medsea.mimeutil.TextMimeDetector). log4j:WARN Please initialize the log4j system properly. {noformat}
    via by Peter Lynch,
  • EPM 11.1.2.1 Installaion issue
    via by PrakashV,
  • OPERATING SYSTEM(S): All FULL JDK VERSION(S): java version "1.6.0_02" Java(TM) SE Runtime Environment (build 1.6.0_02-b06) Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode) DESCRIPTION: When JDK 6 is used for unzipping a zip file > 2GB in size, the following exception is thrown: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:114) at java.util.zip.ZipFile.<init>(ZipFile.java:75) at UnZip.main(UnZip.java:65) Exact steps to reproduce 1. Create a zip file > 2GB in size. 2. Write a simple java program to unzip the file using a Java program The following testcase was obtained from another sun bug: import java.io.*; import java.util.*; import java.util.zip.*; public class unzip { public static final void copyInputStream (InputStream in,OutputStream out) throws IOException { byte[] buffer = new byte [1024]; int len; while ((len = in.read(buffer)) >= 0) out.write(buffer, 0, len); in.close(); out.close(); } public static final void main (String[] args) { Enumeration entries; ZipFile zipFile=null; if (args.length != 1){ System.err.println("Usage: Unzip zipfile"); return; } try{ zipFile = new ZipFile(args[0]); }catch(IOException ioe){System.out.println("error opening the zipfile");ioe.printStackTrace();} ZipEntry entry=null; entries = zipFile.entries(); while (entries.hasMoreElements()){ System.out.println("Constructing ZipFile..."); entry = ( ZipEntry ) entries.nextElement(); } if (entry.isDirectory()){ // Assume directories are stored parents first then children System.err.println("Extracting directory: " + entry.getName()); // This is not robust, just for demonstration purposes. (new File(entry.getName())).mkdir(); //continue; } System.err.println("Extracting file: " + entry.getName()); try{ copyInputStream(zipFile.getInputStream(entry),new BufferedOutputStream(new FileOutputStream(entry.getName()))); System.out.print("Check memory usage and press 'Enter'..."); System.in.read(); zipFile.close(); }catch(IOException ioe){ioe.printStackTrace();} } }
    via by Erik Larsen,
  • OPERATING SYSTEM(S): All FULL JDK VERSION(S): java version "1.6.0_02" Java(TM) SE Runtime Environment (build 1.6.0_02-b06) Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode) DESCRIPTION: When JDK 6 is used for unzipping a zip file > 2GB in size, the following exception is thrown: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:114) at java.util.zip.ZipFile.<init>(ZipFile.java:75) at UnZip.main(UnZip.java:65) Exact steps to reproduce 1. Create a zip file > 2GB in size. 2. Write a simple java program to unzip the file using a Java program The following testcase was obtained from another sun bug: import java.io.*; import java.util.*; import java.util.zip.*; public class unzip { public static final void copyInputStream (InputStream in,OutputStream out) throws IOException { byte[] buffer = new byte [1024]; int len; while ((len = in.read(buffer)) >= 0) out.write(buffer, 0, len); in.close(); out.close(); } public static final void main (String[] args) { Enumeration entries; ZipFile zipFile=null; if (args.length != 1){ System.err.println("Usage: Unzip zipfile"); return; } try{ zipFile = new ZipFile(args[0]); }catch(IOException ioe){System.out.println("error opening the zipfile");ioe.printStackTrace();} ZipEntry entry=null; entries = zipFile.entries(); while (entries.hasMoreElements()){ System.out.println("Constructing ZipFile..."); entry = ( ZipEntry ) entries.nextElement(); } if (entry.isDirectory()){ // Assume directories are stored parents first then children System.err.println("Extracting directory: " + entry.getName()); // This is not robust, just for demonstration purposes. (new File(entry.getName())).mkdir(); //continue; } System.err.println("Extracting file: " + entry.getName()); try{ copyInputStream(zipFile.getInputStream(entry),new BufferedOutputStream(new FileOutputStream(entry.getName()))); System.out.print("Check memory usage and press 'Enter'..."); System.in.read(); zipFile.close(); }catch(IOException ioe){ioe.printStackTrace();} } }
    via by Erik Larsen,
  • Compile instructions
    via GitHub by mj10777
    ,
    • java.io.IOException: error in opening zip file: /opt/grid/data/master/state/jobs/Nexus%20OSS/workspace
    • exus
    • exus-api/target/test-classes/docs.zip at org.sonatype.nexus.plugins.rest.SimpleDocumentationResourceBundle.getZipFile(SimpleDocumentationResourceBundle.java:49) at org.sonatype.nexus.plugins.rest.AbstractDocumentationNexusResourceBundle.getContributedResouces(AbstractDocumentationNexusResourceBundle.java:56) at org.sonatype.nexus.plugins.rest.SimpleDocumentationNexusResourceBundleTest.testDoc(SimpleDocumentationNexusResourceBundleTest.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102) at org.apache.maven.surefire.Surefire.run(Surefire.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:114) at java.util.zip.ZipFile.<init>(ZipFile.java:75) at org.sonatype.nexus.plugins.rest.SimpleDocumentationResourceBundle.getZipFile(SimpleDocumentationResourceBundle.java:45) ... 28 more

    Users with the same issue

    davidvanlaatum
    89 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    58 more bugmates