>>>>> Steinar Bang <[email protected]>: > Running no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > Exception in thread "KarafEmbeddedRunner" java.lang.RuntimeException: No > Karaf main found ^^^^^^^^^^^^^^^^^^^ > at > org.ops4j.pax.exam.karaf.container.internal.runner.KarafEmbeddedRunner$1.run(KarafEmbeddedRunner.java:85) > Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 182.318 sec > <<< FAILURE! - in no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest > no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest Time elapsed: > 182.015 sec <<< ERROR! > java.lang.RuntimeException: Cannot get the remote bundle context > Caused by: java.rmi.NotBoundException: bfa21964-9d13-4a55-b633-f0bc4368077a
Since I would like to be able to debug into the pax exam test, I tried running the karaf container embedded again. But I still got the "No karaf main found" error message. I googled the error message and found this pax exam issue: https://ops4j1.jira.com/browse/PAXEXAM-742 PAXEXAM-742 is fixed in pax exam 4.7.0. I am currently running pax exam 4.9.1 and karaf 4.0.9 (got the same error on karaf 4.0.7). Could it be that the error has reappeared in pax exam? Or am doing something wrong in the setup or have something missing from the setup? Here's the config: @Configuration public Option[] config() { final MavenArtifactUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf-minimal").type("zip").versionAsInProject(); final MavenArtifactUrlReference paxJdbcRepo = maven().groupId("org.ops4j.pax.jdbc").artifactId("pax-jdbc-features").versionAsInProject().type("xml").classifier("features"); final MavenArtifactUrlReference ukelonnFeatureRepo = maven().groupId("no.priv.bang.ukelonn").artifactId("ukelonn.karaf").versionAsInProject().type("xml").classifier("features"); return options( karafDistributionConfiguration().frameworkUrl(karafUrl).unpackDirectory(new File("target/exam")).useDeployFolder(false).runEmbedded(true), configureConsole().ignoreLocalConsole().ignoreRemoteShell(), junitBundles(), features(paxJdbcRepo), features(ukelonnFeatureRepo, "ukelonn-db-derby-test", "ukelonn")); }
