### Eclipse Workspace Patch 1.0 #P hive_trunk Index: accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java =================================================================== --- accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java (revision 1619663) +++ accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java (working copy) @@ -295,19 +295,23 @@ // by JAR spec, if there is a manifest, it must be the first entry in // the // ZIP. - File manifestFile = new File(dir, JarFile.MANIFEST_NAME); - ZipEntry manifestEntry = new ZipEntry(JarFile.MANIFEST_NAME); - if (!manifestFile.exists()) { - zos.putNextEntry(manifestEntry); - new Manifest().write(new BufferedOutputStream(zos)); + try{ + File manifestFile = new File(dir, JarFile.MANIFEST_NAME); + ZipEntry manifestEntry = new ZipEntry(JarFile.MANIFEST_NAME); + if (!manifestFile.exists()) { + zos.putNextEntry(manifestEntry); + new Manifest().write(new BufferedOutputStream(zos)); + } else { + InputStream is = new FileInputStream(manifestFile); + copyToZipStream(is, manifestEntry, zos); + } zos.closeEntry(); - } else { - InputStream is = new FileInputStream(manifestFile); - copyToZipStream(is, manifestEntry, zos); - } - zos.closeEntry(); - zipDir(dir, relativePath, zos, true); - zos.close(); + zipDir(dir, relativePath, zos, true); + } catch( Exception e) { + throw new RuntimeException("jarDir failed.", e); + } finally { + zos.close(); + } } private static void zipDir(File dir, String relativePath, ZipOutputStream zos, boolean start)