OpenOffice extension with signed JAR not working

In case you create a Java base OpenOffice extension (.oxt) and stumble across the error message:
ImplementationRegistration::registerimplementation()
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) does not register in OpenOffice 3.3.0. Instead you see the error message above. To reproduce the problem 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" />
</target>