Importing Apache Commons dbcp2 in Apache Karaf [closed] - apache-camel

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 months ago.
Improve this question
I have imported my Apache Camel blueprint xml bundle into Apache Karaf. When I try to start the bundle, it is complaining about dbcp2. I've tried to bundle it into my Apache Karaf but still no luck. The error I am getting:
Error executing command: Error executing command on bundles:
Error starting bundle 129: Unable to resolve xxx.yyy [129](R 129.0): missing
requirement [xxx.yyy [129](R 129.0)] osgi.wiring.package; (&
[caused by: Unable to resolve org.apache.commons.commons-dbcp2 [119](R 119.0): missing
requirement [org.apache.commons.commons-dbcp2 [119](R 119.0)] osgi.wiring.package; (&
(osgi.wiring.package=javax.transaction)(version>=1.1.0))] Unresolved requirements:
[[xxx.yyy [129](R 129.0)] osgi.wiring.package; (&
I am not sure if the problem is the dbcp2 or the javax.transaction.
I've bundled both into my Apache Karaf therefore as shown here:
119 │ Installed │ 80 │ 2.9.0 │ Apache Commons DBCP
120 │ Resolved │ 80 │ 20220320.0.0 │ JSON in Java
129 │ Installed │ 80 │ 0.0.1.SNAPSHOT │ Route for xxxxx (my bundle)
131 │ Resolved │ 80 │ 0 │ wrap_mvn_javax.transaction_jta_1.1
My pom file in my bundle imports dbcp2 as shown here:

After trying out a bit of different bundles,
I've found out that bundle:install transaction fixed it.


workspaces internal error when running "yarn dev"

I have a project I cloned from GitHub that was created in Vite+react+tailwind
When I run “yarn dev” I receive the following error
Internal Error: PROJECTNAME#workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
at AF.getCandidates (/Users/name/.yarn/releases/yarn-3.1.1.cjs:437:4421)
at pd.getCandidates (/Users/name/.yarn/releases/yarn-3.1.1.cjs:432:5275)
at /Users/name/.yarn/releases/yarn-3.1.1.cjs:441:7674
at du (/Users/name/.yarn/releases/yarn-3.1.1.cjs:382:4003)
at R (/Users/name/.yarn/releases/yarn-3.1.1.cjs:441:7654)
Then, when I run “yarn install” here is what I get
➤ YN0000: ┌ Resolution step
➤ YN0035: │ #noirgallery/restless#npm:^0.7.0: The remote server failed to provide the requested resource
➤ YN0035: │ Response Code: 404 (Not Found)
➤ YN0035: │ Request Method: GET
➤ YN0035: │ Request URL:
➤ YN0000: └ Completed in 0s 670ms
➤ YN0000: Failed with errors in 0s 675ms
➤ YN0032: fsevents#npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0061: sane#npm:4.1.0 is deprecated: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
➤ YN0061: resolve-url#npm:0.2.1 is deprecated:
➤ YN0061: urix#npm:0.1.0 is deprecated: Please see
➤ YN0061: core-js#npm:1.2.7 is deprecated: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
And then if I run “yarn dev” again, this just repeats.

How Would I Retrieve All Git Commit SHA-1 Hashes Deployed to AppEngine Using the CLI?

The "Versions" page in the AppEngine section of the GCP console here displays a table containing all of the git commit SHA-1 hashes that have been deployed for a given AppEngine Service.
How would I display this list using the gcloud CLI?
You are able to generate the table you're looking for using the app group within the gcloud CLI.
Here is an example table with some formatting and asc. sorting:
gcloud app versions list \
--format="table[box](last_deployed_time.datetime:label=DEPLOYED," \
--service=$GAE_SERVICE_NAME \
│ 1970-01-01 00:00:00-00:00 │ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │
│ . . . │ . . . │
│ . . . │ . . . │
│ . . . │ . . . │
│ 1970-01-01 00:00:01-00:00 │ yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy │

Waiting for namespace handlers

I'm upgrading to Fuse 7.3 and getting new errors in any routes that use CXF.
Blueprint bundle ruleEngineService/5.0.2 is waiting for namespace
handlers []
My blueprint.xml contains the correct schema locations, according to all the documentation. eg. link
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns=""
I haven't changed much since it was working in Fuse 7.0.0.
Features are installed:
cxf | 3.2.7.fuse-731004-redhat-00003 | x | Started | cxf-3.2.7.fuse-731004-redhat-00003 |
camel-cxf | 2.21.0.fuse-731003-redhat-00003 | x | Started | camel-2.21.0.fuse-731003-redhat-00003 |
The things that set this blueprint apart from ones that are resolving are:
<cxf:cxfEndpoint id="myEndpoint" ...>
<bean id="myRoute" class="com.application.CxfCamelRoute" />
<camelContext xmlns="" id="serviceRoutes">
<routeBuilder ref="myRoute" />
where CxfCamelRoute contains a reference to cxf://bean:myEndpoint?serviceClass="..."
Regarding blueprint features:
admin#root()> features:list | grep blueprint
kie-aries-blueprint | 7.11.0.Final | | Uninstalled | karaf-features-core-droolsjbpm-7.11.0.Final | KIE Aries Blueprint
camel-blueprint | 2.23.2.fuse-740006 | | Uninstalled | camel-2.23.2.fuse-740006 |
camel-blueprint | 2.21.0.fuse-731003-redhat-00003 | x | Started | camel-2.21.0.fuse-731003-redhat-00003 |
aries-blueprint-spring | 4.3.20.RELEASE_1 | | Uninstalled | spring-legacy-4.2.0.fuse-731003-redhat-00003 |
aries-blueprint | 4.2.0.fuse-731003-redhat-00003 | x | Started | standard-4.2.0.fuse-731003-redhat-00003 | Aries Blueprint
Could it be a conflict between aries-blueprint and camel-blueprint?
I am running out of ideas.
Ok, I seem to have solved it.
I added the repo for KIE (features:addurl mvn:org.kie/kie-karaf-features/7.11.0.Final/xml/features) before doing anything else. The order change fixed my issue. It seems as though KIE 7.11.0.Final adds the following repos:
The namehandler issue was presumably from some conflict between the Fuse 7.3 libraries, and the latest camel/cxf RELEASE versions.
To me, this feels like a bug, to have KIE 7.11.0.Final use RELEASE features. It clearly has bad consequences. But I don't know another way to make feature:install kie accessible to my Karaf.
Never use RELEASE in maven coordinates. You can end up even with Camel 3, when expecting Camel 2. (Never use LATEST either).
If you use Fuse to install KIE features, you should not install mvn:org.kie/kie-karaf-features/7.11.0.Final/xml/features
First you have to install bridge features that provide feature dependencies for KIE from Fuse:
karaf#root()> feature:repo-add mvn:org.jboss.fuse.features/rhba-features/7.6.0.fuse-760014/xml/features
Adding feature url mvn:org.jboss.fuse.features/rhba-features/7.6.0.fuse-760014/xml/features
Then you have ton install Fuse variant of Kie features. Not this one, but this one
The description in kie-karaf-features-7.11.0.Final-features-fuse.xml is a bit older than current Fuse, because the feature artifactId has changed:
In order to install the below features into Fuse 7, target runtime needs to provide these features:
- drools7-dependencies
- jbpm7-dependencies
- optaplanner-dependencies
- kie7-remote-dependencies
- db-dependencies
- hibernate-dependencies
- hibernate-validator-dependencies
These features are contained in some repository not referenced explicitly with <repository> (loose coupling).
Fuse 7 specific repository is 'mvn:org.jboss.fuse.features/brms-features/VERSION/xml/features'
So here's the command:
karaf#root()> feature:repo-add mvn:org.kie/kie-karaf-features/7.11.0.Final/xml/features-fuse
Adding feature url mvn:org.kie/kie-karaf-features/7.11.0.Final/xml/features-fuse
karaf#root()> feature:list|grep kie
kie │ 7.11.0.Final │ │ Uninstalled │ karaf-features-core-droolsjbpm-7.11.0.Final │ KIE API
kie-ci │ 7.11.0.Final │ │ Uninstalled │ karaf-features-core-droolsjbpm-7.11.0.Final │ KIE CI
kie-spring │ 7.11.0.Final │ │ Uninstalled │ karaf-features-core-droolsjbpm-7.11.0.Final │ KIE Spring
kie-aries-blueprint │ 7.11.0.Final │ │ Uninstalled │ karaf-features-core-droolsjbpm-7.11.0.Final │ KIE Aries Blueprint
kie-camel │ 7.11.0.Final │ │ Uninstalled │ karaf-features-core-droolsjbpm-7.11.0.Final │
kie-dmn │ 7.11.0.Final │ │ Uninstalled │ karaf-features-fuse-droolsjbpm-7.11.0.Final │ Kie DMN
kie-server-client │ 7.11.0.Final │ │ Uninstalled │ karaf-features-fuse-droolsjbpm-7.11.0.Final │ KIE Server Client
servlet-api-kie │ 7.11.0.Final │ │ Uninstalled │ karaf-features-fuse-droolsjbpm-7.11.0.Final │
kie-pmml │ 7.11.0.Final │ │ Uninstalled │ karaf-features-fuse-droolsjbpm-7.11.0.Final │
kie7-remote-dependencies │ 0.0.0 │ │ Uninstalled │ fuse-features-dependencies-droolsjbpm-7.6.0.fuse-760014 │

Routes not starting in Karaf 4.1.1 but runs in ServiceMix

I am using a simple camel-spring project which has a file route to copy from one location to another. But when i deploy the bundle and even the bundle is in Active State, not sure why the routes are not starting. Below are the dependent bundles i have started.
28 │ Active │ 80 │ 4.1.1 │ Apache Karaf :: OSGi Services :: Event
53 │ Active │ 80 │ 2.19.1 │ camel-commands-core
54 │ Active │ 50 │ 2.19.1 │ camel-core
55 │ Active │ 80 │ 2.19.1 │ camel-karaf-commands
59 │ Active │ 50 │ 2.19.1 │ camel-spring
68 │ Active │ 80 │ 1.0.0.SNAPSHOT │ A Camel Spring Route
But when i use the same Camel Spring Route bundle to install in Apache Service Mix , I see in the route-list that my routes are started and working fine. Do i need to have any other bundles to be start for my route bundle to work .
Please follow the link to take a look into the bundle.
Link to Download Bundle
Here is the Image of the simple project
Below the details from service mix which works.
karaf#root>list | grep Active
43 | Active | 50 | 2.16.5 | camel-core
47 | Active | 50 | 2.16.5 | camel-spring
49 | Active | 80 | 2.16.5 | camel-karaf-commands
224 | Active | 80 | 1.0.0.SNAPSHOT | A Camel Spring Route
Thanks in advance.
You need to install the camel-spring-dm feature in Karaf 4.1.1, eg feature:install camel-spring-dm. Also mind spring-dm is deprecated / dead so its not recommended to be used. Use OSGi Blueprint instead if you want to do XML routes in Karaf/ServiceMix with Camel.
In karaf 4.1.1 spring dm is not present by default. You need to first do
feature:repo-add spring-legacy 4.1.1

getting error Reason: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin trying to build slideshow-plugin

When i try to build (mvn) the slide-show plugin, i get error:
(see detaied stdout below)
mvn -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] POM for 'org.kohsuke.stapler:maven-stapler-plugin:pom:1.15:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.kohsuke.stapler:maven-stapler-plugin
POM Location: /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
Reason: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.kohsuke.stapler:maven-stapler-plugin': Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findArtifactTypeHandlersInPlugins(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
at org.apache.maven.DefaultMaven.doExecute(
at org.apache.maven.DefaultMaven.execute(
at org.apache.maven.cli.MavenCli.main(
at org.apache.maven.cli.compat.CompatibleMain.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.codehaus.classworlds.Launcher.launchEnhanced(
at org.codehaus.classworlds.Launcher.launch(
at org.codehaus.classworlds.Launcher.mainWithExitCode(
at org.codehaus.classworlds.Launcher.main(
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.kohsuke.stapler:maven-stapler-plugin': Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(
at org.apache.maven.plugin.DefaultPluginManager.loadPluginFully(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(
... 15 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(
... 19 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Apr 16 00:32:26 EDT 2012
[INFO] Final Memory: 15M/182M
[INFO] ------------------------------------------------------------------------
I am getting this too (although its for the akuma artifact) and can explain why, but have not yet found a good solution. Both define a parent POM and a new repo:
The URL for this glassfish maven repo gives a 301 to and for some reason, maven decides to download the body of that response as the POM. If you look in your ~/.m2/repository/org/kohsuke/pom/2/pom-2.pom, you should see something like:
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
Manually looking at the glassfish repo, I do not even see the desired parent POM (at this time).
I hope this helps. If you are able to figure it out, please post back as this is as far as I have gotten so far!
I had this problem also, with a different POM from another project, and I was attempting to build with Maven 3.X. The simple solution was to install the most recent 2.X version of Maven. After that, it built fine. Being a Maven novice, It appears the URI format for REPOS differs between the 2 versions.
Simply install Maven 2.X (I used 2.2.1), and put it's "bin" directory first in your PATH env variable, and you should be good to go.