I got hibernate jar as osgi bundle from -http://mvnrepository.com/artifact/org.hibernate/hibernate-osgi.
When I installed it in fresh AEM 6.1 , I got the following error -
Unresolved constraint in bundle org.hibernate.osgi [448]: Unable to resolve 448.0: missing requirement [448.0] osgi.wiring.package; (&(osgi.wiring.package=javax.persistence)(version>=2.1.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle org.hibernate.osgi [448]: Unable to resolve 448.0: missing requirement [448.0] osgi.wiring.package; (&(osgi.wiring.package=javax.persistence)(version>=2.1.0))
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4095)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2114)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
at org.apache.felix.webconsole.internal.core.InstallHelper.doRun(InstallHelper.java:67)
at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:93)
at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:123)
at java.lang.Thread.run(Unknown Source)
04.01.2016 21:43:00.498 *ERROR* [FelixDispatchQueue] org.hibernate.osgi FrameworkEvent ERROR (org.osgi.framework.BundleException: Unresolved constraint in bundle org.hibernate.osgi [448]: Unable to resolve 448.0: missing requirement [448.0] osgi.wiring.package; (&(osgi.wiring.package=javax.persistence)(version>=2.1.0))).
Can anyone help ?
The problem is that the persistent API 2.1 is missing. Which means there have to be another bundle which exports the javax.persistence package with version 2.1.
Related
I am new to AEM/Maven, and was following this simple tutorial to add the json-simple dependency.
Here is what I added to my pom.xml, and clicked on sync on top right to download that package.
you can see the full pom.xml here.
But when I install with mvn clean install -PautoInstallBundle, the build is success, but in my logs I get the following error message:
27.07.2022 20:00:15.531 *ERROR* [Background Update rampup.core (619)] org.apache.felix.http.jetty Cannot install or update bundle from /var/folders/hh/yvvgql191_l3vb9km9bxgpm80000gp/T/install2076326317699076133.tmp (org.osgi.framework.BundleException: Unable to resolve rampup.core [619](R 619.34): missing requirement [rampup.core [619](R 619.34)] osgi.wiring.package; (&(osgi.wiring.package=org.json.simple)(version>=1.1.0)(!(version>=2.0.0))) Unresolved requirements: [[rampup.core [619](R 619.34)] osgi.wiring.package; (&(osgi.wiring.package=org.json.simple)(version>=1.1.0)(!(version>=2.0.0)))])
org.osgi.framework.BundleException: Unable to resolve rampup.core [619](R 619.34): missing requirement [rampup.core [619](R 619.34)] osgi.wiring.package; (&(osgi.wiring.package=org.json.simple)(version>=1.1.0)(!(version>=2.0.0))) Unresolved requirements: [[rampup.core [619](R 619.34)] osgi.wiring.package; (&(osgi.wiring.package=org.json.simple)(version>=1.1.0)(!(version>=2.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4368)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2281)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:198) [org.apache.felix.webconsole:4.6.2]
at java.base/java.lang.Thread.run(Thread.java:834)
I have looked here and here. They talk about installing an export bundle, or to install the missing org.json.simple, but their solution are too high level for me.
Thanks for any clarification to fix this.
I'm running ONOS and when I want to add my module to its core I get this exception.
that was OK before but when I changed my OS, I get this error.
I've tried lots of ways but none of them fits my problem.
I also have no POM file to add dependency.
any other suggestions would be appreciated
ERROR: Bundle sdn.FANA.optical.optical [178] Error starting mvn:sdn.FANA.optical/optical/1.0 (org.osgi.framework.BundleException: Unresolved constraint in bundle sdn.FANA.optical.optical [178]: Unable to resolve 178.0: missing requirement [178.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.karaf.shell.api.action)(version>=4.2.0)(!(version>=5.0.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle sdn.FANA.optical.optical [178]: Unable to resolve 178.0: missing requirement [178.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.karaf.shell.api.action)(version>=4.2.0)(!(version>=5.0.0)))
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
at java.lang.Thread.run(Thread.java:748)
This error message says that your bundle depends on the package org.apache.karaf.shell.api.action, version range [4.2.0, 5.0.0).
Whenever a bundle has an import, it must be matched by a corresponding export from another bundle. So you need to install the bundle that exports the package org.apache.karaf.shell.api.action, with version at least 4.2.0 and less than 5.0.0.
I just added a new dependencie in my tata-core-provider-servlets pom.xml : "io.jsonwebtoken" in version "0.7.0". I can build my project in Eclipse but when I want to start the bundle in Karaf I have this error:
Error executing command: Error executing command on bundles:
Unable to execute command on bundle 758: Unresolved constraint in bundle tata-core-provider-servlets [758]: Unable to resolve 758.0: missing requirement [758.0] osgi.wiring.package; (&(osgi.wiring.package=io.jsonwebtoken)(version>=0.7.0)(!(version>=1.0.0)))
Is there a restriction in Karaf ? Like no dependencies under 1.0.0 ?
Thanks
Some other library in your bundle require version > 1, I guess.
This is a simple feature.xml(v1.4.0) and all I did was specify
feature:install my-feature
Hence the error:
Error executing command: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=my-feature; type=karaf.feature; version="[2.0.0,2.0.0]"; filter:="(&(osgi.identity=my-feature)(type=karaf.feature)(version>=2.0.0)(version<=2.0.0))" [caused by: Unable to resolve my-feature/2.0.0: missing requirement [my-feature/2.0.0] osgi.identity; osgi.identity=vertx-auth-common; type=osgi.bundle; version="[3.3.3,3.3.3]"; resolution:=mandatory [caused by: Unable to resolve vertx-auth-common [52](R 52.0): missing requirement [vertx-auth-common [52](R 52.0)] osgi.wiring.package; (&(osgi.wiring.package=io.vertx.core.buffer)(version>=3.3.0)(!(version>=4.0.0))) [caused by: Unable to resolve io.vertx.core [53](R 53.0): missing requirement [io.vertx.core [53](R 53.0)] osgi.wiring.package; (&(osgi.wiring.package=io.netty.handler.codec)(version>=4.1.0)(!(version>=5.0.0)))]]]
I was under the impression that specifying my bundles in a feature and installing would pull them all into karaf.
How do I resolve this?
Since Karaf 4.0, Karaf features are validated prior installation. So one of the Imports for your own bundle can't be located in the feature you provided and also in none of which is already installed. Therefore you have this error.
Btw. regarding Karaf and vertx features, might want to take a look at the following Project (still WIP)
There you'll also will find a working feature descriptor for Vert.X on Karaf.
I've installed Apache Karaf 2.3.0. One of my bundles that needs to be installed in it uses classes from javax.servlet.http package. When I try to install the bundle it gives me the error message:
karaf#root> ERROR: Bundle com.groupgti.esb.purge [207] Error starting mvn:com.groupgti.esb/esb.purge/1.0.0 (org.osgi.framework.BundleException: Unresolved constraint in b
undle com.groupgti.esb.purge [207]: Unable to resolve 207.0: missing requirement [207.0] osgi.wiring.package; (osgi.wiring.package=com.groupgti.esb.cxf.interceptors) [cau
sed by: Unable to resolve 212.0: missing requirement [212.0] osgi.wiring.package; (&(osgi.wiring.package=javax.servlet.http)(version>=2.6.0)(!(version>=3.0.0)))])
org.osgi.framework.BundleException: Unresolved constraint in bundle com.groupgti.esb.purge [207]: Unable to resolve 207.0: missing requirement [207.0] osgi.wiring.package
; (osgi.wiring.package=com.groupgti.esb.cxf.interceptors) [caused by: Unable to resolve 212.0: missing requirement [212.0] osgi.wiring.package; (&(osgi.wiring.package=jav
ax.servlet.http)(version>=2.6.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:662)
javax.servlet.http package is exported from: mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2 system bundle. The problem is that its version is 2.5 but and my bundle requires at least 2.6.0. Is there a workaround or something to update the geronimo-servlet to the higher version that would be compatible with my bundle? (This is the system bundle).
Additional information:
CXF Version: 2.7.0
Camel Version 2.10.2
EDIT:
I forgot to mention the important thing. I also updated CXF to 2.7.0 version and CXF is the one which is introducing the dependency of Servlet 3.0. This is the graph from dependency tree:
Maybe will give you some idea on how get around this? The only thing that I could think of is to go back to CXF 2.6.x.
If your bundle really needs something newer than 2.5, you may have problems running it on Karaf 2.3.0. Karaf 2.3 uses Jetty 7.6.7 which is based on Servlet 2.5. It doesn't support any of the newer Servlet 3 based API's and such. You can upgrade the servlet-api bundle and it MAY work, but if your bundle/app uses any of the Servlet 3 functionality, it will likely not work.
Karaf 3 will be upgrading to Jetty 8.1 which does support the Servlet 3 stuff. Any help testing that and getting that out would be greatly appreciated by the Karaf community. :-)
Do you really need to use geronimo servlet spec ? Try replacing it with this:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>