Issue1077

classification
Title: Standalone installation fails
Type: Severity: normal
Components: Installer Versions: 2.5alpha1
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: otmarhumbel Nosy List: cartman, leosoto, otmarhumbel
Priority: Keywords: patch

Created on 2008-07-17.11:41:47 by cartman, last changed 2008-09-13.16:53:54 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
avoid-duplicate-class-files.patch leosoto, 2008-07-17.21:13:50
Messages
msg3343 (view) Author: İsmail Dönmez (cartman) Date: 2008-07-17.11:41:45
Tested on MacOSX and Ubuntu, when you select Standalone installation, it
fails in the final part with :

Exception in thread "Thread-7"
org.python.util.install.InstallerException: Error accessing jar file
        at
org.python.util.install.JarInstaller.inflate(JarInstaller.java:156)
        at
org.python.util.install.ProgressPage.activate(ProgressPage.java:82)
        at
org.python.util.install.AbstractWizardPage.doActivate(AbstractWizardPage.java:39)
        at
org.python.util.install.AbstractWizard.showActivePage(AbstractWizard.java:414)
        at
org.python.util.install.AbstractWizard.next(AbstractWizard.java:319)
        at
org.python.util.install.AbstractWizard.gotoNextPage(AbstractWizard.java:215)
        at
org.python.util.install.AbstractWizardValidator.fireValidationSucceeded(AbstractWizardValidator.java:78)
        at
org.python.util.install.AbstractWizardValidator.access$100(AbstractWizardValidator.java:6)
        at
org.python.util.install.AbstractWizardValidator$ValidatorThread.run(AbstractWizardValidator.java:16)
Caused by: java.util.zip.ZipException: duplicate entry:
org/python/core/PyArray.class
        at
java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:192)
        at
java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:109)
        at
org.python.util.install.StandalonePackager.addJarFile(StandalonePackager.java:92)
        at
org.python.util.install.JarInstaller.inflate(JarInstaller.java:143)
        ... 8 more
msg3350 (view) Author: Leonardo Soto (leosoto) Date: 2008-07-17.20:47:49
Looks like the distributed jython-complete.jar contains *two*
PyArray.class files:

$ jar tvf jython-complete.jar  | grep PyArray.class 
 24230 Tue Jul 15 15:30:08 CLT 2008 org/python/core/PyArray.class
 29563 Tue Jul 15 15:30:14 CLT 2008 org/python/core/PyArray.class

I suspect that the installer unpacks the original jython-complete.jar to
merge it with Lib/ (and possibly other stuff) on the stand-alone  jar.
Then, it finds two entries for the same file and crashes.
msg3352 (view) Author: Leonardo Soto (leosoto) Date: 2008-07-17.21:13:50
The source of the problem seems to be the following lines of build.xml:

    <target name="jar-complete" depends="compile,expose,jarjar">
       <jar destfile="${dist.dir}/jython-complete.jar">
          <fileset dir="${compile.dir}"/>   
          <fileset dir="${exposed.dir}"/>
          <fileset dir="${jarjar.dir}">

This would explain the two PyArray.class files: One for the non-exposed
version from ${compile.dir} and another from ${exposed}.dir

I'm attaching a patch to put first the exposed class into the jar and
use the duplicate="preserve" attribute on the task, to completely avoid
duplicates.
msg3355 (view) Author: Leonardo Soto (leosoto) Date: 2008-07-19.22:07:41
Ok, I tested the patch and it works, but it doesn't gives a working
stand-alone jython yet:

$ java -jar jython-complete.jar 
Exception in thread "main" Traceback (most recent call last):
  (no code object) at line 0
ImportError: No module named os
msg3492 (view) Author: Oti Humbel (otmarhumbel) Date: 2008-09-08.21:56:54
maybe a duplicate of #1070
History
Date User Action Args
2008-09-13 16:53:54fwierzbickisetstatus: open -> closed
resolution: fixed
2008-09-08 21:56:54otmarhumbelsetassignee: otmarhumbel
messages: + msg3492
nosy: + otmarhumbel
2008-07-19 22:07:42leosotosetkeywords: + patch
messages: + msg3355
2008-07-17 21:13:50leosotosetfiles: + avoid-duplicate-class-files.patch
messages: + msg3352
2008-07-17 20:47:50leosotosetnosy: + leosoto
messages: + msg3350
2008-07-17 11:41:47cartmancreate