Karaf Pax考试因未知协议而失败:换行

时间:2016-02-09 10:35:25

标签: osgi apache-karaf karaf blueprint-osgi pax-exam

您好我的pax考试失败并显示错误Unknown protocol:wrap

org.apache.karaf.features.internal.util.MultiException: Error
    at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:84)[9:org.apache.karaf.features.core:4.0.4]
    at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)[9:org.apache.karaf.features.core:4.0.4]
    at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:363)[9:org.apache.karaf.features.core:4.0.4]
    at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:360)[9:org.apache.karaf.features.core:4.0.4]
    at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:187)[9:org.apache.karaf.features.core:4.0.4]
    at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[9:org.apache.karaf.features.core:4.0.4]
    at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1089)[9:org.apache.karaf.features.core:4.0.4]
    at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:985)[9:org.apache.karaf.features.core:4.0.4]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
Caused by: java.io.IOException: Error downloading wrap:file:/C:/Users/609620968/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
    at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:67)[9:org.apache.karaf.features.core:4.0.4]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_79]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_79]
    ... 3 more
Caused by: java.io.IOException: Could not download [wrap:file:/C:/Users/609620968/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar]
    at org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:90)[9:org.apache.karaf.features.core:4.0.4]
    at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:58)[9:org.apache.karaf.features.core:4.0.4]
    ... 7 more
Caused by: java.net.MalformedURLException: Unknown protocol: wrap
    at java.net.URL.<init>(URL.java:619)[:1.7.0_79]
    at java.net.URL.<init>(URL.java:482)[:1.7.0_79]
    at java.net.URL.<init>(URL.java:431)[:1.7.0_79]
    at org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:62)[9:org.apache.karaf.features.core:4.0.4]
    ... 8 more

当我将我的karaf版本从3.03更改为4.04

时,此错误就开始了

1 个答案:

答案 0 :(得分:6)

您自己的功能需要依赖于wrap功能。使用prerequiste =&#34; true&#34;。

<feature prerequisite="true">wrap</feature>

这告诉karaf解析器拳头加载换行功能,然后尝试解析你的功能。