One issue I was having is in CompilerConifg:
mergeManager.addResourceToMerge("uninstaller-META-INF/");
I had to comment out that line or I was getting exceptions.
Seem odd? I use:
<info>
...
<uninstaller name="uninstaller.jar" path="$INSTALL_PATH/uninstaller"/>
</info>
I commented out that line in the code for now.
Next I was getting a nullpointer exception in
ClassPathCrawler#getUrlsForPackage(String packageName) unless I checked
to see if urls was null before iterating through them.
Finally, I'm using
<jar src="../panels.jar" stage="both"/>
for my own custom panels...but that doesn't appear to work anymore - I
see its added in logging, but then I get a class not found when trying
to load my custom panel. Can anyone offer any insight? Been working on
trying to get IZpack running off and on for quite a while now - been a
bit of a painful transition.
- Mark
[izpack] com.izforge.izpack.api.exception.MergeException: The class
name com.lucid.izpack.StopLWPanel is not a valid
[izpack] at
com.izforge.izpack.merge.resolve.ClassPathCrawler.searchClassInClassPath(ClassPathCrawler.java:106)
[izpack] at
com.izforge.izpack.merge.resolve.PathResolver.getPanelMerge(PathResolver.java:115)
[izpack] at
com.izforge.izpack.compiler.packager.impl.PackagerBase.addPanel(PackagerBase.java:270)
[izpack] at
com.izforge.izpack.compiler.CompilerConfig.addPanels(CompilerConfig.java:1434)
[izpack] at
com.izforge.izpack.compiler.CompilerConfig.executeCompiler(CompilerConfig.java:245)
[izpack] at
com.izforge.izpack.ant.IzPackTask.execute(IzPackTask.java:246)
[izpack] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[izpack] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[izpack] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[izpack] at java.lang.reflect.Method.invoke(Method.java:597)
[izpack] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[izpack] at org.apache.tools.ant.Task.perform(Task.java:348)
[izpack] at org.apache.tools.ant.Target.execute(Target.java:357)
[izpack] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[izpack] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[izpack] at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[izpack] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[izpack] at
org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[izpack] at
org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[izpack] at
org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[izpack] at
org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
[izpack] Caused by: java.lang.ClassNotFoundException:
com.lucid.izpack.StopLWPanel
[izpack] at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)
[izpack] at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
[izpack] at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
[izpack] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[izpack] at java.lang.Class.forName0(Native Method)
[izpack] at java.lang.Class.forName(Class.java:169)
[izpack] at
com.izforge.izpack.merge.resolve.ClassPathCrawler.searchClassInClassPath(ClassPathCrawler.java:102)
[izpack] ... 20 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Emmanuel
----
Emmanuel Hugonnet
Architect
emmanuel...@silverpeas.com
Phone +33 (0) 476 248 658
Fax +33 (0) 476 248 659
Silverpeas
http://www.silverpeas.com
http://www.twitter.com/silverpeas
24 rue Lamartine
38320 Eybens - France
----- Mail original -----
De: "Mark Miller" <markr...@gmail.com>
À: us...@izpack.codehaus.org
Envoyé: Dimanche 24 Octobre 2010 21:56:55
Objet: [izpack-user] Still trying to upgrade to IZPack5
> for my own custom panels...but that doesn't appear to work anymore - I
> see its added in logging, but then I get a class not found when trying
> to load my custom panel. Can anyone offer any insight? Been working on
> trying to get IZpack running off and on for quite a while now - been a
> bit of a painful transition.
The problem was the ant custom classloader which was making a mess
with IzPack's merge logic.
One simple solution is to collect the classpath urls from the old
classloader, bootstrap another classloader with those urls and launch
a new thread with IzPack execution in a Runnable.
I have pushed all those modifications on my repo (
http://github.com/bonnefoa/izpack-refactoring ) and on codehaus. If
you can build, test with the new code base and tell me the result, it
will be easier for me than doing a release.
And sorry for the pain! Step by step, we will manage to have a stable
release soon.
Cheers,
Anthonin
Thanks Anthonin!
I've tried the latest from
http://github.com/bonnefoa/izpack-refactoring. Currently, it appears to
hang on me.
Output below, followed by jstack output:
compile-installer:
[launch4j] Compiling resources
[launch4j] Linking
[launch4j] Successfully created
/Users/markrmiller/Workspaces/workspace/project-izpack5/installer/build/staging/uninstaller.exe
[echo] Makes the installer using IzPack
[izpack] Setting the installer information
[izpack] Setting the GUI preferences
[izpack] Adding langpack: eng
[izpack] Adding resource: flag.eng
[izpack] Adding resource: Installer.image
[izpack] Adding resource: splashscreen.png
[izpack] Adding resource: LicencePanel.licence
[izpack] Adding resource: HTMLHelloPanel.info
[izpack] Adding resource: HTMLInfoPanel.info
[izpack] Adding resource: shortcutSpec.xml
[izpack] Adding resource: Unix_shortcutSpec.xml
[izpack] Adding resource: userInputSpec.xml
[izpack] Adding resource: ProcessPanel.Spec.xml
[izpack] Adding resource: CustomLangpack.xml_eng
[izpack] Adding content of jar:
/Users/markrmiller/Workspaces/workspace/project-izpack5/installer/build/staging/../panels.jar
[izpack] Adding panel: UNKNOWN
(com.izforge.izpack.panels.htmlhello.HTMLHelloPanel) :: Classname :
com.izforge.izpack.panels.htmlhello.HTMLHelloPanel
** HANG **
JSTACK:
Mark-Millers-MacBook-Pro:~ markrmiller$ jstack 36203
2010-10-25 15:56:03
Full thread dump Java HotSpot(TM) 64-Bit Server VM (17.1-b03-307 mixed
mode):
"Attach Listener" daemon prio=9 tid=102dec800 nid=0x11afcb000 waiting on
condition [00000000]
java.lang.Thread.State: RUNNABLE
"Thread-22" daemon prio=5 tid=117bb3800 nid=0x11a90b000 runnable [11a907000]
java.lang.Thread.State: RUNNABLE
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1823)
- locked <108547140> (a java.util.Vector)
- locked <108547168> (a java.util.Vector)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1720)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
- locked <1085175d8> (a java.lang.Runtime)
at java.lang.System.loadLibrary(System.java:1045)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)
at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29)
at java.awt.Component.<clinit>(Component.java:560)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
com.izforge.izpack.merge.resolve.ClassPathCrawler.searchClassInClassPath(ClassPathCrawler.java:102)
at
com.izforge.izpack.merge.resolve.PathResolver.getPanelMerge(PathResolver.java:115)
at
com.izforge.izpack.compiler.packager.impl.PackagerBase.addPanel(PackagerBase.java:270)
at
com.izforge.izpack.compiler.CompilerConfig.addPanels(CompilerConfig.java:1434)
at
com.izforge.izpack.compiler.CompilerConfig.executeCompiler(CompilerConfig.java:246)
at com.izforge.izpack.ant.IzpackAntRunnable.run(IzpackAntRunnable.java:72)
at java.lang.Thread.run(Thread.java:680)
"Poller SunPKCS11-Darwin" daemon prio=1 tid=117830800 nid=0x11a808000
waiting on condition [11a807000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at sun.security.pkcs11.SunPKCS11$TokenPoller.run(SunPKCS11.java:692)
at java.lang.Thread.run(Thread.java:680)
"Thread-9" daemon prio=5 tid=11b09e800 nid=0x11c101000 runnable [11c100000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:199)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
- locked <1085560f8> (a java.io.BufferedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:92)
at java.lang.Thread.run(Thread.java:680)
"Thread-0" daemon prio=5 tid=10380e800 nid=0x7fff7116dc20 in
Object.wait() [7fff5fbfa000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <10b5330b8> (a java.lang.Thread)
at java.lang.Thread.join(Thread.java:1210)
- locked <10b5330b8> (a java.lang.Thread)
at java.lang.Thread.join(Thread.java:1263)
at com.izforge.izpack.ant.IzPackTask.execute(IzPackTask.java:212)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at
org.eclipse.ant.internal.launching.remote.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at
org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at
org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
at
org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
"Low Memory Detector" daemon prio=5 tid=101887000 nid=0x11960d000
runnable [00000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread1" daemon prio=9 tid=10380d800 nid=0x11950a000 waiting on
condition [00000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread0" daemon prio=9 tid=10380d000 nid=0x119407000 waiting on
condition [00000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=9 tid=10380c000 nid=0x119304000 runnable
[00000000]
java.lang.Thread.State: RUNNABLE
"Surrogate Locker Thread (CMS)" daemon prio=5 tid=103800000
nid=0x119201000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=10281f800 nid=0x118507000 in Object.wait()
[118506000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <10854e868> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <10854e868> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=10281e800 nid=0x118404000 in
Object.wait() [118403000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <1084ff338> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <1084ff338> (a java.lang.ref.Reference$Lock)
"main" prio=5 tid=102801000 nid=0x100501000 runnable [00000000]
java.lang.Thread.State: RUNNABLE
"VM Thread" prio=9 tid=10281c000 nid=0x118301000 runnable
"Gang worker#0 (Parallel GC Threads)" prio=9 tid=101800800
nid=0x102401000 runnable
"Gang worker#1 (Parallel GC Threads)" prio=9 tid=101801000
nid=0x102504000 runnable
"Gang worker#2 (Parallel GC Threads)" prio=9 tid=101802000
nid=0x102607000 runnable
"Gang worker#3 (Parallel GC Threads)" prio=9 tid=101802800
nid=0x10270a000 runnable
"Concurrent Mark-Sweep GC Thread" prio=9 tid=10187d800 nid=0x117607000
runnable
"VM Periodic Task Thread" prio=10 tid=101899000 nid=0x119710000 waiting
on condition
"Exception Catcher Thread" prio=10 tid=102801800 nid=0x10173b000 runnable
JNI global references: 1634
You have two solutions :
- Check out the last version of the code and retry, it should pass this problem
- Remove the jar tag in your installer file and add your panels.jar
in the classpath. IzPack should be able to pick the package containing
the panel from the classpath. This feature might be more interesting
for a maven-based installer than an ant-based one.
Cheers,
Anthonin
With the latest from your git branch, I now get:
[INFO] IzPack compiler module ............................ FAILURE [7.213s]
I'll try again after some time.
> - Remove the jar tag in your installer file and add your panels.jar
> in the classpath. IzPack should be able to pick the package containing
> the panel from the classpath. This feature might be more interesting
> for a maven-based installer than an ant-based one.
I'm in no real hurry - I just want to make sure everything works in
izpack 5 when I upgrade. There are many little fixes I would like to get
ahold of.
Which reminds me that I still have not logged an issue for 4.3.3 about
not being able to start a script in console mode using
ProcessPanelWorker when it works in UI mode...
- Mark
I can look at getting the jar on the classpath in other ways.
- Mark
On 10/26/10 2:59 AM, Anthonin Bonnefoy wrote:
Thanks,
Mark
> - Remove the jar tag in your installer file and add your panels.jar
> in the classpath. IzPack should be able to pick the package containing
> the panel from the classpath. This feature might be more interesting
> for a maven-based installer than an ant-based one.
I actually gave that a try - but I still end up in the same infinite loop.
- Mark
So the mac issue sucks - seems like a bug in the jvm or something weird?
I've never seen anything like it. But I still think there are problems
with custom panels and class loading as well...
- Mark
(new problem output:)
[echo] Makes the installer using IzPack
[izpack] Setting the installer information
[izpack] Setting the GUI preferences
[izpack] Adding langpack: eng
[izpack] Adding resource: flag.eng
[izpack] Adding resource: Installer.image
[izpack] Adding resource: splashscreen.png
[izpack] Adding resource: LicencePanel.licence
[izpack] Adding resource: HTMLHelloPanel.info
[izpack] Adding resource: HTMLInfoPanel.info
[izpack] Adding resource: shortcutSpec.xml
[izpack] Adding resource: Unix_shortcutSpec.xml
[izpack] Adding resource: userInputSpec.xml
[izpack] Adding resource: ProcessPanel.Spec.xml
[izpack] Adding resource: CustomLangpack.xml_eng
[izpack] Adding content of jar:
/home/mark/workspaces/workspace/project/installer/build/staging/../panels.jar
[izpack] Adding panel: UNKNOWN
(com.izforge.izpack.panels.htmlhello.HTMLHelloPanel) :: Classname :
com.izforge.izpack.panels.htmlhello.HTMLHelloPanel
[izpack] Adding panel: UNKNOWN
(com.izforge.izpack.panels.htmlinfo.HTMLInfoPanel) :: Classname :
com.izforge.izpack.panels.htmlinfo.HTMLInfoPanel
[izpack] Adding panel: UNKNOWN
(com.izforge.izpack.panels.licence.LicencePanel) :: Classname :
com.izforge.izpack.panels.licence.LicencePanel
[izpack] Adding panel: enabled :: Classname :
com.izforge.izpack.panels.userinput.UserInputPanel
[izpack] Adding panel: UNKNOWN (com.lucid.izpack.StopLWPanel) ::
Classname : com.project.izpack.StopLWPanel
[izpack] Exception in thread "Thread-59"
java.lang.NoClassDefFoundError: com/izforge/izpack/installer/base/IzPanel
[izpack] at java.lang.ClassLoader.defineClass1(Native Method)
[izpack] at java.lang.ClassLoader.defineClass(ClassLoader.java:752)
[izpack] at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:144)
[izpack] at
java.net.URLClassLoader.defineClass(URLClassLoader.java:379)
[izpack] at java.net.URLClassLoader.access$100(URLClassLoader.java:75)
[izpack] at java.net.URLClassLoader$1.run(URLClassLoader.java:294)
[izpack] at java.net.URLClassLoader$1.run(URLClassLoader.java:288)
[izpack] at java.security.AccessController.doPrivileged(Native Method)
[izpack] at java.net.URLClassLoader.findClass(URLClassLoader.java:287)
[izpack] at java.lang.ClassLoader.loadClass(ClassLoader.java:392)
[izpack] at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:334)
[izpack] at java.lang.ClassLoader.loadClass(ClassLoader.java:385)
[izpack] at java.lang.ClassLoader.loadClass(ClassLoader.java:332)
[izpack] at java.lang.Class.forName0(Native Method)
[izpack] at java.lang.Class.forName(Class.java:186)
[izpack] at
com.izforge.izpack.merge.resolve.ClassPathCrawler.searchClassInClassPath(ClassPathCrawler.java:103)
[izpack] at
com.izforge.izpack.merge.resolve.PathResolver.getPanelMerge(PathResolver.java:126)
[izpack] at
com.izforge.izpack.compiler.packager.impl.PackagerBase.addPanel(PackagerBase.java:270)
[izpack] at
com.izforge.izpack.compiler.CompilerConfig.addPanels(CompilerConfig.java:1440)
[izpack] at
com.izforge.izpack.compiler.CompilerConfig.executeCompiler(CompilerConfig.java:248)
[izpack] at
com.izforge.izpack.ant.IzpackAntRunnable.run(IzpackAntRunnable.java:72)
[izpack] at java.lang.Thread.run(Thread.java:717)
[izpack] Caused by: java.lang.ClassNotFoundException:
com.izforge.izpack.installer.base.IzPanel
[izpack] at java.net.URLClassLoader$1.run(URLClassLoader.java:299)
[izpack] at java.net.URLClassLoader$1.run(URLClassLoader.java:288)
[izpack] at java.security.AccessController.doPrivileged(Native Method)
[izpack] at java.net.URLClassLoader.findClass(URLClassLoader.java:287)
[izpack] at java.lang.ClassLoader.loadClass(ClassLoader.java:392)
[izpack] at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:334)
[izpack] at java.lang.ClassLoader.loadClass(ClassLoader.java:332)
[izpack] ... 22 more
--
- Mark
--
http://izpack.org/
http://jpz-log.info/
http://julien.ponge.info/
I'm considering just building off the 4 series for now. Need a lot of
little fixes, like spelling errors that are not in language files. Also
some larger ones like the console install mode creating a corrupt
uninstaller as well though. Was looking forward to the final screen not
showing up without a refresh bug that's been fixed in 5 as well...but
perhaps its not a terrible back port.
- Mark
--
- Mark
BTW if you manage to assemble a few fixes based on 4.3 and the changes
we have in the pipe, feel free to let us know. We do not intend to
further release from this branch given the energy it requires, but if
you get something clean from there, we could maybe do a "cd src && ant
dist" for the very last time...
Cheers
--
---------------------------------------------------------------------