| Summary: | Hibernate fails to resolve with Virgo 2.1.0.RELEASE | ||
|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | Glyn Normington <glyn.normington> |
| Component: | runtime | Assignee: | Glyn Normington <glyn.normington> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dmitry |
| Version: | 2.1.0.RELEASE | Flags: | glyn.normington:
documentation+
|
| Target Milestone: | 3.0.0.M01 | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | http://www.eclipse.org/forums/index.php?t=msg&th=202178&S=36542d2756cefdd94c8402e02c0dcffd#msg_646063 | ||
| Whiteboard: | |||
|
Description
Glyn Normington
The fix in the SpringSource Enterprise Bundle Repository is covered by https://issuetracker.springsource.com/browse/EBR-712. I posted this comment on EBR jira - duplicating here: It looks like problem is a bit more involved than just a version of slf4j. There is a split packages between host com.springsource.org.hibernate-3.3.2.GA (A) bundle and fragments com.springsource.org.hibernate.annotation-3.4.0.GA (B) and com.springsource.org.hibernate.ejb-3.4.0.GA-A (C) all defining different versions. I am not even sure why equinox allows these fragment bundles to resolve and attach to host at all. For example: A exports org.hibernate and org.hibernate.cfg with version="3.3.2.GA" B exports org.hibernate and org.hibernate.cfg with version="3.4.0.GA" And B exports org.hibernate.ejb;version="3.4.0.GA" C exports org.hibernate.ejb;version="3.4.0.GA-A" Maybe fragments should not be exporting packages that are exported by host bundle? It looks based on the generated manifest that there is Exclude-Imports bundlor header as I do not see imports for anything from hibernate other than org.hibernate.annotations.common (annotation-common). Missing Exclude-Exports to mirror Exclude-Imports? In version 3.5 hibernate merged annotations into core, but entity manager and annotation-common can still be obtained as a standalone module. There is still a split package between hibernate-core and hibernate-entity-manager. I would always "shade" all of the hibernate jars together and only deal with cache providers individually (ehchace, jbosscache, etc). Forgot to add this: With Import-Library: org.hibernate.ejb;version="[3.4.0.GA-A, 3.4.0.GA-A]" This is the exception: Caused by: org.eclipse.virgo.kernel.osgi.framework.ImportMergeException: cannot merge imports of package 'org.hibernate.ejb' from sources 'Import-Library 'org.hibernate.ejb' version '3.4.0.GA-A'(Import-Bundle 'com.springsource.org.hibernate.ejb' version '3.4.0.GA-A', Import-Bundle 'com.springsource.org.hibernate.annotations' version '3.4.0.GA')' because of disjoint package version ranges This is fixed by an update library [1] and some of the contained bundles. All the new versions have qualifiers ending in "-A". I tested that a bundle importing the updated library resolves ok under Virgo. [1] http://ebr.springsource.com/repository/app/library/version/detail?name=org.hibernate.ejb&version=3.4.0.GA-A&searchType=librariesBySymbolicName&searchQuery=org.hibernate A known issue is now documented in the Virgo Programmer Guide. |