Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C454D200C24 for ; Thu, 23 Feb 2017 18:40:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C2FEF160B64; Thu, 23 Feb 2017 17:40:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0CA14160B3E for ; Thu, 23 Feb 2017 18:40:05 +0100 (CET) Received: (qmail 98902 invoked by uid 500); 23 Feb 2017 17:40:05 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 98893 invoked by uid 99); 23 Feb 2017 17:40:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2017 17:40:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 99826C20ED for ; Thu, 23 Feb 2017 17:40:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id gxgdMQD4TKE3 for ; Thu, 23 Feb 2017 17:40:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 479EB61595 for ; Thu, 23 Feb 2017 17:40:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C33B7E08B8 for ; Thu, 23 Feb 2017 17:39:44 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2DF1624136 for ; Thu, 23 Feb 2017 17:39:44 +0000 (UTC) Date: Thu, 23 Feb 2017 17:39:44 +0000 (UTC) From: "A. Soroka (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-6132) camel-test-karaf - To allow end users more easily do Camel and Karaf integration test MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 23 Feb 2017 17:40:06 -0000 [ https://issues.apache.org/jira/browse/CAMEL-6132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880903#comment-15880903 ] 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... {noformat} javax.naming.NoInitialContextException: Unable to find the InitialContextFactory org.apache.camel.util.jndi.CamelInitialContextFactory. at org.apache.aries.jndi.ContextHelper.getInitialContext(ContextHelper.java:150) at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:51) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) at javax.naming.InitialContext.init(InitialContext.java:244) at javax.naming.InitialContext.(InitialContext.java:216) at org.apache.camel.test.junit4.CamelTestSupport.createJndiContext(CamelTestSupport.java:592) at org.apache.camel.test.junit4.CamelTestSupport.createRegistry(CamelTestSupport.java:578) at org.apache.camel.test.junit4.CamelTestSupport.createCamelContext(CamelTestSupport.java:572) at org.apache.camel.test.junit4.CamelTestSupport.doSetUp(CamelTestSupport.java:278) at org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:246) {noformat} {noformat} @Configuration public Option[] config() { MavenUrlReference camelRepo = maven().groupId("org.apache.camel.karaf").artifactId("apache-camel") .classifier("features").type("xml").version(CAMEL_VERSION); MavenUrlReference jenaRepo = maven().groupId("org.apache.jena").artifactId("jena-osgi-features") .classifier("features").type("xml").version("3.2.0"); MavenUrlReference enterpriseRepo = maven().groupId("org.apache.karaf.features").artifactId("enterprise") .classifier("features").type("xml").version("4.0.7"); MavenArtifactProvisionOption shim = mavenBundle().groupId("edu.si").artifactId("fcrepo3-shim-core") .version("0.0.1-SNAPSHOT").start(); Option[] options = new Option[] { features(enterpriseRepo, "jndi"), features(jenaRepo, "jena"), features(camelRepo, "camel-test"), shim }; return ArrayUtils.addAll(configure(), options); } {noformat} > camel-test-karaf - To allow end users more easily do Camel and Karaf integration test > ------------------------------------------------------------------------------------- > > Key: CAMEL-6132 > URL: https://issues.apache.org/jira/browse/CAMEL-6132 > 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 (v6.3.15#6346)