Priority
Normal
Type
Bug 
State
Fixed 
Assignee
Jan Thomä 
Subsystem
OSGi Support 
Affected versions
Fixed in
Fixed in build
Next build 
Visible to
All Users 
  • Submitted by   Irina Petrovskaya
    7 months ago (20 Jul 2009 18:13)
  • Updated by   root
    7 weeks ago (17 Jan 2010 20:17)
  • Jira: IDEA-49858
    (history, comments)

IDEA-49858

ZipException at java.util.zip.ZipOutputStream.putNextEntry

0
on changing osgi facet configuration (manifest location change + META-INF/spring entry adding to jar).
Occured once, the jar contents is correct

duplicate entry: META-INF/spring/: duplicate entry: META-INF/spring/
java.util.zip.ZipException: duplicate entry: META-INF/spring/
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)
at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)
at com.intellij.util.io.ZipUtil.addFileToZip(ZipUtil.java:70)
at com.intellij.util.io.ZipUtil.addDirToZipRecursively(ZipUtil.java:107)
at com.intellij.util.io.ZipUtil.addFileOrDirRecursively(ZipUtil.java:91)
at org.osmorc.make.BundleCompiler.addFileToJar(BundleCompiler.java:416)
at org.osmorc.make.BundleCompiler.buildBundle(BundleCompiler.java:336)
at org.osmorc.make.BundleCompiler.process(BundleCompiler.java:208)
at com.intellij.compiler.impl.FileProcessingCompilerAdapter.process(FileProcessingCompilerAdapter.java:6)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:323)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:755)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:57)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:905)
at com.intellij.compiler.impl.CompileDriver.access$600(CompileDriver.java:567)
at com.intellij.compiler.impl.CompileDriver$4.run(CompileDriver.java:24)
at com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:186)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:8)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:6)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:20)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:10)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:10)
Comments (3)
 
History (3)
 
Linked Issues (0)
 
Robert F. Beeger
  Robert F. Beeger
21 Jul 2009 01:24
(7 months ago)
#
Did you add META-INF/spring and META-INF to your additional jar contents?
Osmorc currently does not check for paths that are already contained in other paths in the list of additional jar contents.
Irina Petrovskaya
  Irina Petrovskaya
21 Jul 2009 15:23
(7 months ago)
#
i definitely get this exception when the added path is already included to jar (for example, if my manifest.mf file is located in src\main\java\META-INF, so that its 'spring' subfolder is added to jar automatically, and i add 'src\main\java\META-INF\spring' as additional jar contents path). In this case i get the exception always on attempt to build jar.
But in the above situation i've got it only once, and all the paths were correct. I'lll try to recreate the problem...
Jan Thomä
  Jan Thomä
24 Nov 2009 09:52
(3 months ago)
#
The zipping process is now done entirely with bnd. Since bnd takes care of duplicate paths, this issue is implicitely fixed. I have tried adding META-INF/spring and META-INF/spring/foo.xml to the list of files to add. This worked perfectly.