karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Unknown protocol wrap in a pax-exam test.
Date Fri, 28 Aug 2015 05:02:15 GMT
The problem doesn't seem related to wrap but more for file. It sounds 
like one of your boot feature use wrap:file, but Karaf tries to download 
from Maven anyway. AFAIR, we fixed something around that: can you make a 
try with Karaf 4.0.2-SNAPSHOT ?

Regards
JB

On 08/28/2015 02:26 AM, Benson Margulies wrote:
> This is a pax-exam 4.6.0 test using the karaf container, version 4.0.1.
>
> pax-url-wrap is in the classpath, though I wouldn't have thought that
> mattered; excluding it did not help.
>
> The test pauses for a long time after loading
> org.ops4j.pax.exam.inject, and then starts complaining as follows. The
> point it which it pauses varies from attempt to attempt.
>
> There is a blueprint service in the thing I'm trying to test.
>
> The first log message quoted might suggest that it is trying to
> install my feature that requires includes a wrapped bundle before
> installing the 'wrap' feature.
>
> I am pasting my config method at the end; I don't know how my feature
> gets to the front of the list.
>
> 2015-08-27 20:22:24,368 | INFO  | pool-1-thread-1  |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 | Adding features: test-dependencies/[0,0.0.0],
> instance/[4.0.1,4.0.1], package/[4.0.1,4.0.1],
> rosapi-front-end-mongodb-request-tracker/[1.5.0.SNAPSHOT,1.5.0.SNAPSHOT],
> log/[4.0.1,4.0.1], ssh/[4.0.1,4.0.1], aries-blueprint/[4.0.1,4.0.1],
> exam/[4.6.0,4.6.0], system/[4.0.1,4.0.1], feature/[4.0.1,4.0.1],
> management/[4.0.1,4.0.1], shell/[4.0.1,4.0.1], service/[4.0.1,4.0.1],
> jaas/[4.0.1,4.0.1], deployer/[4.0.1,4.0.1], diagnostic/[4.0.1,4.0.1],
> shell-compat/[4.0.1,4.0.1], bundle/[4.0.1,4.0.1],
> config/[4.0.1,4.0.1], kar/[4.0.1,4.0.1], wrap/[0,0.0.0]
>
> ...
>
>
>
>
>
> 015-08-27 20:07:15,106 | ERROR | pool-1-thread-1  |
> BootFeaturesInstaller            | 8 - org.apache.karaf.features.core
> - 4.0.1 | Error installing boot features
> org.apache.karaf.features.internal.util.MultiException: Error
> at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:84)[8:org.apache.karaf.features.core:4.0.1]
> at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)[8:org.apache.karaf.features.core:4.0.1]
> at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:358)[8:org.apache.karaf.features.core:4.0.1]
> at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:355)[8:org.apache.karaf.features.core:4.0.1]
> at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:191)[8:org.apache.karaf.features.core:4.0.1]
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[8:org.apache.karaf.features.core:4.0.1]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[8:org.apache.karaf.features.core:4.0.1]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[8:org.apache.karaf.features.core:4.0.1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_05]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_05]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_05]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_05]
> Caused by: java.io.IOException: Error downloading
> wrap:file:/Users/benson/.m2/repository/com/basistech/rosette/rosette-api-model/0.5.0.1/rosette-api-model-0.5.0.1.jar
> at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:67)[8:org.apache.karaf.features.core:4.0.1]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_05]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_05]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_05]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_05]
> ... 3 more
> Caused by: java.io.IOException: Could not download
> [wrap:file:/Users/benson/.m2/repository/com/basistech/rosette/rosette-api-model/0.5.0.1/rosette-api-model-0.5.0.1.jar]
> at org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:90)[8:org.apache.karaf.features.core:4.0.1]
> at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:58)[8:org.apache.karaf.features.core:4.0.1]
> ... 7 more
> Caused by: java.net.MalformedURLException: Unknown protocol: wrap
> at java.net.URL.<init>(URL.java:620)[:1.8.0_05]
> at java.net.URL.<init>(URL.java:483)[:1.8.0_05]
> at java.net.URL.<init>(URL.java:432)[:1.8.0_05]
> at org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:62)[8:org.apache.karaf.features.core:4.0.1]
> ... 8 more
> Caused by: java.lang.IllegalStateException: Unknown protocol: wrap
> at org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)[org.apache.felix.framework-5.0.1.jar:]
> at java.net.URL.<init>(URL.java:615)[:1.8.0_05]
> ... 11 more
> Caused by: java.io.IOException: Error downloading
> wrap:file:/Users/benson/.m2/repository/com/basistech/rosette/rosette-api-model/0.5.0.1/rosette-api-model-0.5.0.1.jar
>
> @Configuration
> public static Option[] paxConfiguration() {
>      String basedir = System.getProperty("basedir", ".");
>      mongoUri = new
> MongoClientURI(String.format("mongodb://localhost:%d/%s", mongoPort,
> DB_NAME)).getURI();
>      String version = System.getProperty("project.version");
>      String karafVersion = System.getProperty("karaf.version");
>      MavenUrlReference karafStandardRepo = maven()
>              .groupId("org.apache.karaf.features")
>              .artifactId("standard")
>              .version(karafVersion)
>              .classifier("features")
>              .type("xml");
>      return new Option[]{
>          karafDistributionConfiguration().karafVersion(karafVersion).name("Apache
> Karaf")
>
> .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("zip").versionAsInProject())
>                  .useDeployFolder(false)
>                  .unpackDirectory(new File(basedir, "target/pax")),
>          features(karafStandardRepo , "wrap"),
>          configureConsole().ignoreLocalConsole(),
>          keepRuntimeFolder(),
>          logLevel(LogLevelOption.LogLevel.INFO),
>          // The plugin runs Karaf from target/pax/UUID directory.
>          // Communicate the pipeline config file via the config admin file.
>          // We could also put a worker thread count in here and even check it.
>          new KarafDistributionConfigurationFilePutOption("etc/com.basistech.ws.requestracker.cfg",
> "mongoUri", mongoUri),
>          editConfigurationFileExtend("etc/config.properties",
> "org.apache.aries.blueprint.synchronous", "true"),
>          features(maven("com.basistech.ws",
> "rosapi-front-end-mongodb-request-tracker")
>                  .classifier("features").type("xml").version(version),
> "rosapi-front-end-mongodb-request-tracker"),
>          junitBundles(),
>          systemProperty("pax.exam.osgi.unresolved.fail").value("true"),
>          systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO")
>      };
> }
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message