[izpack-users] custom panel cont'd

Bartz, Klaus Klaus.Bartz at coi.de
Wed Oct 11 17:36:27 CEST 2006


Hi le dinh,
seems so, that classes are in install.jar (else no of your classes can be
listed in the stack).
It seems so, that the null pointer exception will be triggert in
 at com.izforge.izpack.installer.PingPanelWorker.readChoices(PingPanelWorker.java:363)
 
Additional it seems so that your panel worker will be called in the constructor of your panel.
All constructors of panels are called just after language dialog. May be this is to early for
your worker, e.g. the file (or what else) from which the choices should be readed do not exist.
Or the spec is not at the right place?? Should be a resource. Or the names differ;
e.g. in the res tag the id "PingPanel.Spec.xml", in the reader (PingPanelWorker.java?)
"PingPanelSpec.xml" or "pingPanel.Spec.xml" or what else.
You see, many possibilities.
Therfore I recommend to develop a custom panel in an IDE like eclipse. If you do it,
you can simple set a break point at PingPanelWorker.java:363 and see what happend.
In the docu there is a description how to make an installer project in eclipse 
(there are some little pitfalls).
 
Cheers
 
Klaus
 

-----Original Message-----
From: izpack-users-bounces at lists.berlios.de [mailto:izpack-users-bounces at lists.berlios.de]On Behalf Of le dinh
Sent: Wednesday, October 11, 2006 5:04 PM
To: izpack-users at lists.berlios.de; izpack-users-request at lists.berlios.de
Subject: [izpack-users] custom panel cont'd


Hi Klaus,

The error occurs just after the display of the langage selection panel. Here below is the stack dump. OK, i was too brief, let me tell you the way that i understand how to create my own PingPanel whose aim is to select the license system ,the server to ping to and finally to launch a 'ping script'. 

First of all, I found inspiration from an existing class CompilePanel and wrote a new class PingPanel that extends IzPanel. In the void makeXMLData, I replaced compiler and arguments by my stfuff in my PingPanel.Spec.xml ( prot,flex...). As noticed on the izforge wiki, I had to create a PingPanelAutomationHelper class( again CompilePanelAutomationHelper is used as example ). Last, my PingPanelWorker thread is inspired from a mixing CompileWorker and ProcessPanelWorker 

Just a few midifications in build.xml to launch ant and the compilation has been done. To complete, I insert my PingPanel in the resources and panels section of my install xml and create a new jar file.

Thanks a lot to give me a quick response. I do appreciate your explanatory statements.

Cheers,

 

this=com.izforge.izpack.panels.PingPanel[,0,0,0x0,invalid,layout=java.awt.FlowLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]

input=PingPanel.Spec.xml protspec=null protlist=null

- Error -

java.lang.reflect.InvocationTargetException

java.lang.reflect.InvocationTargetException

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at com.izforge.izpack.installer.InstallerFrame.loadPanels(InstallerFrame.java:202)

at com.izforge.izpack.installer.InstallerFrame.<init>(InstallerFrame.java:159)

at com.izforge.izpack.installer.GUIInstaller.loadGUI(GUIInstaller.java:389)

at com.izforge.izpack.installer.GUIInstaller.<init>(GUIInstaller.java:126)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at com.izforge.izpack.installer.Installer.main(Installer.java:62)

Caused by: java.lang.NullPointerException

at com.izforge.izpack.installer.PingPanelWorker.readChoices(PingPanelWorker.java:363)

at com.izforge.izpack.installer.PingPanelWorker.getAvailableProt(PingPanelWorker.java:136)

at com.izforge.izpack.panels.PingPanel.<init>(PingPanel.java:193)

... 15 more


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-users/attachments/20061011/7b631549/attachment.html 


More information about the izpack-users mailing list