[izpack-devel] izpack-devel Digest, Vol 11, Issue 9

Marius Nicolae mariusn007 at gmail.com
Thu May 10 13:48:45 CEST 2007


Hi Mark,

It doesn't matter if the uninstaller is run in GUI mode or in command
line mode. It still doesn't finish its job.

The problem seems to be that the installer runned with GUI creates an
uninstaller different from the one created by the AutomatedInstaller.
In fact, the difference is that the GUI-mode-generated uninstaller.jar
file has three more files at the end of the archive, namely:

rootScript
uninstallerJars
uninstallerListeners

and the uninstaller error from my previous mail seems to have been
caused by the absence of a rootScript file.

I took some time to look in the source code and I think that the
problem might be in the
writeUninstallData()  method found in
       com.izforge.izpack.installer.AutomatedInstaller.java
and also in
        com.izforge.izpack.installer.InstallerFrame.java

They seem to be quite different even though the comments say:
    /**
     * Writes the uninstalldata.
     *
     * Unfortunately, Java doesn't allow multiple inheritance, so
     *     <code>AutomatedInstaller</code>
     * and <code>InstallerFrame</code> can't share this code ... :-/
     *
     * TODO: We should try to fix this in the future.
     */

Thank you for the quick response. Keep me posted :-)

Best regards,
Marius Nicolae

> Date: Thu, 10 May 2007 08:29:03 +0200
> From: Marc Eppelmann <marc.eppelmann at gmx.de>
> Subject: Re: [izpack-devel] Uninstaller bug
> To: izpack-devel at lists.berlios.de
> Message-ID: <200705100829.03697.marc.eppelmann at gmx.de>
> Content-Type: text/plain;  charset="utf-8"
>
> Hi Marius,
>
> It seems that there is a Bug left from my last implemented Feature. I will
> review and fix it this weekend.
>
> PS: But why runs the uninstaller in GUI-Mode, even if the Installer was
> started in non-GUI Mode?
>
> Cheers
> Marc
>
> Am Wednesday 09 May 2007 schrieb Marius Nicolae:
> > Hi,
> >
> > I was trying to build a command line installer/uninstaller using IzPack.
> >
> > The install part can be automated with  an xml file. The uninstall
> > part can be resolved by adding the -c flag to the uninstaller.
> >
> > The problem:
> > If I run the installer without a GUI (using an .xml file as a
> > parameter), the uninstaller encounters a null pointer exception.
> >
> > I've attached a screenshot of the error message.
> >
> > NOTE: To reproduce the error do the following:
> > 1. Run the sample that comes with IzPack, save the xml script for
> > automated installation then uninstalled the sample.
> > 2. Run the installer with the xml script as a parameter. This should
> > install the sample again.
> > 3. Run the uninstaller from Sample Installation/Uninstaller
> >
> > Can we get around this in any way?
> >
> > Best regards,
> > Marius Nicolae
> >
> > PS: this is a copy of the log file. The error is displayed here also.
> > [myHome] represents my home folder
> >
> > 2007-05-09T13:30:26.934 Phase 1: JarFile: [myHome]/Sample
> > Installation/Uninstaller/uninstaller.jar
> > 2007-05-09T13:30:26.987 Phase 1: Extracted 119 files into /tmp/izpack9522.d
> > 2007-05-09T13:30:26.988 Phase 1: Spawning phase 2:
> >         /usr/lib/jvm/java-1.5.0-sun-1.5.0_update8/jre/bin/java
> >         -classpath
> >         /tmp/izpack9522.d
> >         -Dself.mod.base=/tmp/izpack9522
> >         -Dself.mod.jar=[myHome]/Sample
> > Installation/Uninstaller/uninstaller.jar
> > -Dself.mod.class=com.izforge.izpack.uninstaller.Uninstaller
> > -Dself.mod.method=uninstall
> >         -Dself.mod.phase=2
> >         com.izforge.izpack.uninstaller.SelfModifier
> > 2007-05-09T13:30:26.993 Phase 1: Exit
> > 2007-05-09T13:30:28.186 Phase 2: Spawning phase 3:
> >         /usr/lib/jvm/java-1.5.0-sun-1.5.0_update8/jre/bin/java
> >         -classpath
> >         /tmp/izpack9522.d
> >         -Dself.mod.base=/tmp/izpack9522
> >         -Dself.mod.jar=[myHome]/Sample
> > Installation/Uninstaller/uninstaller.jar
> > -Dself.mod.class=com.izforge.izpack.uninstaller.Uninstaller
> > -Dself.mod.method=uninstall
> >         -Dself.mod.phase=3
> >         com.izforge.izpack.uninstaller.SelfModifier
> > 2007-05-09T13:30:28.274 Phase 3: Invoking method:
> > com.izforge.izpack.uninstaller.Uninstaller.uninstall(String[] args)
> > 2007-05-09T13:30:28.514 Phase 3: Method returned, waiting for other threads
> > java.lang.NullPointerException
> >         at
> > java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2213)
> > at
> > java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:
> >2226) at
> > java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.
> >java:2694) at
> > java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:761) at
> > java.io.ObjectInputStream.<init>(ObjectInputStream.java:277) at
> > com.izforge.izpack.uninstaller.Destroyer.getRootScript(Destroyer.java:223)
> > at com.izforge.izpack.uninstaller.Destroyer.run(Destroyer.java:119)
> > 2007-05-09T13:32:04.024 Phase 2: deleteing sandbox
> > 2007-05-09T13:32:04.048 Phase 2: Phase 3 return value = 0
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 10 May 2007 09:22:59 +0200
> From: "Julien Ponge" <julien.ponge at gmail.com>
> Subject: Re: [izpack-devel] Uninstaller bug
> To: izpack-devel at lists.berlios.de
> Message-ID:
>         <9291ebe10705100022y48527f50t76064f51b1630283 at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Hi Mark,
>
> Should I delay 3.10.2?
>
> On 5/10/07, Marc Eppelmann <marc.eppelmann at gmx.de> wrote:
> > Hi Marius,
> >
> > It seems that there is a Bug left from my last implemented Feature. I will
> > review and fix it this weekend.
> >
> > PS: But why runs the uninstaller in GUI-Mode, even if the Installer was
> > started in non-GUI Mode?
> >
> > Cheers
> > Marc
> >
> > Am Wednesday 09 May 2007 schrieb Marius Nicolae:
> > > Hi,
> > >
> > > I was trying to build a command line installer/uninstaller using IzPack.
> > >
> > > The install part can be automated with  an xml file. The uninstall
> > > part can be resolved by adding the -c flag to the uninstaller.
> > >
> > > The problem:
> > > If I run the installer without a GUI (using an .xml file as a
> > > parameter), the uninstaller encounters a null pointer exception.
> > >
> > > I've attached a screenshot of the error message.
> > >
> > > NOTE: To reproduce the error do the following:
> > > 1. Run the sample that comes with IzPack, save the xml script for
> > > automated installation then uninstalled the sample.
> > > 2. Run the installer with the xml script as a parameter. This should
> > > install the sample again.
> > > 3. Run the uninstaller from Sample Installation/Uninstaller
> > >
> > > Can we get around this in any way?
> > >
> > > Best regards,
> > > Marius Nicolae
> > >
> > > PS: this is a copy of the log file. The error is displayed here also.
> > > [myHome] represents my home folder
> > >
> > > 2007-05-09T13:30:26.934 Phase 1: JarFile: [myHome]/Sample
> > > Installation/Uninstaller/uninstaller.jar
> > > 2007-05-09T13:30:26.987 Phase 1: Extracted 119 files into /tmp/izpack9522.d
> > > 2007-05-09T13:30:26.988 Phase 1: Spawning phase 2:
> > >         /usr/lib/jvm/java-1.5.0-sun-1.5.0_update8/jre/bin/java
> > >         -classpath
> > >         /tmp/izpack9522.d
> > >         -Dself.mod.base=/tmp/izpack9522
> > >         -Dself.mod.jar=[myHome]/Sample
> > > Installation/Uninstaller/uninstaller.jar
> > > -Dself.mod.class=com.izforge.izpack.uninstaller.Uninstaller
> > > -Dself.mod.method=uninstall
> > >         -Dself.mod.phase=2
> > >         com.izforge.izpack.uninstaller.SelfModifier
> > > 2007-05-09T13:30:26.993 Phase 1: Exit
> > > 2007-05-09T13:30:28.186 Phase 2: Spawning phase 3:
> > >         /usr/lib/jvm/java-1.5.0-sun-1.5.0_update8/jre/bin/java
> > >         -classpath
> > >         /tmp/izpack9522.d
> > >         -Dself.mod.base=/tmp/izpack9522
> > >         -Dself.mod.jar=[myHome]/Sample
> > > Installation/Uninstaller/uninstaller.jar
> > > -Dself.mod.class=com.izforge.izpack.uninstaller.Uninstaller
> > > -Dself.mod.method=uninstall
> > >         -Dself.mod.phase=3
> > >         com.izforge.izpack.uninstaller.SelfModifier
> > > 2007-05-09T13:30:28.274 Phase 3: Invoking method:
> > > com.izforge.izpack.uninstaller.Uninstaller.uninstall(String[] args)
> > > 2007-05-09T13:30:28.514 Phase 3: Method returned, waiting for other threads
> > > java.lang.NullPointerException
> > >         at
> > > java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2213)
> > > at
> > > java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:
> > >2226) at
> > > java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.
> > >java:2694) at
> > > java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:761) at
> > > java.io.ObjectInputStream.<init>(ObjectInputStream.java:277) at
> > > com.izforge.izpack.uninstaller.Destroyer.getRootScript(Destroyer.java:223)
> > > at com.izforge.izpack.uninstaller.Destroyer.run(Destroyer.java:119)
> > > 2007-05-09T13:32:04.024 Phase 2: deleteing sandbox
> > > 2007-05-09T13:32:04.048 Phase 2: Phase 3 return value = 0
> >
> >
> > _______________________________________________
> > izpack-devel mailing list
> > izpack-devel at lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/izpack-devel
> >
>
>
> ------------------------------
>
> _______________________________________________
> izpack-devel mailing list
> izpack-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/izpack-devel
>
>
> End of izpack-devel Digest, Vol 11, Issue 9
> *******************************************
>



More information about the izpack-devel mailing list