On upgrading from Hibernate 3.3.0.SP1 to 3.6.0-FINAL our Eclipse based UI (which exports the entire hibernate jar to its dependent plugins) failed to start. The exception raised by the eclipse OSGi framework was:
org.osgi.framework.BundleException: Invalid manifest header Export-Package: <followed by a comma-separated list of exported package names>
Crucially, the list of package names started with a comma. On examining the contents of the jar we noticed that in the base of the jar is a file '/hibernate-distribution-3.6.0.Final.pom'. The leading slash was causing the problem. On removal our UI started up.
(Interestingly this seems also to cause an issue with the Pack200 packaging scheme used by our installer builder.)
Not sure at this stage whether this is an Hibernate bug, a Maven 2 bug or an Eclipse/OSGi bug. However it caused some head-scratching here and, since the workaround is straightforward, we though we should post this message to help others confronted with the same issue.
(Hibernate 3.5.3 has the same issue - but we could not use it owing to other bug fixes we were awaiting.)
|