The bottom line here is that any feature that I list in the pax-exam
@Configuration is being treated as a boot feature, and installed in
the middle of the other boot features. That's sure not working for me.
Is there any way to get it to be installed in an ordinary sort of way
_after_ the real boot features?


On Thu, Aug 27, 2015 at 9:05 PM, Benson Margulies <[email protected]> wrote:
> So, I got rid of all my wrap cases, and now I've got a wiring error on
> org.slf4j. I thought that karaf would be loading up pax-logging for
> this purpose?
>
> On Thu, Aug 27, 2015 at 8:26 PM, Benson Margulies <[email protected]> 
> 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")
>>     };
>> }

Reply via email to