ClassNotFoundException com.izforge.izpack.panels.path.PathSelectionPanel

268 views
Skip to first unread message

Juan. Tecknolab

unread,
Nov 27, 2017, 4:15:19 AM11/27/17
to izpack-user
Hi,
I am trying to build my first 'mock-up' installer with IzPack, just using some sample code from the documentation.
IzPack Version: 5.1.6.
java: 1.8.0_151
Platform: Windows 10

The installer compiles OK and runs OK with the -console option, but when trying a gui installation (java -jar install.jar -debug -trace -stacktrace) it generates an exception java.lang.ClassNotFoundException: com.izforge.izpack.panels.path.PathSelectionPanel.

If the installer descriptor has a privileged mode setting (  <run-privileged condition="izpack.windowsinstall"/> ), it does nothing, exiting silently with no errors.

Thx for your help.



Andreas Kuhtz

unread,
Nov 27, 2017, 4:30:12 AM11/27/17
to izpack-user
Hi,

I don't konw where you got izpack-5.1.6 from but the latest released version is 5.1.2.

Try to change the run-privileged to:
        <run-privileged condition="izpack.windowsinstall.vista|izpack.windowsinstall.7|izpack.windowsinstall.8|izpack.windowsinstall.10" />

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+unsubscribe@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.

Juan. Tecknolab

unread,
Nov 27, 2017, 5:44:47 AM11/27/17
to izpack-user
Sorry. It was a typo. I am using 5.1.2.
With the change in run-privileged, same results. In fact, I am doing nothing privileged (actually, I am doing nothing, just asking some data and using a 'dumb' pack section with a folder with a dumb file inside), so the setup should work without the run-privileged section. Curiously, results are quite different (no errors no panels window with the run-privileged, class-not-found exception without it).

<packs>
    <pack name="Test Core" required="yes">
      <description>The core files needed for the application</description>
      <fileset dir="plain" targetdir="${INSTALL_PATH}" override="true"/>
      <parsable targetfile="${INSTALL_PATH}/test.properties"/>
    </pack>
</packs>

Regards.
  

On Monday, November 27, 2017 at 10:30:12 AM UTC+1, Andreas Kuhtz wrote:
Hi,

I don't konw where you got izpack-5.1.6 from but the latest released version is 5.1.2.

Try to change the run-privileged to:
        <run-privileged condition="izpack.windowsinstall.vista|izpack.windowsinstall.7|izpack.windowsinstall.8|izpack.windowsinstall.10" />

Cheers,
Andreas

2017-11-27 10:15 GMT+01:00 Juan. Tecknolab <in...@tecknolab.com>:
Hi,
I am trying to build my first 'mock-up' installer with IzPack, just using some sample code from the documentation.
IzPack Version: 5.1.6.
java: 1.8.0_151
Platform: Windows 10

The installer compiles OK and runs OK with the -console option, but when trying a gui installation (java -jar install.jar -debug -trace -stacktrace) it generates an exception java.lang.ClassNotFoundException: com.izforge.izpack.panels.path.PathSelectionPanel.

If the installer descriptor has a privileged mode setting (  <run-privileged condition="izpack.windowsinstall"/> ), it does nothing, exiting silently with no errors.

Thx for your help.



--
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.

Andreas Kuhtz

unread,
Nov 27, 2017, 6:35:23 AM11/27/17
to izpack-user
Hi,

Strange. I've the same (<parsable ... >) in my installer and it works.
Do you use maven to build the installer?
Can you share the project on github?

Cheers,
Andreas


To unsubscribe from this group and stop receiving emails from it, send an email to izpack-user+unsubscribe@googlegroups.com.

Juan. Tecknolab

unread,
Nov 27, 2017, 6:58:34 AM11/27/17
to izpack-user
No, I am using command line compiler.  I have uploaded the sample to https://github.com/tecknolab/IzPackSample

Juan. Tecknolab

unread,
Nov 28, 2017, 5:44:53 AM11/28/17
to izpack-user
It seems the command line compiler is not packaging correctly all the dependencies in the final jar. It is including the std panel's classes (Hello, Finish, ..) but not the classes these panels depend upon (as PathSelectionPanel).
I am trying to test using maven (with eclipse) but I am not familiar with maven and I am not being able to set it up correctly using the examples in the documentation (it generates an error " For artifact {null:null:null:izpack-jar}: the groupId cannot be empty." ).

Do you have any complete sample pom.xml file I can grab and use? I am seeing this (https://github.com/aspear/izpack5-example-installer/blob/master/installer/pom.xml) but it seems not updated (using a broker reference, https://nexus.codehaus.org/content/repositories/releases).

Thanks in advance.

Andreas Kuhtz

unread,
Nov 28, 2017, 6:28:42 AM11/28/17
to izpack-user
Hi,

You can use this repo: https://github.com/akuhtz/izpack-test
I added a parsable to the installer.

Cheers,
Andreas

To unsubscribe from this group and stop receiving emails from it, send an email to izpack-user+unsubscribe@googlegroups.com.

Juan. Tecknolab

unread,
Nov 29, 2017, 5:09:46 AM11/29/17
to izpack-user
Sorry for being a newbie with maven... I have downloaded and imported your maven project into Eclipse, with no issue. I do a Maven\Update Project and Project\Build and the staging area is correctly generated (so those components of the POM are running) but no installer generated (nor errors...). I suppose I have some incorrect settings at eclipse level... Attached the project Maven Lifecycle mapping as shown in Eclipse (the ignores in izpack seems not good to me)

I would really appreciate your help on this even understanding it is slightly off-topic.

Regards.
Capture.PNG

Andreas Kuhtz

unread,
Nov 29, 2017, 5:26:17 AM11/29/17
to izpack-user
Hi,

From within Eclipse you can use "Run As" > "Maven install" to perform the build.
Sometimes you need the "Maven clean" goal, but you could run that in combination with install via "Maven build ..." and enter the "Goals" "clean install" (see screenshot).

The installer is then available in the target subdirectory of your project (this is maven default behaviour).
Hope this helps. Please ask if something is still not clear.

Cheers,
Andreas

To unsubscribe from this group and stop receiving emails from it, send an email to izpack-user+unsubscribe@googlegroups.com.
Eclipse-Build-Maven.png
Eclipse-Build-Maven-CleanInstall.png

Juan. Tecknolab

unread,
Nov 29, 2017, 6:20:32 AM11/29/17
to izpack-user
Perfect. It works!! Now I only have to expend some time to understand why your installer is working and mine don't.... I'll compare and try to find the difference.
Thx & Regards.

Juan. Tecknolab

unread,
Nov 29, 2017, 10:48:17 AM11/29/17
to izpack-user
I've found where is the problem. It seems that target panel is mandatory, otherwise the "ClassNotFoundException" is raised. I find this behaviour not completely convenient since I may want to design a installer that is not installing anything physically at the server filesystem (in fact, this is pretty much my case, I would be working with a database, not deploying jars or whatever at the server filesystem).

Is this strictly necessary?

Thx!

René Krell

unread,
Nov 29, 2017, 4:25:22 PM11/29/17
to izpack-user
Hi Juan,

this is a known culprit of IzPack, see https://izpack.atlassian.net/browse/IZPACK-952.

Needs somebody to deal with it in general :-)

Regards,
René


Dne středa 29. listopadu 2017 16:48:17 UTC+1 Juan. Tecknolab napsal(a):

Andreas Kuhtz

unread,
Dec 1, 2017, 2:50:22 AM12/1/17
to izpack-user
Hi,

You could add your own custom TargetPanel that skips the validation (override isValidated() to not call super class and maybe saveData() in TargetPanel) but I'm not sure if there is something later that depends on the path ...

To create a custom panel there is a sample project here that should work:
https://github.com/akuhtz/izpack-custom-test.git

The custom panel is in a separate project (izpack-custom-test\izpack-custom) because it must be build before the installer is created.
You have to add the dependency of the custom panel as dependency for the project with the installer. See the pom.xml in the izpack-custom-test\izpack-test project.

Cheers,
Andreas


To unsubscribe from this group and stop receiving emails from it, send an email to izpack-user+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages