[izpack-users] Problem creating shortcuts withWindows(UnsatisfiedLinkError)

Bartz, Klaus Klaus.Bartz at coi.de
Mon Oct 9 11:17:20 CEST 2006


Hi Benjamin,

>-----Original Message-----
>From: izpack-users-bounces at lists.berlios.de
>[mailto:izpack-users-bounces at lists.berlios.de]On Behalf Of Benjamin
>Hanzelmann
>Sent: Monday, October 09, 2006 10:03 AM
>To: izpack-users at lists.berlios.de
>Subject: Re: [izpack-users] Problem creating shortcuts
>withWindows(UnsatisfiedLinkError)
>
>
>On Mon, Oct 09, 2006 at 09:47:59AM +0200, Bartz, Klaus wrote:
>> Hi Benjamin,
>> it seems so that the OS API function CoInitializeEx fails.
>> I do not know why; at other installations it works.
>
>I hate this kind of errors. ;)

I am too...

>
>> What I do not understand is the line
>> 
>> >> java.lang.UnsatisfiedLinkError: initializeCOM
>> 
>> That line will be written if the the shortcut dll will not be found.
>> But then "could not create shortcut instance" should not be thrown.
>
>> Do you have added 
>>     <native type="izpack" name="ShellLink.dll"/>
>> in your installation description file?
>
>Yes, in http://lupus.cs.uni-dortmund.de/~hanzelm/ are all the XML-files
>used for the installer. The ShellLink.dll is included in the
>JavaABC-Installer.jar under the name "native/ShellLink.dll".
>

1. If you would create a shortcut to a installed program positioning 
ShortcutPanel after InstallPanel because the COM classes needs an existent
file to create the link. Else it fails.
2. If you wold use an xml parser to validate your xml file use the
same order as in the dtd. Means, write native entry as last.

>> Works the IzPack installation on the box where 
>JavaABC-Installer fails?
>
>I did not try that, I will give it a go later today...
>

With this test you get a hint whether it is a general or a problem of
your specific installation. Therefore it should be an early test.
Also tests on other windows boxes with other OS versions are need.

>> Secound puzzle for me is the time the exception will be thrown.
>> If I look into the code or test, the code will be performed at 
>> panelActivate of ShortcutPanel. Are the ShortcutPanel your 
>first panel?
>
>No, it is not.
>As far as I understood the code the dll is bound to the Java class at
>startup, and that fails.
>

It is right that all panels are created just after language dialog. But the
conclusion that all dependant classes are created at that time is not right.
See the ShortcutPanel constructor, there is no creation of the class which
uses the native part. Else in panelActivate the creation will be done
(see ShortcutPanel.java line 621f).

You see, there are more than one things which are a little bit quaint
with point in time of exception and exception contents.

Cheers

Klaus

>Thanks for helping,
>Ben
>_______________________________________________
>izpack-users mailing list
>izpack-users at lists.berlios.de
>https://lists.berlios.de/mailman/listinfo/izpack-users
>



More information about the izpack-users mailing list