[
https://issues.apache.org/jira/browse/KARAF-7966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Baptiste Onofré reassigned KARAF-7966:
-------------------------------------------
Assignee: Jean-Baptiste Onofré
> Start Apache Karaf with a feature that can not loads a web WAR bundle
> ----------------------------------------------------------------------
>
> Key: KARAF-7966
> URL: https://issues.apache.org/jira/browse/KARAF-7966
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.4.3
> Reporter: fei long
> Assignee: Jean-Baptiste Onofré
> Priority: Major
>
> When I start Apache Karaf with a feature that loads a web WAR bundle, the
> prerequisite flag has been stetted as described in
> KARAF-3361(https://issues.apache.org/jira/browse/KARAF-3361?jql=project%20%3D%20KARAF%20AND%20text%20~%20war)
> :
> <feature name="viewer" version="2.0.0">
> <feature prerequisite="true">war</feature>
> <bundle
> start-level="87">webbundle:mvn:com.test/viewer-war/2.0.0/war?Web-ContextPath=/app/viewer</bundle>
> </feature>
> But the following error occasionally occurs (not always):
> [
> Caused by: java.io.IOException: Could not download
> [webbundle:file:/C:/Program%20Files/xxxx/karaf/system/viewer-war/2.0.0/viewer-war-2.0.0.war?Web-ContextPath=/app/viewer]
> at
> org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:92)
> ~[?:?]
> at
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
> ~[?:?]
> ... 6 more
> Caused by: java.net.MalformedURLException: Unknown protocol: webbundle
> at java.net.URL.<init>(Unknown Source) ~[?:?]
> at java.net.URL.<init>(Unknown Source) ~[?:?]
> at java.net.URL.<init>(Unknown Source) ~[?:?]
> at
> org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:63)
> ~[?:?]
> at
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
> ~[?:?]
> ... 6 more
> Caused by: java.lang.IllegalStateException: Unknown protocol: webbundle
> at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)
> ~[?:?]
> at java.net.URL.<init>(Unknown Source) ~[?:?]
> at java.net.URL.<init>(Unknown Source) ~[?:?]
> at java.net.URL.<init>(Unknown Source) ~[?:?]
> at
> org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:63)
> ~[?:?]
> at
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
> ~[?:?]
> ... 6 more
> ]
> Changing the value of [featuresBootAsynchronous] in the
> org.apache.karaf.features.cfg configuration file into [true] could solve the
> [Unknown protocol: webbundle] error.
> However, the change brings a new issue: A feature may be loaded twice during
> Karaf starts, which can cause the start of Karaf service to fail.
> One noticeable symptom of this issue is identical log messages appear twice
> during startup:
> [
> 2025-04-11 02:34:21.720+0900,INFO,,<<<SVF02>>>,,,,"Adding features:
> aries-blueprint/[4.4.3,4.4.3],feature/[4.4.3,4.4.3],framework/[4.4.3,4.4.3],jaas/[4.4.3,4.4.3],wrap/[2.6.12,2.6.12]",
> 2025-04-11 02:34:21.721+0900,INFO,,<<<SVF02>>>,,,,"Adding features:
> aries-blueprint/[4.4.3,4.4.3],feature/[4.4.3,4.4.3],framework/[4.4.3,4.4.3],jaas/[4.4.3,4.4.3],wrap/[2.6.12,2.6.12]",
> ]
> Why could a feature be loaded twice, when I set featuresBootAsynchronous to
> true?
> How can I reliably resolve the [Unknown protocol: webbundle] error when
> loading a feature with a web WAR bundle, without enabling
> featuresBootAsynchronous?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)