Missing "javax.persistence.EntityManagerFactory" when deploying a Hibernate-based application in a Fuse fabric
Issue
An application based on Hibernate, and built using Maven, is deployed in a fabric; the necessary features (including the hibernate feature, of course) appear to be correctly installed in the fabric profile along with the application components. However, when the profile is applied to a container, initialization fails, and the following exception is raised in the container log:
org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=mybundle; type=osgi.bundle; version="[1.0.1.SNAPSHOT,1.0.1.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve mybundle/1.0.1.SNAPSHOT: missing requirement [mybundle/1.0.1.SNAPSHOT] osgi.service; effective:=active; filter:="(objectClass=javax.persistence.EntityManagerFactory)"]
at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:285)
at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)
Environment
- Red Hat JBoss Fuse
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
