NPE while running a web installer

View: New views
2 Messages — Rating Filter:   Alert me  

NPE while running a web installer

by Laurent Cohen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm attempting to create a web installer. The installer generation seems to go well, and as far as I know all pack files and the web installer itself are properly generated.
However, when running the installer, after selection of the packs to install, I get the following stack:

java.lang.NullPointerException while trying to download http://www.jppf.org/download/2.0/JPPF-2.0-Web-Installer.pack-JPPF Driver.jar
com.izforge.izpack.installer.InstallerException: Installation failed
  at com.izforge.izpack.installer.Unpacker.getPackAsStream(Unknown Source)
  at com.izforge.izpack.installer.Unpacker.run(Unknown Source)
  at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
  at com.izforge.izpack.installer.WebRepositoryAccessor.getCachedUrl(Unknown Source)
  ... 3 more

I checked that the file is there and I was able to download it from Firefox by copy/pasting the URL printed in the stack.

My environment:
IzPack 4.3.1
Windows Vista Home Premium
X64 sp2
Sun JDK 1.6.0_18
Ant 1.7.0

For reference, I have attached my zipped install.xml.
The Ant task I use:

<izpack
  input="${installer}/install.xml"
  output="${build}/web-installer/${app.ver}-Web-Installer.jar"
  installerType="web" inheritAll="true" basedir="${basedir}"
  compression="deflate" compressionlevel="9"
/>

Could you point me to anything I might have missed?

Thank you for your time.

Sincerely,
-Laurent


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

install.zip (1K) Download Attachment

Re: NPE while running a web installer

by Laurent Cohen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello again,

After further testing, it appears the issue is caused by the presence of spaces in the URL.
I resolved it by changing all spaces in each pack name into underscores.
For instance, instead of:
  <pack name="JPPF Driver" required="no" preselected="yes">
I used:
  <pack name="JPPF_Driver" required="no" preselected="yes">

The resulting URL became http://www.jppf.org/download/2.0/JPPF-2.0-Web-Installer.pack-JPPF_Driver.jar and the installation worked.

My next step is to build a fully web-based install by wrapping the web installer in a JNLP package. I'd be very grateful if anyone could share their experience on this.

Thank you for making IzPack such a great product!

-Laurent


Laurent Cohen wrote:
Hello,

I'm attempting to create a web installer. The installer generation seems to go well, and as far as I know all pack files and the web installer itself are properly generated.
However, when running the installer, after selection of the packs to install, I get the following stack:

java.lang.NullPointerException while trying to download http://www.jppf.org/download/2.0/JPPF-2.0-Web-Installer.pack-JPPF Driver.jar
com.izforge.izpack.installer.InstallerException: Installation failed
  at com.izforge.izpack.installer.Unpacker.getPackAsStream(Unknown Source)
  at com.izforge.izpack.installer.Unpacker.run(Unknown Source)
  at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
  at com.izforge.izpack.installer.WebRepositoryAccessor.getCachedUrl(Unknown Source)
  ... 3 more

I checked that the file is there and I was able to download it from Firefox by copy/pasting the URL printed in the stack.

My environment:
IzPack 4.3.1
Windows Vista Home Premium
X64 sp2
Sun JDK 1.6.0_18
Ant 1.7.0

For reference, I have attached my zipped install.xml.
The Ant task I use:

<izpack
  input="${installer}/install.xml"
  output="${build}/web-installer/${app.ver}-Web-Installer.jar"
  installerType="web" inheritAll="true" basedir="${basedir}"
  compression="deflate" compressionlevel="9"
/>

Could you point me to anything I might have missed?

Thank you for your time.

Sincerely,
-Laurent

--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email