Error running izPack 5.1.3

438 views
Skip to first unread message

Christopher Dickinson

unread,
Nov 12, 2018, 5:01:54 PM11/12/18
to izpac...@googlegroups.com
Testing out the possibility of integrating izPack 5 into my build system.  I downloaded IzPack 5.1.3 and installed it, configured ant to use it, and I'm running into the following attempting to create an installer:

   [izpack] Exception in thread "Thread-13" com.izforge.izpack.api.exception.IzPackClassNotFoundException: Class 'com.izforge.izpack.compiler.Packager' not found
   [izpack]     at com.izforge.izpack.ant.IzpackAntRunnable.run(IzpackAntRunnable.java:82)
   [izpack]     at java.lang.Thread.run(Thread.java:748)
   [izpack] Caused by: com.izforge.izpack.api.exception.IzPackClassNotFoundException: Class 'com.izforge.izpack.compiler.Packager' not found
   [izpack]     at com.izforge.izpack.compiler.util.CompilerClassLoader.loadClass(CompilerClassLoader.java:110)
   [izpack]     at com.izforge.izpack.compiler.CompilerConfig.loadPackagingInformation(CompilerConfig.java:423)
   [izpack]     at com.izforge.izpack.compiler.CompilerConfig.executeCompiler(CompilerConfig.java:336)
   [izpack]     at com.izforge.izpack.ant.IzpackAntRunnable.run(IzpackAntRunnable.java:78)
   [izpack]     ... 1 more
   [izpack] Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.compiler.Packager
   [izpack]     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
   [izpack]     at com.izforge.izpack.compiler.util.CompilerClassLoader.findClass(CompilerClassLoader.java:136)
   [izpack]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   [izpack]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   [izpack]     at com.izforge.izpack.compiler.util.CompilerClassLoader.loadClass(CompilerClassLoader.java:98)
   [izpack]     ... 4 more

-Christopher

Andreas Kuhtz

unread,
Nov 13, 2018, 3:12:12 AM11/13/18
to izpac...@googlegroups.com
Hello,

The classpath seems incomplete. Can you share your ant target?

Cheers,
Andreas

--
You received this message because you are subscribed to the Google Groups "izpack-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to izpack-user...@googlegroups.com.
To post to this group, send email to izpac...@googlegroups.com.
Visit this group at https://groups.google.com/group/izpack-user.
For more options, visit https://groups.google.com/d/optout.

Christopher Dickinson

unread,
Nov 13, 2018, 8:28:40 AM11/13/18
to izpac...@googlegroups.com
I followed https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491591/Compiling+Using+Ant pretty closely except I did not create a file path reference, just combined it in the taskdef.

My configuration is as follows: I am on RedHat and have installed izPack to a folder under my home directory similar to /home/chris/izpack

In my .cshrc file, I set IZPACK_HOME to /home/chris/izpack

In my ant file, I have the following setup

<property name="IZPACK_HOME" value="${env.IZPACK_HOME}"/>
    <taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask">
      <classpath>
        <fileset dir="${IZPACK_HOME}/lib" includes="*.jar"/>
      </classpath>
    </taskdef>

    <izpack input="${IZPACK_CONFIG}" output="${INSTALLER_OUTPUT_DIR}/${INSTALLER_FILENAME}"
            basedir="${IZPACK_BASEDIR}" inheritAll="true" izPackDir="${IZPACK_HOME}"/>

Thanks,
-Christopher

Andreas Kuhtz

unread,
Nov 13, 2018, 9:00:10 AM11/13/18
to izpac...@googlegroups.com
Hi,

I've done the steps on my box and it works.
Have you added this to your build.xml:

  <property environment="env"/>

And are you sure that your path does not contain an older version of izpack?
I used Java 1.8.0_191 for my test.

Cheers,
Andreas

Christopher Dickinson

unread,
Nov 13, 2018, 9:31:47 AM11/13/18
to izpac...@googlegroups.com
Hello Andreas.

Yes, my ant xml file includes the line

<property environment="env"/>

I am using Java 1.8.0_161

I cannot find another version of izPack on my path or system.  This is the first time I've installed version 5; we previously used version 4 via the standalone compiler jar, which I have deleted from the system.  I actually don't have izPack on my $PATH, if that's what you're referring to.

Running ant in debug mode seems to indicate it is loading from the expected location; I see output indicating it is loading the expected classpath, and finding the files in the appropriate location:

fileset: Setup scanner in dir /home/chris/izpack/lib with patternSet{ includes: [*.jar] excludes: [] }
Finding class com.izforge.izpack.ant.IzPackTask
Loaded from /home/cwdicki/izpack/lib/izpack-ant-5.1.3.jar com/izforge/izpack/ant/IzPackTask.class

Thanks,
-Christopher

Andreas Kuhtz

unread,
Nov 13, 2018, 12:29:24 PM11/13/18
to izpac...@googlegroups.com
Hello Christopher,

Am Di., 13. Nov. 2018 um 15:31 Uhr schrieb Christopher Dickinson <chris.w....@gmail.com>:
Hello Andreas.

Yes, my ant xml file includes the line

<property environment="env"/>

I am using Java 1.8.0_161

I cannot find another version of izPack on my path or system.  This is the first time I've installed version 5; we previously used version 4 via the standalone compiler jar, which I have deleted from the system.  I actually don't have izPack on my $PATH, if that's what you're referring to.

Running ant in debug mode seems to indicate it is loading from the expected location; I see output indicating it is loading the expected classpath, and finding the files in the appropriate location:

fileset: Setup scanner in dir /home/chris/izpack/lib with patternSet{ includes: [*.jar] excludes: [] }
Finding class com.izforge.izpack.ant.IzPackTask
Loaded from /home/cwdicki/izpack/lib/izpack-ant-5.1.3.jar com/izforge/izpack/ant/IzPackTask.class

Is this correct? /home/cwdicki/izpack/lib/izpack-ant-5.1.3.jar

I just installed on debian and it works as expected (using Java 1.8.0_151).

Cheers
Andreas

Christopher Dickinson

unread,
Nov 13, 2018, 12:59:39 PM11/13/18
to izpac...@googlegroups.com
Sorry, was trying to simplify/obfuscate, and missed one.

I'll try to wipe everything and start fresh, as it sounds like this isn't something anyone else has ran into.

-Christopher

Christopher Dickinson

unread,
Nov 15, 2018, 12:01:36 AM11/15/18
to izpac...@googlegroups.com
Hello Andreas, et al:

While writing out a lengthy email with my stripped down .cshrc, all the versions of my software, and the build.xml I was using, I decided to grep my entire drive for the offending "com.izforge.izpack.compiler.Packager" string, including the 5.1.3 izPack source code.

In our install.xml file, we had the following:

  <packaging>
    <packager class="com.izforge.izpack.compiler.Packager"/>
    <unpacker class="com.izforge.izpack.installer.Unpacker"/>
  </packaging>

When I removed those lines, izPack no longer reported the Class Not Found Exception.  I'm guessing this is a holdover from our early days of integrating izPack and exploring distributing media on CD (multi volume).  Can you confirm that we should no longer need to specify this?  https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491539/Installation+Files seems to imply that we should only need to define the packaging if we're looking to support multi volume.

Hey, at least I found it!

-Christopher
Reply all
Reply to author
Forward
0 new messages