camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A. Soroka (JIRA)" <>
Subject [jira] [Commented] (CAMEL-6132) camel-test-karaf - To allow end users more easily do Camel and Karaf integration test
Date Thu, 23 Feb 2017 17:39:44 GMT


A. Soroka commented on CAMEL-6132:

I would love to help, and I am currently wresting with getting an example up. I keep running
into errors with JNDI (?!), e.g. as shown below. I have experience with Camel and Karaf, but
it dates from five or more years ago, and times have changed. I am subclassing {{CamelKarafTestSupport}}
and I show below the stacktrace my current {{@Configuration}} method. Any advice much appreciated,
and if I can get a working example I will make a point of at least writing a tutorial and
hopefully sending a PR with whatever improvements I can find. I'm just stumped by this JNDI
business. I think I must be missing something obvious... 

javax.naming.NoInitialContextException: Unable to find the InitialContextFactory org.apache.camel.util.jndi.CamelInitialContextFactory.
	at org.apache.aries.jndi.ContextHelper.getInitialContext(
	at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(
	at javax.naming.spi.NamingManager.getInitialContext(
	at javax.naming.InitialContext.getDefaultInitCtx(
	at javax.naming.InitialContext.init(
	at javax.naming.InitialContext.<init>(
	at org.apache.camel.test.junit4.CamelTestSupport.createJndiContext(
	at org.apache.camel.test.junit4.CamelTestSupport.createRegistry(
	at org.apache.camel.test.junit4.CamelTestSupport.createCamelContext(
	at org.apache.camel.test.junit4.CamelTestSupport.doSetUp(
	at org.apache.camel.test.junit4.CamelTestSupport.setUp(


    public Option[] config() {
        MavenUrlReference camelRepo = maven().groupId("org.apache.camel.karaf").artifactId("apache-camel")
        MavenUrlReference jenaRepo = maven().groupId("org.apache.jena").artifactId("jena-osgi-features")
        MavenUrlReference enterpriseRepo = maven().groupId("org.apache.karaf.features").artifactId("enterprise")

        MavenArtifactProvisionOption shim = mavenBundle().groupId("").artifactId("fcrepo3-shim-core")
        Option[] options = new Option[] { features(enterpriseRepo, "jndi"), features(jenaRepo,
                features(camelRepo, "camel-test"), shim };
        return ArrayUtils.addAll(configure(), options);

> camel-test-karaf - To allow end users more easily do Camel and Karaf integration test
> -------------------------------------------------------------------------------------
>                 Key: CAMEL-6132
>                 URL:
>             Project: Camel
>          Issue Type: New Feature
>          Components: karaf
>            Reporter: Claus Ibsen
>            Assignee: Quinn Stevenson
>             Fix For: 2.19.0
> We should introduce a proper camel-test-karaf component that *end users* can use to do
Camel and Karaf integration tests.
> The code we have in tests/camel-itest-karaf is for internal usage and testing of Camel.
The code is not polished and intended for end users.
> We should create a new module for that, and take the good parts of camel-itest-karaf
and make it user friendly etc. And of course have docs to go with as well.
> And when its good, we can use that in camel-itest-karaf also (eat our own dog food)

This message was sent by Atlassian JIRA

View raw message