PAX Exam initialization error with Karaf 3 container

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PAX Exam initialization error with Karaf 3 container

glancey3
I'm getting this error on starting a basic pax exam test with a Karaf 3 container:

log4j:WARN No appenders could be found for logger (org.ops4j.pax.exam.spi.DefaultExamSystem).
log4j:WARN Please initialize the log4j system properly.

My question is how do I initialize logging when I'm using the following configuration in my test class:

 @Configuration
    public Option[] config() {
        MavenArtifactUrlReference karafUrl = maven()
            .groupId("org.apache.karaf")
            .artifactId("apache-karaf")
            .version("3.0.0")
            .type("tar.gz");

        MavenUrlReference karafStandardRepo = maven()
            .groupId("org.apache.karaf.features")
            .artifactId("standard")
            .classifier("features")
            .type("xml")
            .versionAsInProject();
        return new Option[] {
            // KarafDistributionOption.debugConfiguration("5005", true),
            karafDistributionConfiguration()
                .frameworkUrl(karafUrl)
                .unpackDirectory(new File("target/exam"))
                .useDeployFolder(false),
            keepRuntimeFolder(),
            KarafDistributionOption.features(karafStandardRepo , "scr"),
           
       };
    }
   
Loading...