History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OSMORC-102
Type: Exception Exception
Status: Closed Closed
Resolution: Obsolete
Priority: Normal Normal
Assignee: Unassigned
Reporter: Thomas Singer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Osmorc

ZipException: duplicate entry

Created: 09 Jan 09 17:40   Updated: 10 Sep 09 14:51
Component/s: None
Affects Version/s: None
Fix Version/s: 0.12.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. File net.jmage.tip.todo.iml (4 kb)

Environment: Idea build #9618, Osmorc version 0.11.0


 Description  « Hide

java.util.zip.ZipException: duplicate entry:
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.addFileOrDirRecursively(ZipUtil.java:93)
at org.osmorc.make.BundleCompiler.buildBundle(BundleCompiler.java:380)
at org.osmorc.make.BundleCompiler.process(BundleCompiler.java:246)
at com.intellij.compiler.impl.FileProcessingCompilerAdapter.process(FileProcessingCompilerAdapter.java:6)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:711)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:284)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:228)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:804)
at com.intellij.compiler.impl.CompileDriver.access$400(CompileDriver.java:572)
at com.intellij.compiler.impl.CompileDriver$4.run(CompileDriver.java:6)
at com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:160)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:3)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:5)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:101)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:16)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:3)
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:9)



 All   Comments   Work Log   Change History      Sort Order:
Robert F. Beeger - 09 Jan 09 21:59
Do your additional JAR contents for a module contain something like this
Source file Destination file
c:\myp\mymod\lib lib
c:\myp\mymod\lib\m.jar lib/m.jar

In this case m.jar was already copied into the jar for the first entry and the second one will yield the shown exception.

I wonder that it doesn't show the duplicate entry though. Normally it appears directly after the colon.

Anyways, we probably should catch this exception and tell the user to check the additional JAR contents specification.


Thomas Singer - 09 Jan 09 22:17
I've attached the project file. Maybe the reason is, that I was too lazy to enter the right side value?

Robert F. Beeger - 10 Jan 09 16:52
Yes that's the problem. All files are mapped to "". I wonder what the JAR will look like if only one of them is mapped to "". Seems strange. I'll add a check that will nag the user to specify at least something on the right side.

Note: The upcoming version - the code is already available in our Subversion repository - makes the specification of additional JAR content much more convenient. After choosing "icons/000.png" as the source file, it will propose "icons/000.png" as the destination. Also note that to include all files in "icons/" you can add "icons/" as a source folder. Then the whole contents of the icons folder will be copied into the JAR.


Thomas Singer - 10 Jan 09 18:36
I'm currently using the revision 176 from the SVN repository and want to add some comments about the new behaviour:
  • don't display the absolute path in the Source column, but rather display the path relative to the module directory, if the module directory is a parent
  • double-clicking a row should open the edit dialog
  • it's not obvious, that the right column is editable
  • after clicking Edit, I've got a source-path-choosing dialog followed by the target-path-dialog - two ways to edit the same?
  • btw, I've first used *.xml in the second dialog by mistake - maybe that should be prevented
  • btw, the first tab is named "Geneeral" - one e too much

Robert F. Beeger - 10 Jan 09 22:19
  • don't display the absolute path in the Source column, but rather display the path relative to the module directory, if the module directory is a parent

Yes, I also thought about that when I implemented it. I'll add a renderer for that column soon that will replace module and project prefixes with something shorter. Maybe MODULE-DIR and PROJECT_DIR or something like that. Anyways the way the table displays the data can and will be improved.

  • double-clicking a row should open the edit dialog

Yes, I'll add this.

  • it's not obvious, that the right column is editable

I'm searching for a way to make it more visible. As far as I know there is nothing in IDEA that I could apply here and that would directly tell users "I'm editable".

  • after clicking Edit, I've got a source-path-choosing dialog followed by the target-path-dialog - two ways to edit the same?

Well not really. When you choose the source path part, you choose something that already exists. The destination part does not exist yet and therefore there's nothing you could choose from.

  • btw, I've first used *.xml in the second dialog by mistake - maybe that should be prevented

That's a good point, I'll add a check that will make sure that the input for the destination is a valid path definition.

  • btw, the first tab is named "Geneeral" - one e too much

Thanks.