OpenOffice extension with signed JAR not working

In case you create a Java base OpenOffice extension (.oxt) and stumble across the error message:
InvalidRegistryException during registration (prepareRegistry(): source registry is empty)
it could be related to a signed jar.

A Java based OpenOffice extension (.oxt) using a signed JAR (inside the .oxt bundle) may produce the error above if the the corresponding IDL_Types.jar is unsigned. To produce an OXT with a signed JAR create a .keystore (using keytool) and sign the JAR at the -pre-uno-package build step:

<target name="-pre-uno-package">
   <signjar jar="${dist.jar}" alias="yourAlias" storepass="yourPassword" />
   <signjar jar="${dist.dir}/${idl_types.jar}" alias="yourAlias" storepass="yourPassword" />