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.
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 have been upgraded struts 2.0 to 2.3.16.1 through the http://mvnrepository.com/ in my web application
once I deployed in tomcat server its giving following error:
Unable to load configuration. - bean - jar:file:/C:/Projects/apache-tomcat-7.0.50/webapps/myweb/WEB-INF/lib/struts2-image-plugin-0.1.jar!/struts-plugin.xml:8:136
...
Caused by: Unable to load configuration. - bean - jar:file:/C:/Projects/apache-tomcat-7.0.50/webapps/myweb/WEB-INF/lib/struts2-image-plugin-0.1.jar!/struts-plugin.xml:8:136
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
Caused by: Unable to load bean: type:org.apache.struts2.views.TagLibrary class:com.aurifa.struts2.plugin.image.views.ImageTagLibrary - bean - jar:file:/C:/Projects/apache-tomcat-7.0.50/webapps/myweb/WEB-INF/lib/struts2-image-plugin-0.1.jar!/struts-plugin.xml:8:136
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:224)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:169)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
I updated all struts related plugins, but I couldn't find any version to update struts2-image-plugin
Are there any replacement for struts2-image-plugin instead of that or any other way to resolve this issue?
Appreciate if anyone give a solution or idea.
Check out the following struts2 jira: https://issues.apache.org/jira/browse/WW-4255
The TagLibrary interface was removed from struts2 and replaced by two other interfaces. (I'm not sure if there are going to be readded in 2.3.17)
You could update the plugin yourself to use the new interfaces if you feel brave or downgrade to 2.3.15.3 and hope the interface comes back in 2.3.17.
Simple experiment -
bundle A needs some com.sun.xml.internal.bind classes to be available to it via it's class loader ( jaxb.. )
I googled my way to the theoretical solution of forcing system.bundle to export com.sun.xml.internal.bind by adding the package to "org.osgi.framework.system.packages.extra" ( a standard framework parameter implemented in felix, documented at http://felix.apache.org/site/apache-felix-framework-configuration-properties.html ) and importing it in my bundle.
By doing so the bundle would not resolve anymore..
Unable to resolve 5.0: missing requirement [5.0] osgi.wiring.package; (osgi.wiring.package=com.sun.xml.internal.bind)
( 5 is the jaxb-using bundle ) Setting "org.osgi.framework.bootdelegation" for "com.sun.xml.internal.bind" and not importing it in the dependent bundle worked as documented.
Am i misinterpreting what system.packages.extra should do? Can i just not resolve imports from system.bundle? I tried explicitly setting system.bundle in the import via bnd at the bottom of my Import-Package directive
com.sun.xml.internal.bind;bundle-symbolic-name="system.bundle",\
*
Which resulted in
Unable to resolve 5.0: missing requirement [5.0] osgi.wiring.package; (&(osgi.wiring.package=com.sun.xml.internal.bind)(bundle-symbolic-name=system.bundle))
ps: i'm using bnd and the -runproperties to define these. My bndrun file has:
-runproperties: osgi.console.enable.builtin=true,\
com.mycompany.manager.confDir=./etc,\
org.osgi.framework.system.packages.extra=com.sun.xml.internal.bind,\
org.osgi.service.http.port=8888
the bundle that needs jaxb defines the following import
Import-Package: com.sun.xml.internal.bind,\
*
When trying to resolve dependencies in the bndrun editor, i get
Unable to resolve <<INITIAL>> ver=null: missing requirement (osgi.identity=com.mycompany.configuration.jaxb) [caused by: Unable to resolve com.mycompany.configuration.jaxb ver=0.0.0: missing requirement (osgi.wiring.package=com.sun.xml.internal.bind)]
org.osgi.service.resolver.ResolutionException: Unable to resolve <<INITIAL>> ver=null: missing requirement (osgi.identity=com.mycompany.configuration.jaxb) [caused by: Unable to resolve com.mycompany.configuration.jaxb ver=0.0.0: missing requirement (osgi.wiring.package=com.sun.xml.internal.bind)]
at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:285)
at org.apache.felix.resolver.Candidates.populate(Candidates.java:153)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:148)
at biz.aQute.resolve.ResolveProcess.resolveRequired(ResolveProcess.java:34)
at org.bndtools.core.resolve.ResolveOperation.run(ResolveOperation.java:61)
at org.bndtools.core.resolve.ResolveJob.run(ResolveJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
I see you are using Bndtools. Good! We have a special property for setting the system packages from the .bndrun file:
-runsystempackages: com.sun.xml.internal.bind
I'm not sure why it didn't work when you put this inside -runproperties... possibly just a typo though I haven't been able to spot it. Anyway it's better to use -runsystempackages because then the Bndrun resolver also knows to add these packages to the system bundle; then you'll be able to resolve in the bndrun editor as well.
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>