Routes not starting in Karaf 4.1.1 but runs in ServiceMix - apache-camel

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

Related

Importing Apache Commons dbcp2 in Apache Karaf [closed]

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; (&
(osgi.wiring.package=org.apache.commons.dbcp2)(version>=2.9.0)(!(version>=3.0.0)))
[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; (&
(osgi.wiring.package=org.apache.commons.dbcp2)(version>=2.9.0)(!(version>=3.0.0)))]
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:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.9.0</version>
</dependency>
After trying out a bit of different bundles,
I've found out that bundle:install transaction fixed it.

Serving a Vite.js React project with a FastAPI backend via Docker

I have a project that uses a fastapi backend and a vite.js React front end. I currently have each dockerized as image.
Is there a way I can get fastapi to serve the vite projects static files so I don't have to have two images.
I have seen this https://fastapi.tiangolo.com/tutorial/static-files/ but not sure if that's what I need or would it be like
from fastapi.staticfiles import StaticFiles
load_dotenv() # take environment variables from .env.
app = FastAPI()
# serves static files from the /frontend/dist directory
app.mount("/frontend", StaticFiles(directory="frontend/dist"), name="frontend")
I have ran the above and got error RuntimeError: Directory 'frontend/dist' does not exist
I have my vite project in frontend I ran the vite build command which produced a dist folder with my static files inside. This is my current structure
.
├── README.md
├── backend
│ ├── Dockerfile
│ ├── Pipfile
│ ├── Pipfile.lock
│ └── main.py
└── frontend
├── Dockerfile
├── dist
│ ├── assets
│ │ ├── favicon.17e50649.svg
│ │ ├── index.1cd49a68.js
│ │ └── index.30ea237b.css
│ └── index.html
├── index.html
├── package-lock.json
├── package.json
├── postcss.config.js
├── src
│ ├── App.jsx
│ ├── favicon.svg
│ ├── index.css
│ ├── logo.svg
│ └── main.jsx
├── tailwind.config.js
└── vite.config.js
After MadsLindh suggested the change, I was able to start the fastapi server from within the backend directory but now I get
> uvicorn main:app --reload
INFO: Will watch for changes in these directories: ['/Users/paul/Desktop/deal_query_ui/backend']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [79530] using WatchFiles
INFO: Started server process [79532]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: 127.0.0.1:63011 - "GET / HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:63012 - "GET /apple-touch-icon-precomposed.png HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:63012 - "GET /apple-touch-icon.png HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:63013 - "GET /favicon.ico HTTP/1.1" 404 Not Found
I even tried to go to http://127.0.0.1:8000/frontend/ but nothing I get the same {"detail":"Not Found"}
Docker
I went on to then create a Dockerfile within the root
# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.8-slim
EXPOSE 80
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
# Install pip requirements
COPY ./backend/Pipfile ./backend/Pipfile.lock ./
RUN python -m pip install --upgrade pip
RUN pip install pipenv && pipenv install --dev --system --deploy
WORKDIR /app
COPY . /app
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "80"]
When running this locally I get the error
Traceback (most recent call last):
File "/usr/local/bin/uvicorn", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/uvicorn/main.py", line 407, in main
run(
File "/usr/local/lib/python3.8/site-packages/uvicorn/main.py", line 575, in run
server.run()
File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "uvloop/loop.pyx", line 1501, in uvloop.loop.Loop.run_until_complete
File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 67, in serve
config.load()
File "/usr/local/lib/python3.8/site-packages/uvicorn/config.py", line 479, in load
self.loaded_app = import_from_string(self.app)
File "/usr/local/lib/python3.8/site-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/app/./backend/main.py", line 14, in <module>
app.mount("/frontend", StaticFiles(directory="../frontend/dist"), name="frontend")
File "/usr/local/lib/python3.8/site-packages/starlette/staticfiles.py", line 55, in __init__
raise RuntimeError(f"Directory '{directory}' does not exist")
RuntimeError: Directory '../frontend/dist' does not exist
Which from my experience doesn't make sense to me as I could get the server up and running from within the BE directory.

Reactjs cypress on firefox: Error: Could not find url target in browser about:blank. Targets were []

I'm facing an error while running tests of an react app with testing-library and cypress. Tests running on unit test and e2e chrome is fine till it running on e2e firefox.
I haven't used firefox before, i was installed firefox from here to run the test on demand, but it doesn't seem to work. I've tried searching the internet for errors but couldn't find any similar articles.
Any ideas on how to solve this are welcome. Thank you all for reading.
Versions
"react": "^18.1.0",
"cypress": "^10.0.2",
"#cypress/react": "^5.12.5",
"#cypress/webpack-dev-server": "^1.8.4",
Config packages.json
"scripts": {
...
"test:all": "react-scripts test --transformIgnorePatterns \"node_modules/(?!#mui)/\" --watchAll=false && npm run test:e2e:all",
"test:unit": "react-scripts test --transformIgnorePatterns \"node_modules/(?!#mui)/\"",
"test:e2e:all": "npm run test:e2e:chrome && npm run test:e2e:firefox && npm run test:e2e:edge && npm run test:e2e:tablet",
"test:e2e:chrome": "npx cypress run --headless --browser chrome",
"test:e2e:firefox": "npx cypress run --headless --browser firefox",
"test:e2e:edge": "npx cypress run --headless --browser edge",
"test:e2e:tablet": "npx cypress run --headless --browser chrome --config viewportWidth=800"
},
Full log from terminal:
PS E:\react-todolist-recoil> yarn test:all
yarn run v1.22.4
$ react-scripts test --transformIgnorePatterns "node_modules/(?!#mui)/" --watchAll=false && npm run test:e2e:all
PASS src/pages/Fetch/fetch.test.tsx (6.236 s)
PASS src/pages/Home/home.test.tsx (15.773 s)
Test Suites: 2 passed, 2 total
Tests: 17 passed, 17 total
Snapshots: 0 total
Time: 17.798 s, estimated 18 s
Ran all test suites.
> react-todolist-recoil#0.1.0 test:e2e:all
> npm run test:e2e:chrome && npm run test:e2e:firefox && npm run test:e2e:edge && npm run test:e2e:tablet
> react-todolist-recoil#0.1.0 test:e2e:chrome
> npx cypress run --headless --browser chrome
====================================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 10.0.2 │
│ Browser: Chrome 102 (headless) │
│ Node Version: v16.15.0 (C:\Program Files\nodejs\node.exe) │
│ Specs: 2 found (home.cy.ts, login.cy.ts) │
│ Searched: cypress/e2e/**/*.cy.{js,jsx,ts,tsx} │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: home.cy.ts (1 of 2)
HomePage tests
√ truy cập, hiển thị các component quan trọng (1949ms)
√ home_toolbar: tiêu đề và các button (613ms)
√ home_toolbar: disable một số button khi không có dữ liệu (523ms)
√ home_toolbar: flow add dữ liệu (915ms)
√ home_toolbar: flow import dữ liệu từ file xlsx (623ms)
√ home_toolbar: flow xóa toàn bộ dữ liệu (523ms)
√ home_table: table row và các action button (492ms)
√ home_table: flow đánh dấu todo là đã hoàn thành (507ms)
√ home_table: flow cập nhật một table_row (todo) (1107ms)
√ home_table: flow xóa một table_row (todo) (602ms)
√ home_pagination: hiển thị dữ liệu giới hạn (1412ms)
√ home_pagination: hiển thị dữ liệu theo trang (947ms)
12 passing (10s)
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 12 │
│ Passing: 12 │
│ Failing: 0 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 0 │
│ Video: true │
│ Duration: 10 seconds │
│ Spec Ran: home.cy.ts │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Video)
- Started processing: Compressing to 32 CRF
- Finished processing: E:\react-todolist-recoil\cypress\videos\home.cy.ts.mp4 (2 seconds)
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: login.cy.ts (2 of 2)
login.cy.ts
√ should visit (1094ms)
1 passing (1s)
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 1 │
│ Passing: 1 │
│ Failing: 0 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 0 │
│ Video: true │
│ Duration: 1 second │
│ Spec Ran: login.cy.ts │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Video)
- Started processing: Compressing to 32 CRF
- Finished processing: E:\react-todolist-recoil\cypress\videos\login.cy.ts.mp4 (0 seconds)
====================================================================================================
(Run Finished)
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ √ home.cy.ts 00:10 12 12 - - - │
├────────────────────────────────────────────────────────────────────────────────────────────────┤
│ √ login.cy.ts 00:01 1 1 - - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
√ All specs passed! 00:11 13 13 - - -
> react-todolist-recoil#0.1.0 test:e2e:firefox
> npx cypress run --headless --browser firefox
====================================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 10.0.2 │
│ Browser: Firefox 101 (headless) │
│ Node Version: v16.15.0 (C:\Program Files\nodejs\node.exe) │
│ Specs: 2 found (home.cy.ts, login.cy.ts) │
│ Searched: cypress/e2e/**/*.cy.{js,jsx,ts,tsx} │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: home.cy.ts (1 of 2)
Still waiting to connect to Firefox, retrying in 1 second (attempt 18/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 19/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 20/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 21/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 22/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 23/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 24/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 25/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 26/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 27/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 28/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 29/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 30/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 31/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 32/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 33/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 34/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 35/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 36/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 37/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 38/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 39/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 40/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 41/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 42/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 43/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 44/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 45/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 46/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 47/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 48/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 49/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 50/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 51/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 52/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 53/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 54/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 55/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 56/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 57/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 58/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 59/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 60/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 61/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 62/62)
Cypress failed to make a connection to Firefox.
This usually indicates there was a problem opening the Firefox browser.
Error: Could not find url target in browser about:blank. Targets were []
at C:\Users\IVS\AppData\Local\Cypress\Cache\10.0.2\Cypress\resources\app\packages\server\lib\browsers\browser-cri-client.js:90:27
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at retry (C:\Users\IVS\AppData\Local\Cypress\Cache\10.0.2\Cypress\resources\app\packages\server\lib\browsers\browser-cri-client.js:39:20)
at setupRemote (C:\Users\IVS\AppData\Local\Cypress\Cache\10.0.2\Cypress\resources\app\packages\server\lib\browsers\firefox-util.js:109:27)
error Command failed with exit code 1.
There's an open issue here "Still waiting to connect to Firefox" issue in Cypress 10.0.2 on Windows #22086.
I can confirm the same occurs on my system.
But, I can use Firefox nightly
script
"test:e2e:firefox": "npx cypress run --headless --browser firefox:nightly",
These are the paths used for Firefox (under C:/Program Files)
stable: getFirefoxPaths('Mozilla Firefox'),
dev: getFirefoxPaths('Firefox Developer Edition'),
nightly: getFirefoxPaths('Firefox Nightly'),
I have both "stable" (specified by --browser firefox) and "nightly" (specified by --browser firefox:nightly) but I can't see why "stable" isn't firing up. It seems to be installed the same way a "nightly"

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, version.id:label=GIT_COMMIT_HASH)" \
--service=$GAE_SERVICE_NAME \
--sort-by=DEPLOYED
#=>
┌───────────────────────────┬──────────────────────────────────────────┐
│ DEPLOYED │ GIT_COMMIT_HASH │
├───────────────────────────┼──────────────────────────────────────────┤
│ 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 [http://camel.apache.org/schema/blueprint]
My blueprint.xml contains the correct schema locations, according to all the documentation. eg. link
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
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" ...>
and
<bean id="myRoute" class="com.application.CxfCamelRoute" />
<camelContext xmlns="http://camel.apache.org/schema/blueprint" id="serviceRoutes">
<routeBuilder ref="myRoute" />
</camelContext>
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:
mvn:org.apache.camel.karaf/apache-camel/RELEASE/xml/features
mvn:org.apache.cxf.karaf/apache-cxf/3.2.7.fuse-sb2-740011/xml/features
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 │

Resources