[izpack-devel] RegistryDefaultHandler problem

Bartz, Klaus Klaus.Bartz at coi.de
Tue Jul 24 10:30:21 CEST 2007


Hi fxa,
do you speaking about performing uninstall under Eclipse with sources 
arranged before the jar file? There the situation is much different
from the one calling uninstall directly.  
If you would debug uninstall, see the hints about debugging in the docu.
You can determine the directory where the dlls are stored for install
and uninstall with the VM param
DLL_PATH e.g. set VM arguments in Eclipse debugging to

-DTRACE=TRUE -DLOG=true -DDLL_PATH=%IZHOME%\bin\native\DebugDir

Put the two dlls directly into the new dir (not in a subdir).

Alternate you can place the dll in the dir where the Java part of the
native class exist, e.g. 

%ECLIPSE_BIN_ROOT%\com\coi\tools\os\izpack

for COIOSHelper.dll (Registry.class is the Java part)
If you would know what's happen, debug 

com.izforge.izpack.util.Librarian.loadLibrary

Cheers 

Klaus


> -----Original Message-----
> From: izpack-devel-bounces at lists.berlios.de 
> [mailto:izpack-devel-bounces at lists.berlios.de] On Behalf Of fxa
> Sent: Monday, July 23, 2007 5:53 PM
> To: izpack-devel at lists.berlios.de
> Subject: Re: [izpack-devel] RegistryDefaultHandler problem
> 
> 
> 
> Tx, I see what the problem was.  
> Still have related problem, since it is looking in the wrong 
> directory for dll. It is looking in: 
> eclipse-bin\native\COIOSHelper.dll instead of bin/native/3rdparty.  
> 
> Path is being created through 
> "ProtectionDomain.codeSource"+/native.  Where 
> "codeSource=.../eclipse-bin/" which gets mangled with 
> classloaders.  Does defining my class in different package 
> could cause this problem?
> 
> My install xml file contains:
>    <native type="3rdparty" name="COIOSHelper.dll" stage="both">
>         <os family="windows" />
>     </native>
> 
> 
> 
> 
> 
> 
> Bartz, Klaus wrote:
> > 
> > Hi "fxa",
> > you should not call RegistryDefaultHandler.getInstance() in the 
> > constructor else in the method beforePacks (see 
> > RegistryInstallerListener) because you
> > need the AutomatedInstallData object which you gets in beforePacks.
> > After
> > getInstance you have also to call verify(idata) with the 
> idata object
> > (see
> > RegistryInstallerListener.initializeRegistryHandler.
> > 
> > Without verify(idata) the default handler do not work right, but he 
> > have to exist. Therefore there is also an other problem in your 
> > installation. Do you have add the dll into your jar file via
> > 
> > 	<native type="3rdparty" name="COIOSHelper.dll" stage="both">
> > 		<os family="windows"/>
> > 	</native>
> > 
> > ?
> > call
> > java -DTRACE=TRUE -jar <Your Install>.jar
> > After language dialog there should be a line like
> > 
> > Ctor OSClassHelper for com.coi.tools.os.izpack.Registry is 
> good: true
> > 
> > If not good: true, most you have forgotten the dll.
> > 
> > Hope it helps
> > 
> > Klaus
> > 
> >> -----Original Message-----
> >> From: izpack-devel-bounces at lists.berlios.de
> >> [mailto:izpack-devel-bounces at lists.berlios.de] On Behalf Of fxa
> >> Sent: Sunday, July 22, 2007 7:29 PM
> >> To: izpack-devel at lists.berlios.de
> >> Subject: [izpack-devel] RegistryDefaultHandler problem
> >> 
> >> 
> >> 
> >> I am using 3.10.3 and I have written a listener that needs
> >> some information from Registry so it tries to get an instance 
> >> of RegistryDefaultHandler through getInstance method.  At the 
> >> same time I am using RegistryInstallerListener.  Problem is 
> >> RegistryDefaultHandler.getInstance()
> >> which returns null.  
> >> It seems on first access to handler its initialized flag has 
> >> been set and somehow the work object gets null so 
> >> registryHandler.good() return false.  
> >> 
> >> How can I resolve this problem?  Here is the some snippet:
> >> 
> >> public class SomeInstallerListener extends 
> SimpleInstallerListener {
> >>    
> >>     RegistryHandler registryHandler = null;
> >> 
> >>     public SomeInstallerListener(){
> >>         super(true);
> >>         registryHandler = RegistryDefaultHandler.getInstance();
> >>     }
> >> -- 
> >> View this message in context: 
> >> http://www.nabble.com/RegistryDefaultHandler-problem-tf4125717
> > .html#a11732705
> > Sent from the izpack devel mailing list archive at Nabble.com.
> > 
> > _______________________________________________
> > izpack-devel mailing list
> > izpack-devel at lists.berlios.de 
> > https://lists.berlios.de/mailman/listinfo/izpack-devel
> > _______________________________________________
> > izpack-devel mailing list
> > izpack-devel at lists.berlios.de 
> > https://lists.berlios.de/mailman/listinfo/izpack-devel
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/RegistryDefaultHandler-problem-tf4125717
.html#a11747265
Sent from the izpack devel mailing list archive at Nabble.com.

_______________________________________________
izpack-devel mailing list
izpack-devel at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/izpack-devel


More information about the izpack-devel mailing list